From ff9473d42bbf238dccf163eb22d5b715b1e43f04 Mon Sep 17 00:00:00 2001 From: Vijaya Gopal Yarramneni Date: Thu, 22 Oct 2020 22:42:20 -0700 Subject: [PATCH 01/28] Setting AMQP session incoming window size to unlimited for receivers (#16163) * Setting incoming window size on amqp session of a receive link to unlimited. This is to allow the case where clients only receive, but don't complete or abandon messages. * Ading a test case. * Fixing the newly added testcase --- .../src/Amqp/AmqpLinkCreator.cs | 9 +++++++ .../tests/Infrastructure/TestUtility.cs | 17 ++++++++----- .../tests/SenderReceiverClientTestBase.cs | 2 +- .../tests/SenderReceiverTests.cs | 24 +++++++++++++++++++ 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/src/Amqp/AmqpLinkCreator.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/src/Amqp/AmqpLinkCreator.cs index 848e6a7c4219..f4eea4c1e48b 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/src/Amqp/AmqpLinkCreator.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/src/Amqp/AmqpLinkCreator.cs @@ -8,6 +8,7 @@ namespace Microsoft.Azure.ServiceBus.Amqp using Microsoft.Azure.Amqp; using Microsoft.Azure.Amqp.Framing; using Microsoft.Azure.ServiceBus.Primitives; + using Newtonsoft.Json.Schema; internal abstract class AmqpLinkCreator { @@ -59,6 +60,14 @@ public async Task> CreateAndOpenAmqpLinkAsync() { // Create Session var amqpSessionSettings = new AmqpSessionSettings { Properties = new Fields() }; + if (this.amqpLinkSettings.IsReceiver()) + { + // This is the maximum number of unsettled transfers across all receive links on this session. + // This will allow the session to accept unlimited number of transfers, even if the recevier(s) + // are not settling any of the deliveries. + amqpSessionSettings.IncomingWindow = uint.MaxValue; + } + session = amqpConnection.CreateSession(amqpSessionSettings); await session.OpenAsync(timeoutHelper.RemainingTime()).ConfigureAwait(false); } diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/Infrastructure/TestUtility.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/Infrastructure/TestUtility.cs index 107ed3585ba8..420006392d59 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/Infrastructure/TestUtility.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/Infrastructure/TestUtility.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.ServiceBus.UnitTests static class TestUtility { + const int MaxSendBatchSize = 4500; private static readonly Lazy NamespaceConnectionStringInstance = new Lazy( () => new ServiceBusConnectionStringBuilder(ReadEnvironmentConnectionString()).ToString(), LazyThreadSafetyMode.PublicationOnly); @@ -49,15 +50,19 @@ internal static async Task SendMessagesAsync(IMessageSender messageSender, int m await Task.FromResult(false); } - var messagesToSend = new List(); - for (var i = 0; i < messageCount; i++) + for (var j = 0; j < messageCount; j += MaxSendBatchSize) { - var message = new Message(Encoding.UTF8.GetBytes("test" + i)); - message.Label = "test" + i; - messagesToSend.Add(message); + var messagesToSend = new List(); + for (var i = j; i < Math.Min(messageCount, j + MaxSendBatchSize); i++) + { + var message = new Message(Encoding.UTF8.GetBytes("test" + i)); + message.Label = "test" + i; + messagesToSend.Add(message); + } + + await messageSender.SendAsync(messagesToSend); } - await messageSender.SendAsync(messagesToSend); Log($"Sent {messageCount} messages"); } diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverClientTestBase.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverClientTestBase.cs index 9bd6244d8a9c..7023c9a5a0c3 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverClientTestBase.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverClientTestBase.cs @@ -26,7 +26,7 @@ internal async Task ReceiveDeleteTestCase(IMessageSender messageSender, IMessage { await TestUtility.SendMessagesAsync(messageSender, messageCount); var receivedMessages = await TestUtility.ReceiveMessagesAsync(messageReceiver, messageCount, TimeSpan.FromSeconds(10)); - Assert.Equal(receivedMessages.Count, messageCount); + Assert.Equal(messageCount, receivedMessages.Count); } internal async Task PeekLockWithAbandonTestCase(IMessageSender messageSender, IMessageReceiver messageReceiver, int messageCount) diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverTests.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverTests.cs index fe69daeb0886..e2d5b87b5e89 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverTests.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/SenderReceiverTests.cs @@ -45,6 +45,30 @@ await ServiceBusScope.UsingQueueAsync(partitioned, sessionEnabled, async queueNa }); } + [Fact] + [LiveTest] + [DisplayTestMethodName] + public async Task ReceiveLotOfMessagesWithoutSettling() + { + // 5000 is the default limit on amqp session incoming window + int messageCount = 5010; + await ServiceBusScope.UsingQueueAsync(false, false, async queueName => + { + var sender = new MessageSender(TestUtility.NamespaceConnectionString, queueName); + var receiver = new MessageReceiver(TestUtility.NamespaceConnectionString, queueName, receiveMode: ReceiveMode.PeekLock); + + try + { + await this.ReceiveDeleteTestCase(sender, receiver, messageCount); + } + finally + { + await sender.CloseAsync(); + await receiver.CloseAsync(); + } + }); + } + [Theory] [MemberData(nameof(TestPermutations))] [LiveTest] From 9fc81efa5ba79d0daa1b82adb73ee5f6a8bb2ba0 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Fri, 23 Oct 2020 01:30:08 -0700 Subject: [PATCH 02/28] Azure Monitor Exporter: Rename (#16056) * rename * resolve merge conflicts * rename, shorter project name * merge conflicts * Update Readme * Rename folders * Rename sln * Update ci.yml * API change * Update API Co-authored-by: Rajkumar Rangaraj --- .../CHANGELOG.md | 0 .../Directory.Build.props | 0 ....Azure.Monitor.OpenTelemetry.Exporter.sln} | 10 +-- .../README.md | 6 +- ....OpenTelemetry.Exporter.netstandard2.0.cs} | 82 +++++++++---------- .../src/ActivityExtensions.cs | 2 +- .../src/ApplicationInsightsRestClient.cs | 4 +- .../src/AzureMonitorConverter.cs | 6 +- .../AzureMonitorExporterHelperExtensions.cs | 2 +- .../src/AzureMonitorExporterOptions.cs | 2 +- .../src/AzureMonitorTraceExporter.cs | 3 +- .../AzureMonitorTraceExporterEventSource.cs | 2 +- .../src/AzureMonitorTransmitter.cs | 7 +- .../ConnectionStringParser.cs | 15 ++-- .../src/ConnectionString/Constants.cs | 2 +- .../src/EventLevelSuffix.cs | 2 +- .../src/ExceptionExtensions.cs | 2 +- .../ApplicationInsightsRestClient.cs | 4 +- .../Models/AvailabilityData.Serialization.cs | 2 +- .../src/Generated/Models/AvailabilityData.cs | 2 +- .../src/Generated/Models/ContextTagKeys.cs | 2 +- .../src/Generated/Models/DataPointType.cs | 2 +- .../Models/MessageData.Serialization.cs | 2 +- .../src/Generated/Models/MessageData.cs | 2 +- .../Models/MetricDataPoint.Serialization.cs | 2 +- .../src/Generated/Models/MetricDataPoint.cs | 2 +- .../Models/MetricsData.Serialization.cs | 2 +- .../src/Generated/Models/MetricsData.cs | 2 +- .../Models/MonitorBase.Serialization.cs | 2 +- .../src/Generated/Models/MonitorBase.cs | 2 +- .../Models/MonitorDomain.Serialization.cs | 2 +- .../src/Generated/Models/MonitorDomain.cs | 2 +- .../Models/PageViewData.Serialization.cs | 2 +- .../src/Generated/Models/PageViewData.cs | 2 +- .../Models/PageViewPerfData.Serialization.cs | 2 +- .../src/Generated/Models/PageViewPerfData.cs | 2 +- .../RemoteDependencyData.Serialization.cs | 2 +- .../Generated/Models/RemoteDependencyData.cs | 2 +- .../Models/RequestData.Serialization.cs | 2 +- .../src/Generated/Models/RequestData.cs | 2 +- .../src/Generated/Models/SeverityLevel.cs | 2 +- .../Models/StackFrame.Serialization.cs | 2 +- .../src/Generated/Models/StackFrame.cs | 2 +- .../TelemetryErrorDetails.Serialization.cs | 2 +- .../Generated/Models/TelemetryErrorDetails.cs | 2 +- .../TelemetryEventData.Serialization.cs | 2 +- .../Generated/Models/TelemetryEventData.cs | 2 +- .../TelemetryExceptionData.Serialization.cs | 2 +- .../Models/TelemetryExceptionData.cs | 2 +- ...TelemetryExceptionDetails.Serialization.cs | 2 +- .../Models/TelemetryExceptionDetails.cs | 2 +- .../Models/TelemetryItem.Serialization.cs | 2 +- .../src/Generated/Models/TelemetryItem.cs | 2 +- .../Models/TrackResponse.Serialization.cs | 2 +- .../src/Generated/Models/TrackResponse.cs | 2 +- .../src/HttpHelper.cs | 2 +- .../src/ITransmitter.cs | 4 +- .../src/IngestionResponsePolicy.cs | 6 +- ...ure.Monitor.OpenTelemetry.Exporter.csproj} | 0 .../src/NDJsonWriter.cs | 2 +- .../src/PartBType.cs | 2 +- .../src/Properties/AssemblyInfo.cs | 10 +++ .../src/ResponseStatusCodes.cs | 2 +- .../src/SdkVersionUtils.cs | 8 +- .../src/SemanticConventions.cs | 2 +- .../src/StringExtensions.cs | 2 +- .../src/TagsExtension.cs | 2 +- .../src/TelemetryType.cs | 2 +- .../src/autorest.md | 0 .../DemoTrace.cs | 9 +- .../InstrumentationWithActivitySource.cs | 2 +- ...penTelemetry.Exporter.Demo.Tracing.csproj} | 2 +- .../Controllers/HomeController.cs | 2 +- ...Integration.Tests.AspNetCoreWebApp.csproj} | 1 + .../Program.cs | 2 +- .../Startup.cs | 2 +- .../appsettings.Development.json | 0 .../appsettings.json | 0 .../BasicTests.cs | 2 +- .../Integration.Tests.csproj} | 10 ++- .../OpenTelemetryTests.cs | 4 +- .../Properties/AssemblyInfo.cs | 0 .../TestFramework/MockTransmitter.cs | 4 +- .../OpenTelemetryWebApplicationFactory.cs | 4 +- .../xunit.runner.json | 0 .../AzureMonitorConverterTests.cs | 18 ++-- .../AzureMonitorTraceExporterTests.cs | 2 +- .../ConnectionStringParserTests.cs | 2 +- .../ConnectionStringParser_BuildUriTests.cs | 2 +- .../ConnectionString/ConnectionStringTests.cs | 24 +++--- .../ExceptionExtensionsTests.cs | 2 +- .../HttpHelperTests.cs | 2 +- ...nitor.OpenTelemetry.Exporter.Tests.csproj} | 4 +- .../NDJsonWriterTests.cs | 2 +- .../StubException.cs | 2 +- .../TagsExtensionTests.cs | 6 +- .../src/Properties/AssemblyInfo.cs | 10 --- sdk/monitor/ci.yml | 4 +- 98 files changed, 207 insertions(+), 186 deletions(-) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/CHANGELOG.md (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/Directory.Build.props (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/OpenTelemetry.Exporter.AzureMonitor.sln => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln} (69%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/README.md (90%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/api/OpenTelemetry.Exporter.AzureMonitor.netstandard2.0.cs => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs} (65%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ActivityExtensions.cs (92%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ApplicationInsightsRestClient.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/AzureMonitorConverter.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/AzureMonitorExporterHelperExtensions.cs (95%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/AzureMonitorExporterOptions.cs (90%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/AzureMonitorTraceExporter.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/AzureMonitorTraceExporterEventSource.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/AzureMonitorTransmitter.cs (92%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ConnectionString/ConnectionStringParser.cs (85%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ConnectionString/Constants.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/EventLevelSuffix.cs (87%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ExceptionExtensions.cs (94%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/ApplicationInsightsRestClient.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/AvailabilityData.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/AvailabilityData.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/ContextTagKeys.cs (99%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/DataPointType.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MessageData.Serialization.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MessageData.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MetricDataPoint.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MetricDataPoint.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MetricsData.Serialization.cs (94%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MetricsData.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MonitorBase.Serialization.cs (92%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MonitorBase.cs (91%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MonitorDomain.Serialization.cs (88%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/MonitorDomain.cs (90%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/PageViewData.Serialization.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/PageViewData.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/PageViewPerfData.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/PageViewPerfData.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/RemoteDependencyData.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/RemoteDependencyData.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/RequestData.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/RequestData.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/SeverityLevel.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/StackFrame.Serialization.cs (94%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/StackFrame.cs (95%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryErrorDetails.Serialization.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryErrorDetails.cs (95%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryEventData.Serialization.cs (95%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryEventData.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryExceptionData.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryExceptionData.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryExceptionDetails.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryItem.Serialization.cs (96%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TelemetryItem.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TrackResponse.Serialization.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/Generated/Models/TrackResponse.cs (95%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/HttpHelper.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ITransmitter.cs (80%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/IngestionResponsePolicy.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/src/OpenTelemetry.Exporter.AzureMonitor.csproj => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.csproj} (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/NDJsonWriter.cs (94%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/PartBType.cs (82%) create mode 100644 sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Properties/AssemblyInfo.cs rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/ResponseStatusCodes.cs (91%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/SdkVersionUtils.cs (88%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/SemanticConventions.cs (99%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/StringExtensions.cs (84%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/TagsExtension.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/TelemetryType.cs (78%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor => Microsoft.Azure.Monitor.OpenTelemetry.Exporter}/src/autorest.md (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing}/DemoTrace.cs (66%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing}/InstrumentationWithActivitySource.cs (99%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj} (68%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp}/Controllers/HomeController.cs (94%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp.csproj => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Integration.Tests.AspNetCoreWebApp.csproj} (91%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp}/Program.cs (82%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp}/Startup.cs (93%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp}/appsettings.Development.json (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp}/appsettings.json (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests}/BasicTests.cs (94%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.csproj => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/Integration.Tests.csproj} (71%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests}/OpenTelemetryTests.cs (93%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests}/Properties/AssemblyInfo.cs (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests}/TestFramework/MockTransmitter.cs (83%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests}/TestFramework/OpenTelemetryWebApplicationFactory.cs (93%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests}/xunit.runner.json (100%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/AzureMonitorConverterTests.cs (90%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/AzureMonitorTraceExporterTests.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/ConnectionString/ConnectionStringParserTests.cs (98%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/ConnectionString/ConnectionStringParser_BuildUriTests.cs (97%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/ConnectionString/ConnectionStringTests.cs (72%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/ExceptionExtensionsTests.cs (95%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/HttpHelperTests.cs (99%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/OpenTelemetry.Exporter.AzureMonitor.Tests.csproj => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj} (74%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/NDJsonWriterTests.cs (92%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/StubException.cs (90%) rename sdk/monitor/{OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest}/TagsExtensionTests.cs (94%) delete mode 100644 sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Properties/AssemblyInfo.cs diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/CHANGELOG.md b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/CHANGELOG.md rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/Directory.Build.props b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Directory.Build.props similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/Directory.Build.props rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Directory.Build.props diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/OpenTelemetry.Exporter.AzureMonitor.sln b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln similarity index 69% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/OpenTelemetry.Exporter.AzureMonitor.sln rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln index 557666f2c7d6..d5856e41507f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/OpenTelemetry.Exporter.AzureMonitor.sln +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln @@ -5,15 +5,15 @@ VisualStudioVersion = 16.0.30330.147 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{8052009B-2126-44A3-88CD-4F3B17894C64}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor", "src\OpenTelemetry.Exporter.AzureMonitor.csproj", "{00677EDC-1C5C-4C62-BEFD-9CF1D87195EA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter", "src\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.csproj", "{00677EDC-1C5C-4C62-BEFD-9CF1D87195EA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing", "tests\OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing\OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj", "{966EFB72-64D7-46D8-B592-9C141C5703F9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj", "{966EFB72-64D7-46D8-B592-9C141C5703F9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Tests", "tests\OpenTelemetry.Exporter.AzureMonitor.UnitTest\OpenTelemetry.Exporter.AzureMonitor.Tests.csproj", "{14546496-6144-49A5-9431-09611F38D30E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj", "{14546496-6144-49A5-9431-09611F38D30E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp", "tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp.csproj", "{E00C15D6-96E5-4A3B-8701-AC24292301CE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Integration.Tests.AspNetCoreWebApp", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp\Integration.Tests.AspNetCoreWebApp.csproj", "{E00C15D6-96E5-4A3B-8701-AC24292301CE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Integration.Tests", "tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.csproj", "{3CB1B19D-1155-4E4E-9D97-3A7B2926DE2E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Integration.Tests", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests\Integration.Tests.csproj", "{3CB1B19D-1155-4E4E-9D97-3A7B2926DE2E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/README.md b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/README.md similarity index 90% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/README.md rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/README.md index d9c38d438d1c..ea489fb05357 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/README.md +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/README.md @@ -14,7 +14,7 @@ The [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet) Install the Azure Monitor Exporter for OpenTelemetry .NET with NuGet: ```shell -dotnet add package OpenTelemetry.Exporter.AzureMonitor +dotnet add package Microsoft.Azure.Monitor.OpenTelemetry.Exporter ``` ### Authenticate the client @@ -26,10 +26,10 @@ This exporter sends traces to the configured Azure Monitor Resource using HTTPS. ## Examples -Refer to [`DemoTrace.cs`](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/DemoTrace.cs) for a complete demo. +Refer to [`DemoTrace.cs`](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/DemoTrace.cs) for a complete demo. ```csharp -using OpenTelemetry.Exporter.AzureMonitor; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter; using OpenTelemetry.Trace; OpenTelemetry.Sdk.CreateTracerProviderBuilder() diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/api/OpenTelemetry.Exporter.AzureMonitor.netstandard2.0.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs similarity index 65% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/api/OpenTelemetry.Exporter.AzureMonitor.netstandard2.0.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs index bd50796b113a..548a335eef07 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/api/OpenTelemetry.Exporter.AzureMonitor.netstandard2.0.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs @@ -1,8 +1,8 @@ -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public static partial class AzureMonitorExporterHelperExtensions { - public static OpenTelemetry.Trace.TracerProviderBuilder AddAzureMonitorTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configure = null) { throw null; } + public static OpenTelemetry.Trace.TracerProviderBuilder AddAzureMonitorTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action configure = null) { throw null; } } public partial class AzureMonitorExporterOptions : Azure.Core.ClientOptions { @@ -13,13 +13,13 @@ public AzureMonitorExporterOptions() { } } public partial class AzureMonitorTraceExporter : OpenTelemetry.Trace.ActivityExporter { - public AzureMonitorTraceExporter(OpenTelemetry.Exporter.AzureMonitor.AzureMonitorExporterOptions options) { } + public AzureMonitorTraceExporter(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions options) { } public override OpenTelemetry.Trace.ExportResult Export(in OpenTelemetry.Batch batch) { throw null; } } } -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { - public partial class AvailabilityData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class AvailabilityData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public AvailabilityData(int version, string id, string name, string duration, bool success) : base (default(int)) { } public string Duration { get { throw null; } } @@ -32,36 +32,36 @@ public AvailabilityData(int version, string id, string name, string duration, bo public bool Success { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DataPointType : System.IEquatable + public readonly partial struct DataPointType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public DataPointType(string value) { throw null; } - public static OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType Aggregation { get { throw null; } } - public static OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType Measurement { get { throw null; } } - public bool Equals(OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType other) { throw null; } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType Aggregation { get { throw null; } } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType Measurement { get { throw null; } } + public bool Equals(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType left, OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType right) { throw null; } - public static implicit operator OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType (string value) { throw null; } - public static bool operator !=(OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType left, OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType right) { throw null; } + public static bool operator ==(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType left, Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType right) { throw null; } + public static implicit operator Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType (string value) { throw null; } + public static bool operator !=(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType left, Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType right) { throw null; } public override string ToString() { throw null; } } - public partial class MessageData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class MessageData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public MessageData(int version, string message) : base (default(int)) { } public System.Collections.Generic.IDictionary Measurements { get { throw null; } } public string Message { get { throw null; } } public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel? SeverityLevel { get { throw null; } set { } } + public Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel? SeverityLevel { get { throw null; } set { } } } public partial class MetricDataPoint { public MetricDataPoint(string name, double value) { } public int? Count { get { throw null; } set { } } - public OpenTelemetry.Exporter.AzureMonitor.Models.DataPointType? DataPointType { get { throw null; } set { } } + public Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.DataPointType? DataPointType { get { throw null; } set { } } public double? Max { get { throw null; } set { } } public double? Min { get { throw null; } set { } } public string Name { get { throw null; } } @@ -69,16 +69,16 @@ public MetricDataPoint(string name, double value) { } public double? StdDev { get { throw null; } set { } } public double Value { get { throw null; } } } - public partial class MetricsData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class MetricsData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { - public MetricsData(int version, System.Collections.Generic.IEnumerable metrics) : base (default(int)) { } - public System.Collections.Generic.IList Metrics { get { throw null; } } + public MetricsData(int version, System.Collections.Generic.IEnumerable metrics) : base (default(int)) { } + public System.Collections.Generic.IList Metrics { get { throw null; } } public System.Collections.Generic.IDictionary Properties { get { throw null; } } } public partial class MonitorBase { public MonitorBase() { } - public OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain BaseData { get { throw null; } set { } } + public Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain BaseData { get { throw null; } set { } } public string BaseType { get { throw null; } set { } } } public partial class MonitorDomain @@ -86,7 +86,7 @@ public partial class MonitorDomain public MonitorDomain(int version) { } public int Version { get { throw null; } } } - public partial class PageViewData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class PageViewData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public PageViewData(int version, string id, string name) : base (default(int)) { } public string Duration { get { throw null; } set { } } @@ -97,7 +97,7 @@ public PageViewData(int version, string id, string name) : base (default(int)) { public string ReferredUri { get { throw null; } set { } } public string Url { get { throw null; } set { } } } - public partial class PageViewPerfData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class PageViewPerfData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public PageViewPerfData(int version, string id, string name) : base (default(int)) { } public string DomProcessing { get { throw null; } set { } } @@ -112,7 +112,7 @@ public PageViewPerfData(int version, string id, string name) : base (default(int public string SentRequest { get { throw null; } set { } } public string Url { get { throw null; } set { } } } - public partial class RemoteDependencyData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class RemoteDependencyData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public RemoteDependencyData(int version, string name, string duration) : base (default(int)) { } public string Data { get { throw null; } set { } } @@ -126,7 +126,7 @@ public RemoteDependencyData(int version, string name, string duration) : base (d public string Target { get { throw null; } set { } } public string Type { get { throw null; } set { } } } - public partial class RequestData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class RequestData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public RequestData(int version, string id, string duration, bool success, string responseCode) : base (default(int)) { } public string Duration { get { throw null; } } @@ -140,24 +140,24 @@ public RequestData(int version, string id, string duration, bool success, string public string Url { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SeverityLevel : System.IEquatable + public readonly partial struct SeverityLevel : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public SeverityLevel(string value) { throw null; } - public static OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel Critical { get { throw null; } } - public static OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel Error { get { throw null; } } - public static OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel Information { get { throw null; } } - public static OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel Verbose { get { throw null; } } - public static OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel Warning { get { throw null; } } - public bool Equals(OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel other) { throw null; } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel Critical { get { throw null; } } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel Error { get { throw null; } } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel Information { get { throw null; } } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel Verbose { get { throw null; } } + public static Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel Warning { get { throw null; } } + public bool Equals(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel left, OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel right) { throw null; } - public static implicit operator OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel (string value) { throw null; } - public static bool operator !=(OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel left, OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel right) { throw null; } + public static bool operator ==(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel left, Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel right) { throw null; } + public static implicit operator Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel (string value) { throw null; } + public static bool operator !=(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel left, Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel right) { throw null; } public override string ToString() { throw null; } } public partial class StackFrame @@ -176,21 +176,21 @@ internal TelemetryErrorDetails() { } public string Message { get { throw null; } } public int? StatusCode { get { throw null; } } } - public partial class TelemetryEventData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class TelemetryEventData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { public TelemetryEventData(int version, string name) : base (default(int)) { } public System.Collections.Generic.IDictionary Measurements { get { throw null; } } public string Name { get { throw null; } } public System.Collections.Generic.IDictionary Properties { get { throw null; } } } - public partial class TelemetryExceptionData : OpenTelemetry.Exporter.AzureMonitor.Models.MonitorDomain + public partial class TelemetryExceptionData : Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorDomain { - public TelemetryExceptionData(int version, System.Collections.Generic.IEnumerable exceptions) : base (default(int)) { } - public System.Collections.Generic.IList Exceptions { get { throw null; } } + public TelemetryExceptionData(int version, System.Collections.Generic.IEnumerable exceptions) : base (default(int)) { } + public System.Collections.Generic.IList Exceptions { get { throw null; } } public System.Collections.Generic.IDictionary Measurements { get { throw null; } } public string ProblemId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public OpenTelemetry.Exporter.AzureMonitor.Models.SeverityLevel? SeverityLevel { get { throw null; } set { } } + public Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.SeverityLevel? SeverityLevel { get { throw null; } set { } } } public partial class TelemetryExceptionDetails { @@ -199,14 +199,14 @@ public TelemetryExceptionDetails(string message) { } public int? Id { get { throw null; } set { } } public string Message { get { throw null; } } public int? OuterId { get { throw null; } set { } } - public System.Collections.Generic.IList ParsedStack { get { throw null; } } + public System.Collections.Generic.IList ParsedStack { get { throw null; } } public string Stack { get { throw null; } set { } } public string TypeName { get { throw null; } set { } } } public partial class TelemetryItem { public TelemetryItem(string name, string time) { } - public OpenTelemetry.Exporter.AzureMonitor.Models.MonitorBase Data { get { throw null; } set { } } + public Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models.MonitorBase Data { get { throw null; } set { } } public string InstrumentationKey { get { throw null; } set { } } public string Name { get { throw null; } } public float? SampleRate { get { throw null; } set { } } @@ -218,7 +218,7 @@ public TelemetryItem(string name, string time) { } public partial class TrackResponse { internal TrackResponse() { } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public int? ItemsAccepted { get { throw null; } } public int? ItemsReceived { get { throw null; } } } diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ActivityExtensions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ActivityExtensions.cs similarity index 92% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ActivityExtensions.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ActivityExtensions.cs index 5a2b3324da2c..fbfe9f7d8b44 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ActivityExtensions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ActivityExtensions.cs @@ -3,7 +3,7 @@ using System.Diagnostics; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal static class ActivityExtensions { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ApplicationInsightsRestClient.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ApplicationInsightsRestClient.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ApplicationInsightsRestClient.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ApplicationInsightsRestClient.cs index 5ecfce88a19a..80a80147ce04 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ApplicationInsightsRestClient.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ApplicationInsightsRestClient.cs @@ -6,9 +6,9 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal partial class ApplicationInsightsRestClient { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorConverter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorConverter.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorConverter.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorConverter.cs index ab727657c3cd..5a6867b6be3a 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorConverter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorConverter.cs @@ -8,11 +8,13 @@ using System.Linq; using System.Runtime.CompilerServices; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; + +using OpenTelemetry; using OpenTelemetry.Resources; using OpenTelemetry.Trace; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { /// /// This class is responsible for converting an OpenTelemetry of diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorExporterHelperExtensions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs similarity index 95% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorExporterHelperExtensions.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs index 281bf2522ef0..c45bac4b6bd8 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorExporterHelperExtensions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs @@ -4,7 +4,7 @@ using OpenTelemetry.Trace; using System; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { /// /// test diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorExporterOptions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterOptions.cs similarity index 90% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorExporterOptions.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterOptions.cs index 2482659b3865..e5880b678a47 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorExporterOptions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterOptions.cs @@ -3,7 +3,7 @@ using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public class AzureMonitorExporterOptions : ClientOptions { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTraceExporter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTraceExporter.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs index 8bbbafabdb35..95d1eda8a3c4 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTraceExporter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs @@ -7,9 +7,10 @@ using Azure.Core.Pipeline; +using OpenTelemetry; using OpenTelemetry.Trace; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public class AzureMonitorTraceExporter : ActivityExporter { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTraceExporterEventSource.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporterEventSource.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTraceExporterEventSource.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporterEventSource.cs index 3393a3f74a6f..d33e74a920d6 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTraceExporterEventSource.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporterEventSource.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Diagnostics.Tracing; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { [EventSource(Name = EventSourceName)] internal sealed class AzureMonitorTraceExporterEventSource : EventSource diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTransmitter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTransmitter.cs similarity index 92% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTransmitter.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTransmitter.cs index 89eacf56812f..fabba6b2f933 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/AzureMonitorTransmitter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTransmitter.cs @@ -5,13 +5,14 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; + using Azure.Core; using Azure.Core.Pipeline; -using OpenTelemetry.Exporter.AzureMonitor.ConnectionString; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { /// /// This class encapsulates transmitting a collection of to the configured Ingestion Endpoint. diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ConnectionString/ConnectionStringParser.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ConnectionString/ConnectionStringParser.cs similarity index 85% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ConnectionString/ConnectionStringParser.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ConnectionString/ConnectionStringParser.cs index 5f5b6ae26e4f..17fdc6853ad5 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ConnectionString/ConnectionStringParser.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ConnectionString/ConnectionStringParser.cs @@ -4,7 +4,10 @@ using System; using System.Linq; -namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString +// This alias is necessary because it will otherwise try to default to "Microsoft.Azure.Core" which doesn't exist. +using AzureCoreConnectionString = Azure.Core.ConnectionString; + +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString { internal static class ConnectionStringParser { @@ -31,7 +34,7 @@ public static void GetValues(string connectionString, out string instrumentation throw new ArgumentOutOfRangeException(nameof(connectionString), $"Values greater than {Constants.ConnectionStringMaxLength} characters are not allowed."); } - var connString = Azure.Core.ConnectionString.Parse(connectionString); + var connString = AzureCoreConnectionString.Parse(connectionString); instrumentationKey = connString.GetInstrumentationKey(); ingestionEndpoint = connString.GetIngestionEndpoint(); } @@ -42,7 +45,7 @@ public static void GetValues(string connectionString, out string instrumentation } } - internal static string GetInstrumentationKey(this Azure.Core.ConnectionString connectionString) => connectionString.GetRequired(Constants.InstrumentationKeyKey); + internal static string GetInstrumentationKey(this AzureCoreConnectionString connectionString) => connectionString.GetRequired(Constants.InstrumentationKeyKey); /// /// Evaluate connection string and return the requested endpoint. @@ -54,7 +57,7 @@ public static void GetValues(string connectionString, out string instrumentation /// 3. use default endpoint (location is ignored) /// This behavior is required by the Connection String Specification. /// - internal static string GetIngestionEndpoint(this Azure.Core.ConnectionString connectionString) + internal static string GetIngestionEndpoint(this AzureCoreConnectionString connectionString) { // Passing the user input values through the Uri constructor will verify that we've built a valid endpoint. Uri uri; @@ -116,9 +119,9 @@ internal static bool TryBuildUri(string prefix, string suffix, out Uri uri, stri } /// - /// This method wraps in a null check. + /// This method wraps in a null check. /// - internal static bool TryGetNonRequiredValue(this Azure.Core.ConnectionString connectionString, string key, out string value) + internal static bool TryGetNonRequiredValue(this AzureCoreConnectionString connectionString, string key, out string value) { value = connectionString.GetNonRequired(key); return value != null; diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ConnectionString/Constants.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ConnectionString/Constants.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ConnectionString/Constants.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ConnectionString/Constants.cs index 0efb55741a00..35eabed67aab 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ConnectionString/Constants.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ConnectionString/Constants.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString { internal static class Constants { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/EventLevelSuffix.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/EventLevelSuffix.cs similarity index 87% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/EventLevelSuffix.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/EventLevelSuffix.cs index abf1a1e9a2db..e3d437d05a21 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/EventLevelSuffix.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/EventLevelSuffix.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal class EventLevelSuffix { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ExceptionExtensions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ExceptionExtensions.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ExceptionExtensions.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ExceptionExtensions.cs index 987749951de3..6f8e0e43a3f0 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ExceptionExtensions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ExceptionExtensions.cs @@ -5,7 +5,7 @@ using System.Globalization; using System.Threading; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal static class ExceptionExtensions { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/ApplicationInsightsRestClient.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/ApplicationInsightsRestClient.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/ApplicationInsightsRestClient.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/ApplicationInsightsRestClient.cs index b8c580838b5e..eb904753b059 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/ApplicationInsightsRestClient.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/ApplicationInsightsRestClient.cs @@ -13,9 +13,9 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal partial class ApplicationInsightsRestClient { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/AvailabilityData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/AvailabilityData.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/AvailabilityData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/AvailabilityData.Serialization.cs index 195c332f0f1c..30ca5f6361cc 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/AvailabilityData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/AvailabilityData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class AvailabilityData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/AvailabilityData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/AvailabilityData.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/AvailabilityData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/AvailabilityData.cs index ab50f9952047..e62e53c95ef2 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/AvailabilityData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/AvailabilityData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Instances of AvailabilityData represent the result of executing an availability test. public partial class AvailabilityData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/ContextTagKeys.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/ContextTagKeys.cs similarity index 99% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/ContextTagKeys.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/ContextTagKeys.cs index 31993618e83d..44322173e81a 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/ContextTagKeys.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/ContextTagKeys.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// The context tag keys. internal readonly partial struct ContextTagKeys : IEquatable diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/DataPointType.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/DataPointType.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/DataPointType.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/DataPointType.cs index b6f097301751..affec114c66e 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/DataPointType.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/DataPointType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Type of the metric data measurement. public readonly partial struct DataPointType : IEquatable diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MessageData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MessageData.Serialization.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MessageData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MessageData.Serialization.cs index 9e28962bdaef..9cdaa124a514 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MessageData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MessageData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class MessageData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MessageData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MessageData.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MessageData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MessageData.cs index 777e151db63f..2241388457bf 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MessageData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MessageData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into instances of this type. The message does not have measurements. public partial class MessageData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricDataPoint.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricDataPoint.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricDataPoint.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricDataPoint.Serialization.cs index 25c708b74124..f31b0593264f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricDataPoint.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricDataPoint.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class MetricDataPoint : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricDataPoint.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricDataPoint.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricDataPoint.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricDataPoint.cs index c7632d1da6d6..128a5b4e0f2d 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricDataPoint.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricDataPoint.cs @@ -7,7 +7,7 @@ using System; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Metric data single measurement. public partial class MetricDataPoint diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricsData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricsData.Serialization.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricsData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricsData.Serialization.cs index 2f7369a996d3..3249ebd50c2f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricsData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricsData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class MetricsData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricsData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricsData.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricsData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricsData.cs index 7848d6a94e77..ffcc1c600aa6 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MetricsData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MetricsData.cs @@ -10,7 +10,7 @@ using System.Linq; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// An instance of the Metric item is a list of measurements (single data points) and/or aggregations. public partial class MetricsData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorBase.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorBase.Serialization.cs similarity index 92% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorBase.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorBase.Serialization.cs index 68e22252efda..458059e905ad 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorBase.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorBase.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class MonitorBase : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorBase.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorBase.cs similarity index 91% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorBase.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorBase.cs index 7ebc3689f1d2..0c76febd11cc 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorBase.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorBase.cs @@ -5,7 +5,7 @@ #nullable disable -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Data struct to contain only C section with custom fields. public partial class MonitorBase diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorDomain.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorDomain.Serialization.cs similarity index 88% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorDomain.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorDomain.Serialization.cs index 85fad62b166e..7750e6805535 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorDomain.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorDomain.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class MonitorDomain : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorDomain.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorDomain.cs similarity index 90% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorDomain.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorDomain.cs index fa1b231a4c6c..10142e1d88e5 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/MonitorDomain.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/MonitorDomain.cs @@ -5,7 +5,7 @@ #nullable disable -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// The abstract common base of all domains. public partial class MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewData.Serialization.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewData.Serialization.cs index 83b8cb403702..578922962c1a 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class PageViewData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewData.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewData.cs index 1e9637579608..539ff109ec2b 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView. public partial class PageViewData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewPerfData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewPerfData.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewPerfData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewPerfData.Serialization.cs index b520e3b4c0bf..e37c392e8c1f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewPerfData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewPerfData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class PageViewPerfData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewPerfData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewPerfData.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewPerfData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewPerfData.cs index 113282a30d95..808f81dcf768 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/PageViewPerfData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/PageViewPerfData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request. public partial class PageViewPerfData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RemoteDependencyData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RemoteDependencyData.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RemoteDependencyData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RemoteDependencyData.Serialization.cs index bc0da94456f3..e17fbc9aac37 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RemoteDependencyData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RemoteDependencyData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class RemoteDependencyData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RemoteDependencyData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RemoteDependencyData.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RemoteDependencyData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RemoteDependencyData.cs index 7904d351bee1..d7ed2dcc1544 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RemoteDependencyData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RemoteDependencyData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint. public partial class RemoteDependencyData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RequestData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RequestData.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RequestData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RequestData.Serialization.cs index 537f9b78e43e..08a53cee0b22 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RequestData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RequestData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class RequestData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RequestData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RequestData.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RequestData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RequestData.cs index e079a7146284..03bd7885757d 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/RequestData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/RequestData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// An instance of Request represents completion of an external request to the application to do work and contains a summary of that request execution and the results. public partial class RequestData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/SeverityLevel.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/SeverityLevel.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/SeverityLevel.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/SeverityLevel.cs index 7f9fde9107e7..f6f9efbb3173 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/SeverityLevel.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/SeverityLevel.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Defines the level of severity for the event. public readonly partial struct SeverityLevel : IEquatable diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/StackFrame.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/StackFrame.Serialization.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/StackFrame.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/StackFrame.Serialization.cs index ba73a941dadd..e2d1ec8860d5 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/StackFrame.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/StackFrame.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class StackFrame : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/StackFrame.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/StackFrame.cs similarity index 95% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/StackFrame.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/StackFrame.cs index f5be4250f62e..9a108def8c23 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/StackFrame.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/StackFrame.cs @@ -7,7 +7,7 @@ using System; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Stack frame information. public partial class StackFrame diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryErrorDetails.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryErrorDetails.Serialization.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryErrorDetails.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryErrorDetails.Serialization.cs index 4a624c236a67..5fb870ad490f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryErrorDetails.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryErrorDetails.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class TelemetryErrorDetails { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryErrorDetails.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryErrorDetails.cs similarity index 95% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryErrorDetails.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryErrorDetails.cs index 26e66910c9f9..9f3a8e7642fd 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryErrorDetails.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryErrorDetails.cs @@ -5,7 +5,7 @@ #nullable disable -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// The error details. public partial class TelemetryErrorDetails diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryEventData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryEventData.Serialization.cs similarity index 95% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryEventData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryEventData.Serialization.cs index 4a282488027c..3ea7814a9404 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryEventData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryEventData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class TelemetryEventData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryEventData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryEventData.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryEventData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryEventData.cs index a1dd65aaade4..a9402e4459f9 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryEventData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryEventData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name. public partial class TelemetryEventData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionData.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionData.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionData.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionData.Serialization.cs index 9aa35db7e901..5accb581cb4f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionData.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionData.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class TelemetryExceptionData : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionData.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionData.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionData.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionData.cs index 4238f3ad30f2..e0978c8726cf 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionData.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionData.cs @@ -10,7 +10,7 @@ using System.Linq; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application. public partial class TelemetryExceptionData : MonitorDomain diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs index 95cee0ce3ed7..6a1d4023826f 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionDetails.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class TelemetryExceptionDetails : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionDetails.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionDetails.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionDetails.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionDetails.cs index b7f5b3bca1e4..9ebc39cecc74 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryExceptionDetails.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryExceptionDetails.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Exception details of the exception in a chain. public partial class TelemetryExceptionDetails diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryItem.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryItem.Serialization.cs similarity index 96% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryItem.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryItem.Serialization.cs index 530b2c989963..226d3d4c5414 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryItem.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryItem.Serialization.cs @@ -8,7 +8,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class TelemetryItem : IUtf8JsonSerializable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryItem.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryItem.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryItem.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryItem.cs index cd4eec2bbbe0..308b04234ac3 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TelemetryItem.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TelemetryItem.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// System variables for a telemetry item. public partial class TelemetryItem diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TrackResponse.Serialization.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TrackResponse.Serialization.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TrackResponse.Serialization.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TrackResponse.Serialization.cs index a7f353960380..ad3a39326323 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TrackResponse.Serialization.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TrackResponse.Serialization.cs @@ -9,7 +9,7 @@ using System.Text.Json; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { public partial class TrackResponse { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TrackResponse.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TrackResponse.cs similarity index 95% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TrackResponse.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TrackResponse.cs index 346b16b0d95b..9b74646e5162 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Generated/Models/TrackResponse.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Models/TrackResponse.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure.Core; -namespace OpenTelemetry.Exporter.AzureMonitor.Models +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models { /// Response containing the status of each telemetry item. public partial class TrackResponse diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/HttpHelper.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/HttpHelper.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/HttpHelper.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/HttpHelper.cs index b58877043af7..2520cd171428 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/HttpHelper.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/HttpHelper.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal class HttpHelper { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ITransmitter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ITransmitter.cs similarity index 80% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ITransmitter.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ITransmitter.cs index a88430585df0..2431787060ea 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ITransmitter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ITransmitter.cs @@ -5,9 +5,9 @@ using System.Threading; using System.Threading.Tasks; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal interface ITransmitter { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/IngestionResponsePolicy.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/IngestionResponsePolicy.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/IngestionResponsePolicy.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/IngestionResponsePolicy.cs index 5abf69797597..85c23d5f40df 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/IngestionResponsePolicy.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/IngestionResponsePolicy.cs @@ -4,12 +4,14 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; + using Azure; using Azure.Core; using Azure.Core.Pipeline; -using OpenTelemetry.Exporter.AzureMonitor.Models; -namespace OpenTelemetry.Exporter.AzureMonitor +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; + +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal class IngestionResponsePolicy : HttpPipelineSynchronousPolicy { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/OpenTelemetry.Exporter.AzureMonitor.csproj b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.csproj similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/OpenTelemetry.Exporter.AzureMonitor.csproj rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.csproj diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/NDJsonWriter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/NDJsonWriter.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/NDJsonWriter.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/NDJsonWriter.cs index 63db11c4b9df..12709878292c 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/NDJsonWriter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/NDJsonWriter.cs @@ -5,7 +5,7 @@ using System.IO; using System.Text.Json; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal class NDJsonWriter: IDisposable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/PartBType.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/PartBType.cs similarity index 82% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/PartBType.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/PartBType.cs index 816b41cfba05..a352616fd765 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/PartBType.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/PartBType.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal enum PartBType { diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Properties/AssemblyInfo.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..8159861eae93 --- /dev/null +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/Properties/AssemblyInfo.cs @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: InternalsVisibleTo("Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Moq +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ResponseStatusCodes.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ResponseStatusCodes.cs similarity index 91% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ResponseStatusCodes.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ResponseStatusCodes.cs index 4123265c7f10..807b136c1d94 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/ResponseStatusCodes.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/ResponseStatusCodes.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal class ResponseStatusCodes { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/SdkVersionUtils.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/SdkVersionUtils.cs similarity index 88% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/SdkVersionUtils.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/SdkVersionUtils.cs index a35c3946c1ea..79b8b2afe13e 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/SdkVersionUtils.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/SdkVersionUtils.cs @@ -6,7 +6,9 @@ using System.Linq; using System.Reflection; -namespace OpenTelemetry.Exporter.AzureMonitor +using OpenTelemetrySdk = OpenTelemetry.Sdk; + +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal static class SdkVersionUtils { @@ -17,8 +19,8 @@ private static string GetSdkVersion() try { Version dotnetSdkVersion = GetVersion(typeof(object)); - Version otelSdkVersion = GetVersion(typeof(OpenTelemetry.Sdk)); - Version extensionVersion = GetVersion(typeof(OpenTelemetry.Exporter.AzureMonitor.AzureMonitorTraceExporter)); + Version otelSdkVersion = GetVersion(typeof(OpenTelemetrySdk)); + Version extensionVersion = GetVersion(typeof(AzureMonitorTraceExporter)); return string.Format(CultureInfo.InvariantCulture, $"dotnet{dotnetSdkVersion.ToString(2)}:otel{otelSdkVersion.ToString(3)}:ext{extensionVersion.ToString(3)}"); } diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/SemanticConventions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/SemanticConventions.cs similarity index 99% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/SemanticConventions.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/SemanticConventions.cs index ef10e5b0d5ea..178d4d54a007 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/SemanticConventions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/SemanticConventions.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { /// /// Constants for semantic attribute names outlined by the OpenTelemetry specifications. diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/StringExtensions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/StringExtensions.cs similarity index 84% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/StringExtensions.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/StringExtensions.cs index 358daafd0f83..6edf51fae483 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/StringExtensions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/StringExtensions.cs @@ -3,7 +3,7 @@ using System; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal static class StringExtensions { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/TagsExtension.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/TagsExtension.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/TagsExtension.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/TagsExtension.cs index 8c404f32a883..a8e8a5f1fce6 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/TagsExtension.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/TagsExtension.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal static class TagsExtension { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/TelemetryType.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryType.cs similarity index 78% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/TelemetryType.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryType.cs index 7029de10adb4..458c1f2861cc 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/TelemetryType.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/TelemetryType.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal enum TelemetryType { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/autorest.md b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/autorest.md similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/autorest.md rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/autorest.md diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/DemoTrace.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/DemoTrace.cs similarity index 66% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/DemoTrace.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/DemoTrace.cs index 49456c2b6cfb..0dd242038590 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/DemoTrace.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/DemoTrace.cs @@ -4,7 +4,10 @@ using OpenTelemetry.Resources; using System.Diagnostics; -namespace OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing +// This alias is necessary because it will otherwise try to default to "Microsoft.Azure.Monitor.OpenTelemetry.Sdk" which doesn't exist. +using OpenTelemetrySdk = OpenTelemetry.Sdk; + +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing { public static class DemoTrace { @@ -12,8 +15,8 @@ public static class DemoTrace public static void Main() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource("my-service", "roleinstance1", "my-namespace"); - using var tracerProvider = OpenTelemetry.Sdk.CreateTracerProviderBuilder() + var resource = Resources.CreateServiceResource("my-service", "roleinstance1", "my-namespace"); + using var tracerProvider = OpenTelemetrySdk.CreateTracerProviderBuilder() .SetResource(resource) .AddSource("Demo.DemoServer") .AddSource("Demo.DemoClient") diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/InstrumentationWithActivitySource.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/InstrumentationWithActivitySource.cs similarity index 99% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/InstrumentationWithActivitySource.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/InstrumentationWithActivitySource.cs index 72c7f5cd9622..1fba50975160 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/InstrumentationWithActivitySource.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/InstrumentationWithActivitySource.cs @@ -12,7 +12,7 @@ using System.Threading; using System.Threading.Tasks; -namespace OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing { internal class InstrumentationWithActivitySource : IDisposable { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj similarity index 68% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj index f8e8b4516b1d..438af0e89b6b 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj @@ -6,7 +6,7 @@ - + diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Controllers/HomeController.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Controllers/HomeController.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Controllers/HomeController.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Controllers/HomeController.cs index 739b0701204b..4f8e91d3c49d 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Controllers/HomeController.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Controllers/HomeController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp { /// /// This controller is used to verify that the IntegrationTests project can send requests to this WebApp and receive responses. diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp.csproj b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Integration.Tests.AspNetCoreWebApp.csproj similarity index 91% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp.csproj rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Integration.Tests.AspNetCoreWebApp.csproj index 2b40e9721cad..e781937af8a8 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp.csproj +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Integration.Tests.AspNetCoreWebApp.csproj @@ -3,6 +3,7 @@ $(RequiredTargetFrameworks) + Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp false diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Program.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Program.cs similarity index 82% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Program.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Program.cs index cc9959e7b79e..c04d6104a66b 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Program.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Program.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp { public class Program { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Startup.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Startup.cs similarity index 93% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Startup.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Startup.cs index 398b496c68f1..d08ffa8e1506 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/Startup.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/Startup.cs @@ -7,7 +7,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp { public class Startup { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/appsettings.Development.json b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/appsettings.Development.json similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/appsettings.Development.json rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/appsettings.Development.json diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/appsettings.json b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/appsettings.json similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp/appsettings.json rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp/appsettings.json diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/BasicTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/BasicTests.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/BasicTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/BasicTests.cs index 1160256a6733..1ae5fde32c6c 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/BasicTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/BasicTests.cs @@ -9,7 +9,7 @@ using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests { /// /// These tests are to verify that the IntegrationTests work (i.e. This project can communicate with the project). diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.csproj b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/Integration.Tests.csproj similarity index 71% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.csproj rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/Integration.Tests.csproj index 6c0648b32030..06d6df92107c 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.csproj +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/Integration.Tests.csproj @@ -1,7 +1,9 @@ - + $(RequiredTargetFrameworks) + Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests + Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests @@ -31,9 +33,9 @@ - - - + + + diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/OpenTelemetryTests.cs similarity index 93% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/OpenTelemetryTests.cs index 098a0a76bfbf..26ef1a331992 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/OpenTelemetryTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/OpenTelemetryTests.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Threading.Tasks; -using OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.TestFramework; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.TestFramework; using Xunit; using Xunit.Abstractions; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests { public class OpenTelemetryTests : IClassFixture> { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/Properties/AssemblyInfo.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/Properties/AssemblyInfo.cs similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/Properties/AssemblyInfo.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/Properties/AssemblyInfo.cs diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/MockTransmitter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/MockTransmitter.cs similarity index 83% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/MockTransmitter.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/MockTransmitter.cs index bc54cfc9ff5e..a59e96475658 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/MockTransmitter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/MockTransmitter.cs @@ -7,9 +7,9 @@ using System.Threading; using System.Threading.Tasks; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.TestFramework +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.TestFramework { public class MockTransmitter : ITransmitter { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs similarity index 93% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs index 73ed8a614172..f23bbd0064d0 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs @@ -7,10 +7,10 @@ using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.DependencyInjection; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; using OpenTelemetry.Trace; -namespace OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.TestFramework +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.TestFramework { /// /// This class implements and will configure the for OpenTelemetry and the . diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/xunit.runner.json b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/xunit.runner.json similarity index 100% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Integration.Tests/xunit.runner.json rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/xunit.runner.json diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/AzureMonitorConverterTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorConverterTests.cs similarity index 90% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/AzureMonitorConverterTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorConverterTests.cs index 734108165a53..8e68490b1cc9 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/AzureMonitorConverterTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorConverterTests.cs @@ -7,10 +7,10 @@ using System.Globalization; using Xunit; -using OpenTelemetry.Exporter.AzureMonitor.Models; +using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; using OpenTelemetry.Resources; -namespace OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing { public class AzureMonitorConverterTests { @@ -41,7 +41,7 @@ public void ExtractRoleInfo_NullResource() [Fact] public void ExtractRoleInfo_Empty() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource(null); + var resource = Resources.CreateServiceResource(null); AzureMonitorConverter.ExtractRoleInfo(resource, out var roleName, out var roleInstance); Assert.Null(roleName); Assert.Null(roleInstance); @@ -50,7 +50,7 @@ public void ExtractRoleInfo_Empty() [Fact] public void ExtractRoleInfo_ServiceName() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource("my-service"); + var resource = Resources.CreateServiceResource("my-service"); AzureMonitorConverter.ExtractRoleInfo(resource, out var roleName, out var roleInstance); Assert.Equal("my-service", roleName); Assert.True(Guid.TryParse(roleInstance, out var guid)); @@ -59,7 +59,7 @@ public void ExtractRoleInfo_ServiceName() [Fact] public void ExtractRoleInfo_ServiceInstance() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource(null, "roleInstance_1"); + var resource = Resources.CreateServiceResource(null, "roleInstance_1"); AzureMonitorConverter.ExtractRoleInfo(resource, out var roleName, out var roleInstance); Assert.Empty(resource.Attributes); Assert.Null(roleName); @@ -69,7 +69,7 @@ public void ExtractRoleInfo_ServiceInstance() [Fact] public void ExtractRoleInfo_ServiceNamespace() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource(null, null, "my-namespace"); + var resource = Resources.CreateServiceResource(null, null, "my-namespace"); AzureMonitorConverter.ExtractRoleInfo(resource, out var roleName, out var roleInstance); Assert.Empty(resource.Attributes); Assert.Null(roleName); @@ -79,7 +79,7 @@ public void ExtractRoleInfo_ServiceNamespace() [Fact] public void ExtractRoleInfo_ServiceNameAndInstance() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource("my-service", "roleInstance_1"); + var resource = Resources.CreateServiceResource("my-service", "roleInstance_1"); AzureMonitorConverter.ExtractRoleInfo(resource, out var roleName, out var roleInstance); Assert.Equal("my-service", roleName); Assert.Equal("roleInstance_1", roleInstance); @@ -88,7 +88,7 @@ public void ExtractRoleInfo_ServiceNameAndInstance() [Fact] public void ExtractRoleInfo_ServiceNameAndInstanceAndNamespace() { - var resource = OpenTelemetry.Resources.Resources.CreateServiceResource("my-service", "roleInstance_1", "my-namespace"); + var resource = Resources.CreateServiceResource("my-service", "roleInstance_1", "my-namespace"); AzureMonitorConverter.ExtractRoleInfo(resource, out var roleName, out var roleInstance); Assert.Equal("my-namespace.my-service", roleName); Assert.Equal("roleInstance_1", roleInstance); @@ -126,7 +126,7 @@ public void GeneratePartAEnvelope_DefaultActivity() public void GeneratePartAEnvelope_ActivityWithRoleInformation() { var activity = CreateTestActivity( - resource: OpenTelemetry.Resources.Resources.CreateServiceResource("BusyWorker", "TEST3650724")); + resource: Resources.CreateServiceResource("BusyWorker", "TEST3650724")); var telemetryItem = AzureMonitorConverter.GeneratePartAEnvelope(activity); Assert.Equal("RemoteDependency", telemetryItem.Name); diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/AzureMonitorTraceExporterTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorTraceExporterTests.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/AzureMonitorTraceExporterTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorTraceExporterTests.cs index 28bdc3c7df9f..c7f4109c3fc7 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/AzureMonitorTraceExporterTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorTraceExporterTests.cs @@ -7,7 +7,7 @@ using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public class AzureMonitorTraceExporterTests { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringParserTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParserTests.cs similarity index 98% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringParserTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParserTests.cs index e24d72417282..5959d1925854 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringParserTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParserTests.cs @@ -4,7 +4,7 @@ using System; using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString { public class ConnectionStringParserTests { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs similarity index 97% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs index cb3532279851..8e2330b02716 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs @@ -4,7 +4,7 @@ using System; using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString { /// /// The method takes user input to construct an endpoint. diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringTests.cs similarity index 72% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringTests.cs index e0d6bb28e01b..5fa51d9d1f46 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ConnectionString/ConnectionStringTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringTests.cs @@ -2,9 +2,13 @@ // Licensed under the MIT License. using System; + using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString +// This alias is necessary because it will otherwise try to default to "Microsoft.Azure.Core" which doesn't exist. +using AzureCoreConnectionString = Azure.Core.ConnectionString; + +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString { /// /// Because we don't own the code for , these tests are to verify expected behavior. @@ -14,7 +18,7 @@ public class ConnectionStringTests [Fact] public void TestParse() { - var test = Azure.Core.ConnectionString.Parse("key1=value1;key2=value2;key3=value3"); + var test = AzureCoreConnectionString.Parse("key1=value1;key2=value2;key3=value3"); Assert.Equal("value1", test.GetRequired("key1")); Assert.Equal("value2", test.GetRequired("key2")); @@ -24,7 +28,7 @@ public void TestParse() [Fact] public void TestParse_WithTrailingSemicolon() { - var test = Azure.Core.ConnectionString.Parse("key1=value1;key2=value2;key3=value3;"); + var test = AzureCoreConnectionString.Parse("key1=value1;key2=value2;key3=value3;"); Assert.Equal("value1", test.GetRequired("key1")); Assert.Equal("value2", test.GetRequired("key2")); @@ -34,7 +38,7 @@ public void TestParse_WithTrailingSemicolon() [Fact] public void TestParse_WithExtraSpaces() { - var test = Azure.Core.ConnectionString.Parse(" key1 = value1 ; key2 = value2 ; key3 =value3 "); + var test = AzureCoreConnectionString.Parse(" key1 = value1 ; key2 = value2 ; key3 =value3 "); Assert.Equal("value1", test.GetRequired("key1")); Assert.Equal("value2", test.GetRequired("key2")); @@ -48,7 +52,7 @@ public void TestParse_WithExtraSpaces() [Fact] public void TestParse_IsCaseInsensitive() { - var test = Azure.Core.ConnectionString.Parse("UPPERCASE=value1;lowercase=value2;MixedCase=value3"); + var test = AzureCoreConnectionString.Parse("UPPERCASE=value1;lowercase=value2;MixedCase=value3"); Assert.Equal("value1", test.GetRequired("UPPERCASE")); Assert.Equal("value1", test.GetRequired("uppercase")); @@ -61,31 +65,31 @@ public void TestParse_IsCaseInsensitive() [Fact] public void TestParse_WithNull() { - Assert.Throws(() => Azure.Core.ConnectionString.Parse(null)); + Assert.Throws(() => AzureCoreConnectionString.Parse(null)); } [Fact] public void TestParse_WithEmptyString() { - Assert.Throws(() => Azure.Core.ConnectionString.Parse(string.Empty)); + Assert.Throws(() => AzureCoreConnectionString.Parse(string.Empty)); } [Fact] public void TestParse_WithDuplaceKeys() { - Assert.Throws(() => Azure.Core.ConnectionString.Parse("key1=value1;key1=value2")); + Assert.Throws(() => AzureCoreConnectionString.Parse("key1=value1;key1=value2")); } [Fact] public void TestParse_WithDuplaceKeysWithSpaces() { - Assert.Throws(() => Azure.Core.ConnectionString.Parse("key1=value1;key1 =value2")); + Assert.Throws(() => AzureCoreConnectionString.Parse("key1=value1;key1 =value2")); } [Fact] public void TestParse_WithInvalidDelimiters() { - Assert.Throws(() => Azure.Core.ConnectionString.Parse("key1;key2=value2")); + Assert.Throws(() => AzureCoreConnectionString.Parse("key1;key2=value2")); } } } diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ExceptionExtensionsTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ExceptionExtensionsTests.cs similarity index 95% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ExceptionExtensionsTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ExceptionExtensionsTests.cs index d3010a6f5192..960ed5b0f484 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/ExceptionExtensionsTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ExceptionExtensionsTests.cs @@ -6,7 +6,7 @@ using System.Threading; using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public class ExceptionExtensionsTests { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/HttpHelperTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/HttpHelperTests.cs similarity index 99% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/HttpHelperTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/HttpHelperTests.cs index 3b5f87b7c116..e8a29fdc900d 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/HttpHelperTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/HttpHelperTests.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public class HttpHelperTests { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/OpenTelemetry.Exporter.AzureMonitor.Tests.csproj b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj similarity index 74% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/OpenTelemetry.Exporter.AzureMonitor.Tests.csproj rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj index 51321e66f5a5..4d3a48c92f32 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/OpenTelemetry.Exporter.AzureMonitor.Tests.csproj +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj @@ -2,7 +2,7 @@ $(RequiredTargetFrameworks) - OpenTelemetry.Exporter.AzureMonitor + Microsoft.Azure.Monitor.OpenTelemetry.Exporter @@ -15,6 +15,6 @@ - + diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/NDJsonWriterTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/NDJsonWriterTests.cs similarity index 92% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/NDJsonWriterTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/NDJsonWriterTests.cs index 8cd3bab8441e..c6523accda7d 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/NDJsonWriterTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/NDJsonWriterTests.cs @@ -4,7 +4,7 @@ using System.Text; using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor.Tests +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests { public class NDJsonWriterTests { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/StubException.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/StubException.cs similarity index 90% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/StubException.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/StubException.cs index ef6177b8d666..228d761c4ffc 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/StubException.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/StubException.cs @@ -3,7 +3,7 @@ using System; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { internal class StubException : Exception { diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/TagsExtensionTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/TagsExtensionTests.cs similarity index 94% rename from sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/TagsExtensionTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/TagsExtensionTests.cs index 2533c3e60a31..ce23ea4dfcca 100644 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.UnitTest/TagsExtensionTests.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/TagsExtensionTests.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Xunit; -namespace OpenTelemetry.Exporter.AzureMonitor +namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { public class TagsExtensionTests { @@ -191,7 +191,7 @@ public void TagObjects_ObjectArray() Assert.Empty(partBTags); Assert.Single(PartCTags); - Assert.Equal("OpenTelemetry.Exporter.AzureMonitor.TagsExtensionTests+Test,OpenTelemetry.Exporter.AzureMonitor.TagsExtensionTests+Test,OpenTelemetry.Exporter.AzureMonitor.TagsExtensionTests+Test", PartCTags["objArray"]); + Assert.Equal("Microsoft.Azure.Monitor.OpenTelemetry.Exporter.TagsExtensionTests+Test,Microsoft.Azure.Monitor.OpenTelemetry.Exporter.TagsExtensionTests+Test,Microsoft.Azure.Monitor.OpenTelemetry.Exporter.TagsExtensionTests+Test", PartCTags["objArray"]); } [Fact] @@ -217,7 +217,7 @@ public void TagObjects_Diff_DataTypes() Assert.Equal("1.1", PartCTags["doubleKey"]); Assert.Equal("test", PartCTags["stringKey"]); Assert.Equal("True", PartCTags["boolKey"]); - Assert.Equal("OpenTelemetry.Exporter.AzureMonitor.TagsExtensionTests+Test", PartCTags["objectKey"]); + Assert.Equal("Microsoft.Azure.Monitor.OpenTelemetry.Exporter.TagsExtensionTests+Test", PartCTags["objectKey"]); Assert.Equal("1,2,3", PartCTags["arrayKey"]); } diff --git a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Properties/AssemblyInfo.cs b/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Properties/AssemblyInfo.cs deleted file mode 100644 index fc00bbf242ef..000000000000 --- a/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.AzureMonitor.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] -[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.AzureMonitor.Integration.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] - -// Moq -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/sdk/monitor/ci.yml b/sdk/monitor/ci.yml index 884e64561545..f3bb1ebf2e1c 100644 --- a/sdk/monitor/ci.yml +++ b/sdk/monitor/ci.yml @@ -28,5 +28,5 @@ extends: ServiceDirectory: monitor ArtifactName: packages Artifacts: - - name: OpenTelemetry.Exporter.AzureMonitor - safeName: OpenTelemetryExporterAzureMonitor \ No newline at end of file + - name: Microsoft.Azure.Monitor.OpenTelemetry.Exporter + safeName: MicrosoftAzureMonitorOpenTelemetryExporter \ No newline at end of file From 0947a9664cf13b7374483808b33cfdda2aeda775 Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 23 Oct 2020 08:36:40 -0400 Subject: [PATCH 03/28] [Service Bus Client] Shared Access Key Credential (#16085) The focus of these changes is to implement the `ServiceBusSharedAccessKeyCredential`, allowing SAS tokens and shared keys to be used without a connection string. --- ...ure.Messaging.ServiceBus.netstandard2.0.cs | 20 + .../ServiceBusAdministrationClient.cs | 64 +++- ...=> ServiceBusSharedAccessKeyCredential.cs} | 109 ++++-- .../ServiceBusTokenCredential.cs | 4 +- .../SharedAccessSignatureCredential.cs | 14 + .../src/Client/ServiceBusClient.cs | 36 ++ .../src/Primitives/ServiceBusConnection.cs | 52 ++- .../ServiceBusManagementClientLiveTests.cs | 34 ++ ...erviceBusSharedAccessKeyCredentialTests.cs | 360 ++++++++++++++++++ .../SharedAccessSignatureCredentialTests.cs | 267 +++++++++++++ .../tests/Client/ServiceBusClientLiveTests.cs | 73 +++- .../tests/Client/ServiceBusClientTests.cs | 56 ++- .../tests/Sender/SenderLiveTests.cs | 26 +- .../AuthenticateWithAADAsync.json | 42 +- ...henticateWithSharedKeyCredentialAsync.json | 139 +++++++ .../BasicQueueCrudOperationsAsync.json | 84 ++-- .../BasicRuleCrudOperationsAsync.json | 176 ++++----- .../BasicSubscriptionCrudOperationsAsync.json | 110 +++--- .../BasicTopicCrudOperationsAsync.json | 84 ++-- .../CorrelationFilterPropertiesAsync.json | 48 +-- .../GetNamespacePropertiesAsync.json | 10 +- .../GetTopicRuntimeInfoAsync.json | 76 ++-- .../SqlFilterParamsAsync.json | 44 +-- .../ThrowsIfEntityAlreadyExistsAsync.json | 88 ++--- .../ThrowsIfEntityDoesNotExistAsync.json | 154 ++++---- 25 files changed, 1634 insertions(+), 536 deletions(-) rename sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/{ServiceBusSharedKeyCredential.cs => ServiceBusSharedAccessKeyCredential.cs} (51%) create mode 100644 sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/ServiceBusSharedAccessKeyCredentialTests.cs create mode 100644 sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/SharedAccessSignatureCredentialTests.cs create mode 100644 sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithSharedKeyCredentialAsync.json diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs index 9938f9f1e4b1..758f4d455d4d 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs @@ -70,6 +70,8 @@ public ServiceBusClient(string connectionString) { } public ServiceBusClient(string fullyQualifiedNamespace, Azure.Core.TokenCredential credential) { } public ServiceBusClient(string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options) { } public ServiceBusClient(string connectionString, Azure.Messaging.ServiceBus.ServiceBusClientOptions options) { } + public ServiceBusClient(string fullyQualifiedNamespace, Azure.Messaging.ServiceBus.ServiceBusSharedAccessKeyCredential credential) { } + public ServiceBusClient(string fullyQualifiedNamespace, Azure.Messaging.ServiceBus.ServiceBusSharedAccessKeyCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options) { } public string FullyQualifiedNamespace { get { throw null; } } public bool IsClosed { get { throw null; } } public Azure.Messaging.ServiceBus.ServiceBusTransportType TransportType { get { throw null; } } @@ -430,6 +432,22 @@ public ServiceBusSessionReceiverOptions() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override string ToString() { throw null; } } + public sealed partial class ServiceBusSharedAccessKeyCredential + { + public ServiceBusSharedAccessKeyCredential(string sharedAccessSignature) { } + public ServiceBusSharedAccessKeyCredential(string sharedAccessKeyName, string sharedAccessKey) { } + public string SharedAccessKey { get { throw null; } } + public string SharedAccessKeyName { get { throw null; } } + public string SharedAccessSignature { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() { throw null; } + public void UpdateSharedAccessKey(string keyName, string keyValue) { } + public void UpdateSharedAccessSignature(string sharedAccessSignature) { } + } public enum ServiceBusTransportType { AmqpTcp = 0, @@ -714,6 +732,8 @@ public ServiceBusAdministrationClient(string connectionString) { } public ServiceBusAdministrationClient(string fullyQualifiedNamespace, Azure.Core.TokenCredential credential) { } public ServiceBusAdministrationClient(string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Messaging.ServiceBus.Administration.ServiceBusAdministrationClientOptions options) { } public ServiceBusAdministrationClient(string connectionString, Azure.Messaging.ServiceBus.Administration.ServiceBusAdministrationClientOptions options) { } + public ServiceBusAdministrationClient(string fullyQualifiedNamespace, Azure.Messaging.ServiceBus.ServiceBusSharedAccessKeyCredential credential) { } + public ServiceBusAdministrationClient(string fullyQualifiedNamespace, Azure.Messaging.ServiceBus.ServiceBusSharedAccessKeyCredential credential, Azure.Messaging.ServiceBus.Administration.ServiceBusAdministrationClientOptions options) { } public virtual System.Threading.Tasks.Task> CreateQueueAsync(Azure.Messaging.ServiceBus.Administration.CreateQueueOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateQueueAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateRuleAsync(string topicName, string subscriptionName, Azure.Messaging.ServiceBus.Administration.CreateRuleOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs index a2e4934d52c3..12bba4e80f00 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Administration/ServiceBusAdministrationClient.cs @@ -24,7 +24,7 @@ public class ServiceBusAdministrationClient private readonly ClientDiagnostics _clientDiagnostics; /// - /// Path to get the namespce properties. + /// Path to get the namespace properties. /// private const string NamespacePath = "$namespaceinfo"; @@ -68,7 +68,7 @@ public ServiceBusAdministrationClient(string connectionString) /// /// /// Namespace connection string. - /// + /// A set of options to apply when configuring the connection. public ServiceBusAdministrationClient( string connectionString, ServiceBusAdministrationClientOptions options) @@ -87,11 +87,11 @@ public ServiceBusAdministrationClient( _fullyQualifiedNamespace = connectionStringProperties.Endpoint.Host; var sharedAccessSignature = new SharedAccessSignature - ( + ( BuildAudienceResource(connectionStringProperties.Endpoint.Host), - connectionStringProperties.SharedAccessKeyName, + connectionStringProperties.SharedAccessKeyName, connectionStringProperties.SharedAccessKey - ); + ); var sharedCredential = new SharedAccessSignatureCredential(sharedAccessSignature); var tokenCredential = new ServiceBusTokenCredential( @@ -109,6 +109,51 @@ public ServiceBusAdministrationClient( options.Version); } + /// + /// Initializes a new which can be used to perform administration operations on ServiceBus entities. + /// + /// + /// The fully qualified Service Bus namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The to use for authorization. Access controls may be specified by the Service Bus namespace or the requested Service Bus entity, depending on Azure configuration. + public ServiceBusAdministrationClient( + string fullyQualifiedNamespace, + ServiceBusSharedAccessKeyCredential credential) + : this(fullyQualifiedNamespace, credential, new ServiceBusAdministrationClientOptions()) + { + } + + /// + /// Initializes a new which can be used to perform administration operations on ServiceBus entities. + /// + /// + /// The fully qualified Service Bus namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The to use for authorization. Access controls may be specified by the Service Bus namespace or the requested Service Bus entity, depending on Azure configuration. + /// A set of options to apply when configuring the connection. + public ServiceBusAdministrationClient( + string fullyQualifiedNamespace, + ServiceBusSharedAccessKeyCredential credential, + ServiceBusAdministrationClientOptions options) + { + Argument.AssertWellFormedServiceBusNamespace(fullyQualifiedNamespace, nameof(fullyQualifiedNamespace)); + Argument.AssertNotNull(credential, nameof(credential)); + + options ??= new ServiceBusAdministrationClientOptions(); + _fullyQualifiedNamespace = fullyQualifiedNamespace; + + var audience = BuildAudienceResource(fullyQualifiedNamespace); + var tokenCredential = new ServiceBusTokenCredential(credential.AsSharedAccessSignatureCredential(audience), audience); + + HttpPipeline pipeline = HttpPipelineBuilder.Build(options); + _clientDiagnostics = new ClientDiagnostics(options); + + _httpRequestAndResponse = new HttpRequestAndResponse( + pipeline, + _clientDiagnostics, + tokenCredential, + _fullyQualifiedNamespace, + options.Version); + } + /// /// Initializes a new which can be used to perform administration operations on ServiceBus entities. /// @@ -140,15 +185,6 @@ public ServiceBusAdministrationClient( options ??= new ServiceBusAdministrationClientOptions(); _fullyQualifiedNamespace = fullyQualifiedNamespace; - switch (credential) - { - case SharedAccessSignatureCredential _: - break; - - case ServiceBusSharedKeyCredential sharedKeyCredential: - credential = sharedKeyCredential.AsSharedAccessSignatureCredential(BuildAudienceResource(fullyQualifiedNamespace)); - break; - } var tokenCredential = new ServiceBusTokenCredential(credential, BuildAudienceResource(fullyQualifiedNamespace)); var authenticationPolicy = new BearerTokenAuthenticationPolicy(credential, Constants.DefaultScope); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusSharedKeyCredential.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusSharedAccessKeyCredential.cs similarity index 51% rename from sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusSharedKeyCredential.cs rename to sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusSharedAccessKeyCredential.cs index b06aad08e17a..11af19a9f3d0 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusSharedKeyCredential.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusSharedAccessKeyCredential.cs @@ -2,8 +2,7 @@ // Licensed under the MIT License. using System; -using System.Threading; -using System.Threading.Tasks; +using System.ComponentModel; using Azure.Core; using Azure.Messaging.ServiceBus.Authorization; @@ -14,23 +13,32 @@ namespace Azure.Messaging.ServiceBus /// Service Bus entity. /// /// - /// - /// - internal sealed class ServiceBusSharedKeyCredential : TokenCredential + public sealed class ServiceBusSharedAccessKeyCredential { /// /// The name of the shared access key to be used for authorization, as /// reported by the Azure portal. /// /// - private string SharedAccessKeyName { get; set; } + public string SharedAccessKeyName { get; private set; } /// /// The value of the shared access key to be used for authorization, as /// reported by the Azure portal. /// /// - private string SharedAccessKey { get; set; } + public string SharedAccessKey { get; private set; } + + /// + /// The value of the precomputed shared access signature to be used for authorization. + /// + /// + /// + /// This will only be populated when the credential is created using a precomputed shared access signature, not when created + /// using a shared key. + /// + /// + public string SharedAccessSignature { get; private set; } /// /// A reference to a corresponding SharedAccessSignatureCredential. @@ -39,13 +47,13 @@ internal sealed class ServiceBusSharedKeyCredential : TokenCredential private SharedAccessSignatureCredential SharedAccessSignatureCredential { get; set; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The name of the shared access key to be used for authorization, as reported by the Azure portal. /// The value of the shared access key to be used for authorization, as reported by the Azure portal. /// - public ServiceBusSharedKeyCredential( + public ServiceBusSharedAccessKeyCredential( string sharedAccessKeyName, string sharedAccessKey) { @@ -57,34 +65,16 @@ public ServiceBusSharedKeyCredential( } /// - /// Retrieves the token that represents the shared access signature credential, for - /// use in authorization against an Service Bus entity. + /// Initializes a new instance of the class. /// /// - /// The details of the authentication request. - /// The token used to request cancellation of the operation. - /// - /// The token representing the shared access signature for this credential. - /// - public override AccessToken GetToken( - TokenRequestContext requestContext, - CancellationToken cancellationToken) => - throw new InvalidOperationException(Resources.SharedKeyCredentialCannotGenerateTokens); - - /// - /// Retrieves the token that represents the shared access signature credential, for - /// use in authorization against an Service Bus entity. - /// + /// The shared access signature that forms the basis of this security token. /// - /// The details of the authentication request. - /// The token used to request cancellation of the operation. - /// - /// The token representing the shared access signature for this credential. - /// - public override ValueTask GetTokenAsync( - TokenRequestContext requestContext, - CancellationToken cancellationToken) => - throw new InvalidOperationException(Resources.SharedKeyCredentialCannotGenerateTokens); + public ServiceBusSharedAccessKeyCredential(string sharedAccessSignature) + { + Argument.AssertNotNullOrEmpty(sharedAccessSignature, nameof(sharedAccessSignature)); + SharedAccessSignature = sharedAccessSignature; + } /// /// Allows the rotation of Shared Access Signatures. @@ -106,6 +96,53 @@ public void UpdateSharedAccessKey( SharedAccessSignatureCredential?.UpdateSharedAccessKey(keyName, keyValue); } + /// + /// Allows the rotation of Shared Access Signatures. + /// + /// + /// The shared access signature that forms the basis of this security token. + /// + public void UpdateSharedAccessSignature( + string sharedAccessSignature) + { + Argument.AssertNotNullOrEmpty(sharedAccessSignature, nameof(sharedAccessSignature)); + + SharedAccessSignature = sharedAccessSignature; + SharedAccessKeyName = null; + SharedAccessKey = null; + + SharedAccessSignatureCredential?.UpdateSharedAccessSignature(sharedAccessSignature); + } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + /// + /// Converts the instance to string representation. + /// + /// + /// A that represents this instance. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); + /// /// Coverts to shared access signature credential. /// It retains a reference to the generated SharedAccessSignatureCredential. @@ -120,7 +157,9 @@ internal SharedAccessSignatureCredential AsSharedAccessSignatureCredential( string serviceBusResource, TimeSpan? signatureValidityDuration = default) { - SharedAccessSignatureCredential = new SharedAccessSignatureCredential(new SharedAccessSignature(serviceBusResource, SharedAccessKeyName, SharedAccessKey, signatureValidityDuration)); + SharedAccessSignatureCredential = string.IsNullOrEmpty(SharedAccessSignature) + ? new SharedAccessSignatureCredential(new SharedAccessSignature(serviceBusResource, SharedAccessKeyName, SharedAccessKey, signatureValidityDuration)) + : new SharedAccessSignatureCredential(new SharedAccessSignature(SharedAccessSignature)); return SharedAccessSignatureCredential; } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusTokenCredential.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusTokenCredential.cs index 41971cd2001b..3c5a21a6265e 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusTokenCredential.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/ServiceBusTokenCredential.cs @@ -4,7 +4,6 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; -using Azure.Messaging.ServiceBus; namespace Azure.Messaging.ServiceBus.Authorization { @@ -55,8 +54,7 @@ public ServiceBusTokenCredential( Resource = serviceBusResource; IsSharedAccessSignatureCredential = - (tokenCredential is ServiceBusSharedKeyCredential) - || (tokenCredential is SharedAccessSignatureCredential) + (tokenCredential is SharedAccessSignatureCredential) || ((tokenCredential as ServiceBusTokenCredential)?.IsSharedAccessSignatureCredential == true); } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/SharedAccessSignatureCredential.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/SharedAccessSignatureCredential.cs index 2a6c64734085..f44fddc65f4f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/SharedAccessSignatureCredential.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Authorization/SharedAccessSignatureCredential.cs @@ -111,5 +111,19 @@ internal void UpdateSharedAccessKey(string keyName, string keyValue) SharedAccessSignature.SignatureExpiration); } } + + /// + /// Creates a new shared signature allowing credentials rotation. + /// + /// + /// The shared access signature that forms the basis of this security token. + /// + internal void UpdateSharedAccessSignature(string signature) + { + lock (SignatureSyncRoot) + { + SharedAccessSignature = new SharedAccessSignature(signature); + } + } } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs index 2358223364b8..c59b599da018 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs @@ -139,6 +139,42 @@ public ServiceBusClient(string connectionString, ServiceBusClientOptions options Logger.ClientCreateComplete(typeof(ServiceBusClient), Identifier); } + /// + /// Initializes a new instance of the class. + /// + /// + /// The fully qualified Service Bus namespace to connect to. + /// This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The to use for authorization. Access controls may be specified by the Service Bus namespace. + public ServiceBusClient(string fullyQualifiedNamespace, ServiceBusSharedAccessKeyCredential credential) : + this(fullyQualifiedNamespace, credential, new ServiceBusClientOptions()) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The fully qualified Service Bus namespace to connect to. + /// This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The to use for authorization. Access controls may be specified by the Service Bus namespace. + /// The set of to use for configuring this . + public ServiceBusClient( + string fullyQualifiedNamespace, + ServiceBusSharedAccessKeyCredential credential, + ServiceBusClientOptions options) + { + _options = options?.Clone() ?? new ServiceBusClientOptions(); + Logger.ClientCreateStart(typeof(ServiceBusClient), fullyQualifiedNamespace); + Identifier = DiagnosticUtilities.GenerateIdentifier(fullyQualifiedNamespace); + Connection = new ServiceBusConnection( + fullyQualifiedNamespace, + credential, + _options); + Plugins = _options.Plugins; + Logger.ClientCreateComplete(typeof(ServiceBusClient), Identifier); + } + /// /// Initializes a new instance of the class. /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusConnection.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusConnection.cs index 3f70606aeebf..93d1c11286e8 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusConnection.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusConnection.cs @@ -116,6 +116,24 @@ internal ServiceBusConnection( #pragma warning restore CA2214 // Do not call overridable methods in constructors } + /// + /// Initializes a new instance of the class. + /// + /// + /// The fully qualified Service Bus namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The credential to use for authorization. Access controls may be specified by the Service Bus namespace or the requested Service Bus entity, depending on Azure configuration. + /// A set of options to apply when configuring the connection. + internal ServiceBusConnection( + string fullyQualifiedNamespace, + ServiceBusSharedAccessKeyCredential credential, + ServiceBusClientOptions options) + : this( + fullyQualifiedNamespace, + TranslateSharedKeyCredential(credential, fullyQualifiedNamespace, null, options.TransportType), + options) + { + } + /// /// Initializes a new instance of the class. /// @@ -130,17 +148,7 @@ internal ServiceBusConnection( { Argument.AssertWellFormedServiceBusNamespace(fullyQualifiedNamespace, nameof(fullyQualifiedNamespace)); Argument.AssertNotNull(credential, nameof(credential)); - ValidateConnectionOptions(options); - switch (credential) - { - case SharedAccessSignatureCredential _: - break; - - case ServiceBusSharedKeyCredential sharedKeyCredential: - credential = sharedKeyCredential.AsSharedAccessSignatureCredential(BuildConnectionResource(options.TransportType, fullyQualifiedNamespace, EntityPath)); - break; - } var tokenCredential = new ServiceBusTokenCredential(credential, BuildConnectionResource(options.TransportType, fullyQualifiedNamespace, EntityPath)); @@ -304,6 +312,30 @@ internal static string BuildConnectionResource( internal virtual void ThrowIfClosed() => Argument.AssertNotDisposed(IsClosed, nameof(ServiceBusConnection)); + /// + /// Translates an into the equivalent shared access signature credential. + /// + /// + /// The credential to translate. + /// The fully qualified Service Bus namespace being connected to. + /// The path of the entity being connected to. + /// The type of transport being used for the connection. + /// + /// The which the was translated into. + /// + internal static SharedAccessSignatureCredential TranslateSharedKeyCredential(ServiceBusSharedAccessKeyCredential credential, + string fullyQualifiedNamespace, + string entityPath, + ServiceBusTransportType transportType) + { + if ((credential == null) || (string.IsNullOrEmpty(fullyQualifiedNamespace))) + { + return null; + } + + return credential.AsSharedAccessSignatureCredential(BuildConnectionResource(transportType, fullyQualifiedNamespace, entityPath)); + } + /// /// Performs the actions needed to validate the associated /// with this client. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs index 4aa48cde17ef..def2a3d667d7 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/ServiceBusManagementClientLiveTests.cs @@ -9,6 +9,7 @@ using Azure.Core; using Azure.Core.TestFramework; using Azure.Messaging.ServiceBus.Administration; +using Azure.Messaging.ServiceBus.Core; using Azure.Messaging.ServiceBus.Tests.Infrastructure; using NUnit.Framework; @@ -42,6 +43,18 @@ private ServiceBusAdministrationClient GetAADClient() => GetTokenCredential(), InstrumentClientOptions(new ServiceBusAdministrationClientOptions()))); + private ServiceBusAdministrationClient GetSharedKeyTokenClient() + { + var properties = ConnectionStringParser.Parse(GetConnectionString()); + var credential = new ServiceBusSharedAccessKeyCredential(properties.SharedAccessKeyName, properties.SharedAccessKey); + + return InstrumentClient( + new ServiceBusAdministrationClient( + TestEnvironment.FullyQualifiedNamespace, + credential, + InstrumentClientOptions(new ServiceBusAdministrationClientOptions()))); + } + [Test] public async Task BasicQueueCrudOperations() { @@ -791,6 +804,27 @@ public async Task AuthenticateWithAAD() await client.DeleteTopicAsync(topicName); } + [Test] + public async Task AuthenticateWithSharedKeyCredential() + { + var queueName = Recording.Random.NewGuid().ToString("D").Substring(0, 8); + var topicName = Recording.Random.NewGuid().ToString("D").Substring(0, 8); + var client = GetSharedKeyTokenClient(); + + var queueOptions = new CreateQueueOptions(queueName); + QueueProperties createdQueue = await client.CreateQueueAsync(queueOptions); + + Assert.AreEqual(queueOptions, new CreateQueueOptions(createdQueue)); + + var topicOptions = new CreateTopicOptions(topicName); + TopicProperties createdTopic = await client.CreateTopicAsync(topicOptions); + + Assert.AreEqual(topicOptions, new CreateTopicOptions(createdTopic)); + + await client.DeleteQueueAsync(queueName); + await client.DeleteTopicAsync(topicName); + } + private TokenCredential GetTokenCredential() => Mode == RecordedTestMode.Playback ? new ServiceBusTestTokenCredential() : TestEnvironment.Credential; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/ServiceBusSharedAccessKeyCredentialTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/ServiceBusSharedAccessKeyCredentialTests.cs new file mode 100644 index 000000000000..4f751f11fc94 --- /dev/null +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/ServiceBusSharedAccessKeyCredentialTests.cs @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Reflection; +using Azure.Messaging.ServiceBus.Authorization; +using NUnit.Framework; + +namespace Azure.Messaging.ServiceBus.Tests +{ + /// + /// The suite of tests for the + /// class. + /// + /// + [TestFixture] + public class ServiceBusSharedAccessKeyCredentialTests + { + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + [TestCase(null)] + [TestCase("")] + public void ConstructorValidatesTheKeyName(string keyName) + { + Assert.That(() => new ServiceBusSharedAccessKeyCredential(keyName, "someKey"), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + [TestCase(null)] + [TestCase("")] + public void ConstructorValidatesTheKeyValue(string keyValue) + { + Assert.That(() => new ServiceBusSharedAccessKeyCredential("someName", keyValue), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + [TestCase(null)] + [TestCase("")] + public void ConstructorValidatesInitializesSharedAccessSignatureProperties(string signature) + { + Assert.That(() => new ServiceBusSharedAccessKeyCredential(signature), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void ConstructorInitializesSharedKeyProperties() + { + var name = "KeyName"; + var value = "KeyValue"; + var credential = new ServiceBusSharedAccessKeyCredential(name, value); + + Assert.That(credential.SharedAccessKeyName, Is.EqualTo(name), "The shared key name should have been set."); + Assert.That(credential.SharedAccessKey, Is.EqualTo(value), "The shared key should have been set."); + Assert.That(credential.SharedAccessSignature, Is.Null, "The shared access signature should not have been set."); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void ConstructorInitializesSharedSignatureProperties() + { + var signature = new SharedAccessSignature("RESOURCE", "keyname", "keyvalue").Value; + var credential = new ServiceBusSharedAccessKeyCredential(signature); + + Assert.That(credential.SharedAccessSignature, Is.EqualTo(signature), "The shared access signature name should have been set."); + Assert.That(credential.SharedAccessKeyName, Is.Null, "The shared key name should have been set."); + Assert.That(credential.SharedAccessKey, Is.Null, "The shared access key should not have been set."); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void AsSharedAccessSignatureCredentialProducesTheExpectedCredentialForSharedKeys() + { + var resource = "amqps://some.hub.com/path"; + var keyName = "sharedKey"; + var keyValue = "keyValue"; + var validSpan = TimeSpan.FromHours(4); + var signature = new SharedAccessSignature(resource, keyName, keyValue, validSpan); + var keyCredential = new ServiceBusSharedAccessKeyCredential(keyName, keyValue); + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + + Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); + + var credentialSignature = GetSharedAccessSignature(sasCredential); + Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); + Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(signature.SharedAccessKeyName), "The shared access key name should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.EqualTo(signature.SharedAccessKey), "The shared access key should match."); + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// The signature expiration will always be extended after calling AsSharedAccessSignatureCredential. + /// + /// + [Test] + public void AsSharedAccessSignatureCredentialShouldRefreshTokenValidityForSharedKeys() + { + var beforeResource = "amqps://before/path"; + var afterResource = "amqps://after/path"; + var beforeSpan = TimeSpan.FromHours(4); + var afterSpan = TimeSpan.FromHours(8); + var keyName = "keyName"; + var keyValue = "keyValue"; + var expectedSignature = new SharedAccessSignature(beforeResource, keyName, keyValue, beforeSpan); + var keyCredential = new ServiceBusSharedAccessKeyCredential(keyName, keyValue); + + SharedAccessSignatureCredential sasCredential = keyCredential.AsSharedAccessSignatureCredential(beforeResource, beforeSpan); + SharedAccessSignature beforeSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(beforeSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + + expectedSignature = new SharedAccessSignature(afterResource, keyName, keyValue, afterSpan); + sasCredential = keyCredential.AsSharedAccessSignatureCredential(afterResource, afterSpan); + SharedAccessSignature afterSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(afterSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void AsSharedAccessSignatureCredentialProducesTheExpectedCredentialForSharedAccessSignatures() + { + var resource = "amqps://some.hub.com/path"; + var keyName = "sharedKey"; + var keyValue = "keyValue"; + var validSpan = TimeSpan.FromHours(4); + var signature = new SharedAccessSignature(resource, keyName, keyValue, validSpan); + var keyCredential = new ServiceBusSharedAccessKeyCredential(signature.Value); + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + + Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); + + var credentialSignature = GetSharedAccessSignature(sasCredential); + Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); + Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(signature.SharedAccessKeyName), "The shared access key name should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.Null, "The shared access key should not be populated."); + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// The signature expiration will always be extended after calling AsSharedAccessSignatureCredential. + /// + /// + [Test] + public void AsSharedAccessSignatureCredentialShouldNotRefreshTokenValidityForSharedAccessSignatures() + { + var beforeResource = "amqps://before/path"; + var afterResource = "amqps://after/path"; + var beforeSpan = TimeSpan.FromHours(4); + var afterSpan = TimeSpan.FromHours(8); + var keyName = "keyName"; + var keyValue = "keyValue"; + var expectedSignature = new SharedAccessSignature(beforeResource, keyName, keyValue, beforeSpan); + var keyCredential = new ServiceBusSharedAccessKeyCredential(expectedSignature.Value); + + SharedAccessSignatureCredential sasCredential = keyCredential.AsSharedAccessSignatureCredential(beforeResource, beforeSpan); + SharedAccessSignature beforeSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(beforeSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + + sasCredential = keyCredential.AsSharedAccessSignatureCredential(afterResource, afterSpan); + SharedAccessSignature afterSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(afterSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// ServiceBusSharedAccessKeyCredential should wrap an instance of SharedAccessSignatureCredential. + /// Multiple calls to AsSharedAccessSignatureCredential will return a reference to the same object. + /// + /// + [Test] + public void ServiceBusSharedAccessKeyCredentialShouldHoldAReferenceToASharedAccessKey() + { + var resource = "amqps://some.hub.com/path"; + var span = TimeSpan.FromHours(4); + var keyName = "keyName"; + var keyValue = "keyValue"; + var keyCredential = new ServiceBusSharedAccessKeyCredential(keyName, keyValue); + + SharedAccessSignatureCredential sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, span); + SharedAccessSignatureCredential wrappedCredential = GetSharedAccessSignatureCredential(keyCredential); + + Assert.That(wrappedCredential, Is.EqualTo(sasCredential), "The credentials should be wrapped."); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void UpdateSharedAccessKeyShouldAllowRefreshOfTheSharedAccessSignature() + { + var resource = "amqps://before/path"; + var beforeKeyName = "beforeKeyName"; + var afterKeyName = "afterKeyName"; + var beforeKeyValue = "beforeKeyValue"; + var afterKeyValue = "afterKeyValue"; + var validSpan = TimeSpan.FromHours(4); + var signature = new SharedAccessSignature(resource, beforeKeyName, beforeKeyValue, validSpan); + var keyCredential = new ServiceBusSharedAccessKeyCredential(beforeKeyName, beforeKeyValue); + + // Needed to instantiate a SharedAccessSignatureCredential + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + + // Updates + keyCredential.UpdateSharedAccessKey(afterKeyName, afterKeyValue); + + Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); + + var credentialSignature = GetSharedAccessSignature(sasCredential); + Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); + Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(afterKeyName), "The shared access key name should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.EqualTo(afterKeyValue), "The shared access key should match."); + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void UpdateSharedAccessSignatureShouldUpdateTheSharedAccessSignature() + { + var resource = "amqps://before/path"; + var beforeKeyName = "beforeKeyName"; + var afterKeyName = "afterKeyName"; + var beforeKeyValue = "beforeKeyValue"; + var afterKeyValue = "afterKeyValue"; + var validSpan = TimeSpan.FromHours(4); + var signature = new SharedAccessSignature(resource, beforeKeyName, beforeKeyValue, validSpan.Add(TimeSpan.FromHours(2))); + var keyCredential = new ServiceBusSharedAccessKeyCredential(signature.Value); + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + + // Updates + var newSignature = new SharedAccessSignature(resource, afterKeyName, afterKeyValue, validSpan); + keyCredential.UpdateSharedAccessSignature(newSignature.Value); + + Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); + + var credentialSignature = GetSharedAccessSignature(sasCredential); + Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); + Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(afterKeyName), "The shared access key name should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.Null, "The shared access key should not have been set."); + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(newSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// A call to UpdateSharedAccessKey should change properties of the SharedAccessSignature + /// that it wraps like the SharedAccessKeyName or the SharedAccessKey. + /// + /// + [Test] + public void UpdateSharedAccessKeyShoulRefreshServiceBusSharedAccessKeyCredentialNameAndKey() + { + var resource = "amqps://before/path"; + var validSpan = TimeSpan.FromHours(4); + var beforeKeyName = "beforeKeyName"; + var afterKeyName = "afterKeyName"; + var beforeKeyValue = "beforeKeyValue"; + var afterKeyValue = "afterKeyValue"; + var keyCredential = new ServiceBusSharedAccessKeyCredential(beforeKeyName, beforeKeyValue); + + keyCredential.UpdateSharedAccessKey(afterKeyName, afterKeyValue); + + var keyName = keyCredential.SharedAccessKeyName; + var key = keyCredential.SharedAccessKey; + + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + var credentialSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(afterKeyName), "The shared access key name should change after being updated."); + Assert.That(credentialSignature.SharedAccessKey, Is.EqualTo(afterKeyValue), "The shared access key value should change after being updated."); + Assert.That(keyName, Is.EqualTo(afterKeyName), "The shared access key name should change after being updated."); + Assert.That(key, Is.EqualTo(afterKeyValue), "The shared access key value should change after being updated."); + } + + /// + /// A call to UpdateSharedAccessKey should not change the properties of the SharedAccessSignature + /// that it wraps like the signature expiration or the signature resource. + /// + /// + [Test] + public void UpdateSharedAccessKeyShouldNotChangeOtherPropertiesForTheSharedAccessSignature() + { + var resource = "amqps://before/path"; + var validSpan = TimeSpan.FromHours(4); + var beforeKeyName = "beforeKeyName"; + var afterKeyName = "afterKeyName"; + var beforeKeyValue = "beforeKeyValue"; + var afterKeyValue = "afterKeyValue"; + var keyCredential = new ServiceBusSharedAccessKeyCredential(beforeKeyName, beforeKeyValue); + + // Needed to instantiate a SharedAccessTokenCredential + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + var credentialSignature = GetSharedAccessSignature(sasCredential); + + var signatureExpiration = credentialSignature.SignatureExpiration; + + keyCredential.UpdateSharedAccessKey(afterKeyName, afterKeyValue); + + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signatureExpiration), "The expiration of a signature should not change when the credentials are rolled."); + Assert.That(credentialSignature.Resource, Is.EqualTo(resource), "The resource of a signature should not change when the credentials are rolled."); + } + + /// + /// Retrieves the shared access signature from the credential using its private accessor. + /// + /// + /// The instance to retrieve the key from. + /// + /// The shared access key. + /// + private static SharedAccessSignature GetSharedAccessSignature(SharedAccessSignatureCredential instance) => + (SharedAccessSignature) + typeof(SharedAccessSignatureCredential) + .GetProperty("SharedAccessSignature", BindingFlags.Instance | BindingFlags.NonPublic) + .GetValue(instance, null); + + /// + /// Retrieves the ServiceBusSharedAccessKeyCredential from the credential using its private accessor. + /// + /// + /// The instance to retrieve the key from. + /// + /// The shared access key. + /// + private static SharedAccessSignatureCredential GetSharedAccessSignatureCredential(ServiceBusSharedAccessKeyCredential instance) => + (SharedAccessSignatureCredential) + typeof(ServiceBusSharedAccessKeyCredential) + .GetProperty("SharedAccessSignatureCredential", BindingFlags.Instance | BindingFlags.NonPublic) + .GetValue(instance, null); + } +} diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/SharedAccessSignatureCredentialTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/SharedAccessSignatureCredentialTests.cs new file mode 100644 index 000000000000..0774f73cb209 --- /dev/null +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Authorization/SharedAccessSignatureCredentialTests.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Messaging.ServiceBus.Authorization; +using NUnit.Framework; + +namespace Azure.Messaging.ServiceBus.Tests +{ + /// + /// The suite of tests for the + /// class. + /// + /// + [TestFixture] + public class SharedAccessSignatureCredentialTests + { + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void ConstructorValidatesTheSignature() + { + Assert.That(() => new SharedAccessSignatureCredential(null), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void ConstructorInitializesProperties() + { + var value = "TOkEn!"; + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, DateTimeOffset.UtcNow.AddHours(4)); + var credential = new SharedAccessSignatureCredential(signature); + + Assert.That(GetSharedAccessSignature(credential), Is.SameAs(signature), "The credential should allow the signature to be accessed."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetTokenReturnsTheSignatureValue() + { + var value = "TOkEn!"; + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, DateTimeOffset.UtcNow.AddHours(4)); + var credential = new SharedAccessSignatureCredential(signature); + + Assert.That(credential.GetToken(new TokenRequestContext(), default).Token, Is.SameAs(signature.Value), "The credential should return the signature as the token."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetTokenIgnoresScopeAndCancellationToken() + { + var value = "TOkEn!"; + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, DateTimeOffset.UtcNow.AddHours(4)); + var credential = new SharedAccessSignatureCredential(signature); + + Assert.That(credential.GetToken(new TokenRequestContext(new[] { "test", "this" }), CancellationToken.None).Token, Is.SameAs(signature.Value), "The credential should return the signature as the token."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public async Task GetTokenAsyncReturnsTheSignatureValue() + { + var value = "TOkEn!"; + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, DateTimeOffset.UtcNow.AddHours(4)); + var credential = new SharedAccessSignatureCredential(signature); + var cancellation = new CancellationTokenSource(); + AccessToken token = await credential.GetTokenAsync(new TokenRequestContext(), cancellation.Token); + + Assert.That(token.Token, Is.SameAs(signature.Value), "The credential should return the signature as the token."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public async Task GetTokenAsyncIgnoresScopeAndCancellationToken() + { + var value = "TOkEn!"; + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, DateTimeOffset.UtcNow.AddHours(4)); + var credential = new SharedAccessSignatureCredential(signature); + var cancellation = new CancellationTokenSource(); + AccessToken token = await credential.GetTokenAsync(new TokenRequestContext(new string[0]), cancellation.Token); + + Assert.That(token.Token, Is.SameAs(signature.Value), "The credential should return the signature as the token."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetTokenExtendsAnExpiredTokenWhenCreatedWithTheSharedKey() + { + var value = "TOkEn!"; + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, DateTimeOffset.UtcNow.Subtract(TimeSpan.FromHours(2))); + var credential = new SharedAccessSignatureCredential(signature); + + var expectedExpiration = DateTimeOffset.Now.Add(GetSignatureExtensionDuration()); + Assert.That(credential.GetToken(new TokenRequestContext(), default).ExpiresOn, Is.EqualTo(expectedExpiration).Within(TimeSpan.FromMinutes(1))); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetTokenExtendsATokenCloseToExpiringWhenCreatedWithTheSharedKey() + { + var value = "TOkEn!"; + var tokenExpiration = DateTimeOffset.UtcNow.Add(TimeSpan.FromSeconds(GetSignatureRefreshBuffer().TotalSeconds / 2)); + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, tokenExpiration); + var credential = new SharedAccessSignatureCredential(signature); + + var expectedExpiration = DateTimeOffset.Now.Add(GetSignatureExtensionDuration()); + Assert.That(credential.GetToken(new TokenRequestContext(), default).ExpiresOn, Is.EqualTo(expectedExpiration).Within(TimeSpan.FromMinutes(1))); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetTokenDoesNotExtendAnExpiredTokenWhenCreatedWithoutTheKey() + { + var expectedExpiration = DateTimeOffset.UtcNow.Subtract(TimeSpan.FromHours(2)); + var value = $"SharedAccessSignature sr=https%3A%2F%2Ffake-test.servicebus.windows.net%2F&sig=nNBNavJfBiHuXUzWOLhSvI3bVgqbQUzA7Po8%2F4wQQng%3D&se={ ToUnixTime(expectedExpiration) }&skn=fakeKey"; + var sourceSignature = new SharedAccessSignature("fake-test", "fakeKey", "ABC123", value, expectedExpiration).Value; + var signature = new SharedAccessSignature(sourceSignature); + var credential = new SharedAccessSignatureCredential(signature); + + Assert.That(credential.GetToken(new TokenRequestContext(), default).ExpiresOn, Is.EqualTo(expectedExpiration).Within(TimeSpan.FromMinutes(1))); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetTokenDoesNotExtendATokenCloseToExpiringWhenCreatedWithoutTheKey() + { + var tokenExpiration = DateTimeOffset.UtcNow.Add(TimeSpan.FromSeconds(GetSignatureRefreshBuffer().TotalSeconds / 2)); + var value = $"SharedAccessSignature sr=https%3A%2F%2Ffake-test.servicebus.windows.net%2F&sig=nNBNavJfBiHuXUzWOLhSvI3bVgqbQUzA7Po8%2F4wQQng%3D&se={ ToUnixTime(tokenExpiration) }&skn=fakeKey"; + var sourceSignature = new SharedAccessSignature("fake-test", "fakeKey", "ABC123", value, tokenExpiration).Value; + var signature = new SharedAccessSignature(sourceSignature); + var credential = new SharedAccessSignatureCredential(signature); + + Assert.That(credential.GetToken(new TokenRequestContext(), default).ExpiresOn, Is.EqualTo(tokenExpiration).Within(TimeSpan.FromMinutes(1))); + } + + /// + /// Verifies that a signature can be rotated without refreshing its validity. + /// + /// + [Test] + public void SharedAccessKeyCanBeUpdated() + { + var value = "TOkEn!"; + var tokenExpiration = DateTimeOffset.UtcNow.Add(TimeSpan.FromSeconds(GetSignatureRefreshBuffer().TotalSeconds / 2)); + var signature = new SharedAccessSignature("hub-name", "keyName", "key", value, tokenExpiration); + var credential = new SharedAccessSignatureCredential(signature); + + credential.UpdateSharedAccessKey("new-key-name", "new-key"); + + var newSignature = GetSharedAccessSignature(credential); + + Assert.That(newSignature.SharedAccessKeyName, Is.EqualTo("new-key-name")); + Assert.That(newSignature.SharedAccessKey, Is.EqualTo("new-key")); + Assert.That(newSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration)); + } + + /// + /// Verifies that a signature can be rotated without refreshing its validity. + /// + /// + [Test] + public void SharedAccesSignatureCanBeUpdated() + { + var tokenExpiration = TimeSpan.FromSeconds(GetSignatureRefreshBuffer().TotalSeconds / 2); + var signature = new SharedAccessSignature("hub-name", "keyName", "key", tokenExpiration); + var updatedSignature = new SharedAccessSignature("hub-name", "newKeyName", "newKey", tokenExpiration.Add(TimeSpan.FromMinutes(30))); + var credential = new SharedAccessSignatureCredential(signature); + + credential.UpdateSharedAccessSignature(updatedSignature.Value); + + var newSignature = GetSharedAccessSignature(credential); + + Assert.That(newSignature.Value, Is.EqualTo(updatedSignature.Value)); + Assert.That(newSignature.SharedAccessKeyName, Is.EqualTo(updatedSignature.SharedAccessKeyName)); + Assert.That(newSignature.SharedAccessKey, Is.Null); + Assert.That(newSignature.SignatureExpiration, Is.EqualTo(updatedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5))); + } + + /// + /// Converts a value to the corresponding Unix-style time stamp. + /// + /// + /// The date/time to convert. + /// + /// The Unix-style times tamp which corresponds to the specified date/time. + /// + private static long ToUnixTime(DateTimeOffset timestamp) => + Convert.ToInt64((timestamp - new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero)).TotalSeconds); + + /// + /// Retrieves the shared access signature from the credential using its private accessor. + /// + /// + /// The instance to retrieve the key from. + /// + /// The shared access key + /// + private static SharedAccessSignature GetSharedAccessSignature(SharedAccessSignatureCredential instance) => + (SharedAccessSignature) + typeof(SharedAccessSignatureCredential) + .GetProperty("SharedAccessSignature", BindingFlags.Instance | BindingFlags.NonPublic) + .GetValue(instance, null); + + /// + /// Gets the refresh buffer for the using + /// its private field. + /// + /// + private static TimeSpan GetSignatureRefreshBuffer() => + (TimeSpan) + typeof(SharedAccessSignatureCredential) + .GetField("SignatureRefreshBuffer", BindingFlags.Static | BindingFlags.NonPublic) + .GetValue(null); + + /// + /// Gets the extension duration for the using + /// its private field. + /// + /// + private static TimeSpan GetSignatureExtensionDuration() => + (TimeSpan) + typeof(SharedAccessSignatureCredential) + .GetField("SignatureExtensionDuration", BindingFlags.Static | BindingFlags.NonPublic) + .GetValue(null); + } +} diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs index 33a9eaa8ebdc..5cf06aad4138 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientLiveTests.cs @@ -3,6 +3,7 @@ using System; using System.Threading.Tasks; +using Azure.Messaging.ServiceBus.Core; using NUnit.Framework; namespace Azure.Messaging.ServiceBus.Tests.Client @@ -11,7 +12,7 @@ public class ServiceBusClientLiveTests : ServiceBusLiveTestBase { /// /// Verifies that the is able to - /// connect to the Event Hubs service. + /// connect to the Service Bus service. /// /// [Test] @@ -43,6 +44,76 @@ public async Task ClientCanConnectUsingSharedAccessSignatureConnectionString() } } + /// + /// Verifies that the is able to + /// connect to the Service Bus service. + /// + /// + [Test] + public async Task ClientCanConnectUsingSharedKeyCredentialWithSignature() + { + await using (var scope = await ServiceBusScope.CreateWithQueue(enablePartitioning: true, enableSession: false)) + { + var options = new ServiceBusClientOptions(); + var audience = ServiceBusConnection.BuildConnectionResource(options.TransportType, TestEnvironment.FullyQualifiedNamespace, scope.QueueName); + var connectionString = TestEnvironment.BuildConnectionStringWithSharedAccessSignature(scope.QueueName, audience); + var parsed = ConnectionStringParser.Parse(connectionString); + var credential = new ServiceBusSharedAccessKeyCredential(parsed.SharedAccessSignature); + + await using (var client = new ServiceBusClient(TestEnvironment.FullyQualifiedNamespace, credential, options)) + { + Assert.That(async () => + { + ServiceBusReceiver receiver = null; + + try + { + receiver = client.CreateReceiver(scope.QueueName); + } + finally + { + await (receiver?.DisposeAsync() ?? new ValueTask()); + } + + }, Throws.Nothing); + } + } + } + + /// + /// Verifies that the is able to + /// connect to the Service Bus service. + /// + /// + [Test] + public async Task ClientCanConnectUsingSharedKeyCredentialWithSharedKey() + { + await using (var scope = await ServiceBusScope.CreateWithQueue(enablePartitioning: true, enableSession: false)) + { + var options = new ServiceBusClientOptions(); + var audience = ServiceBusConnection.BuildConnectionResource(options.TransportType, TestEnvironment.FullyQualifiedNamespace, scope.QueueName); + var credential = new ServiceBusSharedAccessKeyCredential(TestEnvironment.SharedAccessKeyName, TestEnvironment.SharedAccessKey); + + await using (var client = new ServiceBusClient(TestEnvironment.FullyQualifiedNamespace, credential, options)) + { + Assert.That(async () => + { + ServiceBusReceiver receiver = null; + + try + { + receiver = client.CreateReceiver(scope.QueueName); + } + finally + { + await (receiver?.DisposeAsync() ?? new ValueTask()); + } + + }, Throws.Nothing); + } + } + } + [Test] [TestCase(true)] [TestCase(false)] diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientTests.cs index 7c5456b33697..1eaab23bde68 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Client/ServiceBusClientTests.cs @@ -18,7 +18,7 @@ public class ServiceBusClientTests /// Provides the invalid test cases for the constructor tests. /// /// - public static IEnumerable ConstructorExpandedArgumentInvalidCases() + public static IEnumerable ConstructorTokenCredentialArgumentInvalidCases() { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); @@ -28,6 +28,20 @@ public static IEnumerable ConstructorExpandedArgumentInvalidCases() yield return new object[] { "sb://fakenamspace.com", credential.Object }; } + /// + /// Provides the invalid test cases for the constructor tests. + /// + /// + public static IEnumerable ConstructorSharedKeyCredentialArgumentInvalidCases() + { + var credential = new ServiceBusSharedAccessKeyCredential("name", "value"); + + yield return new object[] { null, credential }; + yield return new object[] { "", credential }; + yield return new object[] { "FakeNamespace", null }; + yield return new object[] { "sb://fakenamspace.com", credential }; + } + /// /// Provides test cases for the constructor tests. /// @@ -147,9 +161,22 @@ public void ConstructorValidatesConnectionStringForDuplicateAuthorization(string /// /// [Test] - [TestCaseSource(nameof(ConstructorExpandedArgumentInvalidCases))] - public void ConstructorValidatesExpandedArguments(string fullyQualifiedNamespace, - TokenCredential credential) + [TestCaseSource(nameof(ConstructorTokenCredentialArgumentInvalidCases))] + public void ConstructorValidatesTokenCredentialArguments(string fullyQualifiedNamespace, + TokenCredential credential) + { + Assert.That(() => new ServiceBusClient(fullyQualifiedNamespace, credential), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + [TestCaseSource(nameof(ConstructorSharedKeyCredentialArgumentInvalidCases))] + public void ConstructorValidatesSharedKeyArguments(string fullyQualifiedNamespace, + ServiceBusSharedAccessKeyCredential credential) { Assert.That(() => new ServiceBusClient(fullyQualifiedNamespace, credential), Throws.InstanceOf()); } @@ -212,13 +239,26 @@ public void ConstructorWithConnectionStringValidatesOptions() /// /// [Test] - public void ConstructorWithExpandedArgumentsValidatesOptions() + public void ConstructorWithTokenCredentialArgumentsValidatesOptions() { var token = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); var invalidOptions = new ServiceBusClientOptions { TransportType = ServiceBusTransportType.AmqpTcp, WebProxy = Mock.Of() }; Assert.That(() => new ServiceBusClient("fullyQualifiedNamespace", Mock.Of(), invalidOptions), Throws.InstanceOf(), "The expanded argument constructor should validate client options"); } + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + public void ConstructorWithSharedKeyCredentialArgumentsValidatesOptions() + { + var token = new ServiceBusSharedAccessKeyCredential("key", "value"); + var invalidOptions = new ServiceBusClientOptions { TransportType = ServiceBusTransportType.AmqpTcp, WebProxy = Mock.Of() }; + Assert.That(() => new ServiceBusClient("fullyQualifiedNamespace", Mock.Of(), invalidOptions), Throws.InstanceOf(), "The expanded argument constructor should validate client options"); + } + /// /// Verifies functionality of the /// @@ -281,6 +321,12 @@ public ReadableOptionsMock(string fullyQualifiedNamespace, ServiceBusClientOptions clientOptions = default) : base(fullyQualifiedNamespace, credential, clientOptions) { } + + public ReadableOptionsMock(string fullyQualifiedNamespace, + ServiceBusSharedAccessKeyCredential credential, + ServiceBusClientOptions clientOptions = default) : base(fullyQualifiedNamespace, credential, clientOptions) + { + } } } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs index e73e7cf2397e..9e33a85ef0f0 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderLiveTests.cs @@ -128,10 +128,13 @@ public async Task CanSendLargeMessageBatch() ServiceBusSender sender = client.CreateSender(scope.QueueName); using ServiceBusMessageBatch batch = await sender.CreateMessageBatchAsync(); - // Actual limit is 262144 bytes for a single message. - batch.TryAddMessage(new ServiceBusMessage(new byte[100000 / 3])); - batch.TryAddMessage(new ServiceBusMessage(new byte[100000 / 3])); - batch.TryAddMessage(new ServiceBusMessage(new byte[100000 / 3])); + // Actual limit is set by the service; query it from the batch. Because this will be used for the + // message body, leave some padding for the conversion and batch envelope. + var size = (long)(Math.Floor(batch.MaxSizeInBytes / 3.0f) - 150); + + batch.TryAddMessage(new ServiceBusMessage(new byte[size])); + batch.TryAddMessage(new ServiceBusMessage(new byte[size])); + batch.TryAddMessage(new ServiceBusMessage(new byte[size])); await sender.SendMessagesAsync(batch); } @@ -146,9 +149,8 @@ public async Task CannotSendLargerThanMaximumSize() ServiceBusSender sender = client.CreateSender(scope.QueueName); using ServiceBusMessageBatch batch = await sender.CreateMessageBatchAsync(); - // Actual limit is 262144 bytes for a single message. - ServiceBusMessage message = new ServiceBusMessage(new byte[300000]); - + // Actual limit is set by the service; query it from the batch. + ServiceBusMessage message = new ServiceBusMessage(new byte[batch.MaxSizeInBytes + 10]); Assert.That(async () => await sender.SendMessageAsync(message), Throws.InstanceOf().And.Property(nameof(ServiceBusException.Reason)).EqualTo(ServiceBusFailureReason.MessageSizeExceeded)); } } @@ -162,9 +164,13 @@ public async Task TryAddReturnsFalseIfSizeExceed() ServiceBusSender sender = client.CreateSender(scope.QueueName); using ServiceBusMessageBatch batch = await sender.CreateMessageBatchAsync(); - // Actual limit is 262144 bytes for a single message. - Assert.That(() => batch.TryAddMessage(new ServiceBusMessage(new byte[200000])), Is.True, "A message was rejected by the batch; all messages should be accepted."); - Assert.That(() => batch.TryAddMessage(new ServiceBusMessage(new byte[200000])), Is.False, "A message was rejected by the batch; message size exceed."); + // Actual limit is set by the service; query it from the batch. Because this will be used for the + // message body, leave some padding for the conversion and batch envelope. + var padding = 500; + var size = (batch.MaxSizeInBytes - padding); + + Assert.That(() => batch.TryAddMessage(new ServiceBusMessage(new byte[size])), Is.True, "A message was rejected by the batch; all messages should be accepted."); + Assert.That(() => batch.TryAddMessage(new ServiceBusMessage(new byte[padding + 1])), Is.False, "A message was rejected by the batch; message size exceed."); await sender.SendMessagesAsync(batch); } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithAADAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithAADAsync.json index eded0d833370..19d6fd59033c 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithAADAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithAADAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "747", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-bad2ad762b27e84a9209da10aff67206-fd13bd398e4a8845-00", + "traceparent": "00-7f83d1d237016840960ad422da463330-6f15717e80380b4e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "1e0d9635f40de0d663e08f8bbf3ac22c", "x-ms-return-client-request-id": "true" @@ -36,12 +36,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:53 GMT", + "Date": "Mon, 19 Oct 2020 17:00:25 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/7b7dcd09?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E7b7dcd09\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:43:54Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:43:54Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/7b7dcd09?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:43:54.16Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:43:54.227Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/7b7dcd09?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E7b7dcd09\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:25Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:25Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/7b7dcd09?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:25.633Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:25.687Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/facf8dee?api-version=2017-04", @@ -50,10 +50,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-9d0d5cf679b7124abfd1fd07b1825332-05584b89c307184f-00", + "traceparent": "00-499ad6deeed46545b61aff716a4378a1-f0e8da1ce1d28747-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "f756fad73c23db479d7667504f42d3af", "x-ms-return-client-request-id": "true" @@ -76,22 +76,22 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:54 GMT", + "Date": "Mon, 19 Oct 2020 17:00:26 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/facf8dee?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Efacf8dee\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:43:55Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:43:55Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/facf8dee?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:43:55.083Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:43:55.153Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/facf8dee?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Efacf8dee\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:26Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:26Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/facf8dee?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:26.76Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:26.91Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/7b7dcd09?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-f35f304866971645b8f283d7a43b2073-423afbc3b8c11d4a-00", + "traceparent": "00-39956f4d2068c946841b9e7350a51d93-b2769c680e43334f-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "cab11e674a88fa67b6ef97069da447d8", "x-ms-return-client-request-id": "true" @@ -100,8 +100,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:43:55 GMT", - "ETag": "637320842342270000", + "Date": "Mon, 19 Oct 2020 17:00:27 GMT", + "ETag": "637387236256870000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -112,10 +112,10 @@ "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-d05cd361b1272544b263d4ed96198348-b6d000f3a5983b41-00", + "traceparent": "00-9c91840efb44254288b4e7c20c6f5d2b-9ea336a1ea785e46-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "df8e92ebd7d5f9a04e3181978c869120", "x-ms-return-client-request-id": "true" @@ -124,8 +124,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:43:55 GMT", - "ETag": "637320842351530000", + "Date": "Mon, 19 Oct 2020 17:00:27 GMT", + "ETag": "637387236269100000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -136,4 +136,4 @@ "RandomSeed": "1020436979", "SERVICEBUS_CONNECTION_STRING": "Endpoint=sb://recordedtests.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Kg==" } -} \ No newline at end of file +} diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithSharedKeyCredentialAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithSharedKeyCredentialAsync.json new file mode 100644 index 000000000000..e3e8385b4628 --- /dev/null +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/AuthenticateWithSharedKeyCredentialAsync.json @@ -0,0 +1,139 @@ +{ + "Entries": [ + { + "RequestUri": "https://recordedtests.servicebus.windows.net/f9c4a86f?api-version=2017-04", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "747", + "Content-Type": "application/atom\u002Bxml", + "traceparent": "00-c11d974fd2f55a47b87086b7d25bf6b5-e46d1b840a6e1e4f-00", + "User-Agent": [ + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" + ], + "x-ms-client-request-id": "a0225c00ceb24b2a5e8128cd095d5317", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": [ + "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\r\n", + " \u003Ccontent type=\u0022application/xml\u0022\u003E\r\n", + " \u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022\u003E\r\n", + " \u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\r\n", + " \u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\r\n", + " \u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\r\n", + " \u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\r\n", + " \u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\r\n", + " \u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\r\n", + " \u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\r\n", + " \u003CAuthorizationRules /\u003E\r\n", + " \u003CStatus\u003EActive\u003C/Status\u003E\r\n", + " \u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\r\n", + " \u003C/QueueDescription\u003E\r\n", + " \u003C/content\u003E\r\n", + "\u003C/entry\u003E" + ], + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", + "Date": "Mon, 19 Oct 2020 17:00:28 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked" + }, + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/f9c4a86f?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ef9c4a86f\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:29Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:29Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/f9c4a86f?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:29.143Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:29.17Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + }, + { + "RequestUri": "https://recordedtests.servicebus.windows.net/0cbf6b9a?api-version=2017-04", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "577", + "Content-Type": "application/atom\u002Bxml", + "traceparent": "00-c037da40d4dff142a946a4e937406a9a-d0713cce29f39444-00", + "User-Agent": [ + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" + ], + "x-ms-client-request-id": "ad8d85a533164e2d4ab47f0a213bb4ba", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": [ + "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\r\n", + " \u003Ccontent type=\u0022application/xml\u0022\u003E\r\n", + " \u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022\u003E\r\n", + " \u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\r\n", + " \u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\r\n", + " \u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\r\n", + " \u003CAuthorizationRules /\u003E\r\n", + " \u003CStatus\u003EActive\u003C/Status\u003E\r\n", + " \u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\r\n", + " \u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\r\n", + " \u003C/TopicDescription\u003E\r\n", + " \u003C/content\u003E\r\n", + "\u003C/entry\u003E" + ], + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", + "Date": "Mon, 19 Oct 2020 17:00:29 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked" + }, + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/0cbf6b9a?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E0cbf6b9a\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:30Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:30Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/0cbf6b9a?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:30.123Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:30.163Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + }, + { + "RequestUri": "https://recordedtests.servicebus.windows.net/f9c4a86f?api-version=2017-04", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6fc77f407de63a409454a8ffe40c1f96-3f38ebb413734945-00", + "User-Agent": [ + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" + ], + "x-ms-client-request-id": "eae2acda78a9cc204174aef9f890061c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 17:00:30 GMT", + "ETag": "637387236291700000", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://recordedtests.servicebus.windows.net/0cbf6b9a?api-version=2017-04", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c823464ea43f84438ca287a1c260a823-eaf7b521cf82954b-00", + "User-Agent": [ + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" + ], + "x-ms-client-request-id": "b427e292c775cdc42ed356fd4f202922", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 17:00:30 GMT", + "ETag": "637387236301630000", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1481201580", + "SERVICEBUS_CONNECTION_STRING": "Endpoint=sb://recordedtests.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Kg==" + } +} diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicQueueCrudOperationsAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicQueueCrudOperationsAsync.json index 1e2b1322c0df..75c7571b7f1f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicQueueCrudOperationsAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicQueueCrudOperationsAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "1671", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-140b34781bbb714986a9e87a7b7cada8-01a12a11a30cf343-00", + "traceparent": "00-042f1a8dd1e6b64dae2c2b655feace5a-421310c9c021ff49-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "66a99194365a34901ed54632b6e9bc71", "x-ms-return-client-request-id": "true" @@ -53,22 +53,22 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:56 GMT", + "Date": "Mon, 19 Oct 2020 17:00:31 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:43:57Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:43:57Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:43:57.19Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:43:57.257Z\u003C/UpdatedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:31Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:32Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:31.943Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:32.027Z\u003C/UpdatedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-f48b5008f19eeb439e53154629cc4648-f56b69392c58fc49-00", + "traceparent": "00-aa17ffc8bcc24945b8f16d31f52ccb53-091e7649201a1143-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "de771c0861d9b2051044074260bf5055", "x-ms-return-client-request-id": "true" @@ -77,13 +77,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:57 GMT", - "ETag": "637320842372570000", + "Date": "Mon, 19 Oct 2020 17:00:31 GMT", + "ETag": "637387236320270000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:43:57Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:43:57Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:43:57.19Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:43:57.257Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:31Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:32Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:31.943Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:32.027Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04", @@ -93,10 +93,10 @@ "Content-Length": "1841", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-ed175f9d82d0864abef8b0d6204f5653-a27feee6f98a9b46-00", + "traceparent": "00-23b8a3fc5d8b2b48976e3aecf253b0a8-2ccbf22a93ac9949-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b91f4301e6d08d1ac46295d5987def8c", "x-ms-return-client-request-id": "true" @@ -142,23 +142,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:57 GMT", - "ETag": "637320842372570000", + "Date": "Mon, 19 Oct 2020 17:00:31 GMT", + "ETag": "637387236320270000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cupdated\u003E2020-08-03T20:43:57Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EnoManage\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CAutoDeleteOnIdle\u003EPT6M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cupdated\u003E2020-10-19T17:00:32Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EnoManage\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CAutoDeleteOnIdle\u003EPT6M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-1874c5917f7ed843b88fe30d3046fd40-f7fb77d52822eb4d-00", + "traceparent": "00-59b4e9db2642d345ab09dfee8bd94a5b-14846eca7dd60e4e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "3dc6b871862333cc8cf756162f4dd45e", "x-ms-return-client-request-id": "true" @@ -167,13 +167,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:57 GMT", - "ETag": "637320842378600000", + "Date": "Mon, 19 Oct 2020 17:00:31 GMT", + "ETag": "637387236326000000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:43:57Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:43:57Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EnoManage\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:43:57.19Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:43:57.86Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT6M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:31Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:32Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EnoManage\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:31.943Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:32.6Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT6M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026enrich=False\u0026$skip=0\u0026$top=100", @@ -181,8 +181,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "7331f08403c921a102e91977cb2f1992", "x-ms-return-client-request-id": "true" @@ -191,21 +191,21 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:57 GMT", + "Date": "Mon, 19 Oct 2020 17:00:32 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EQueues\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:43:58Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:43:57Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:43:57Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022../basicqueuecrudoperationsb49754c3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EnoManage\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:43:57.19Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:43:57.86Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT6M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EQueues\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:33Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/$Resources/queues?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicqueuecrudoperationsb49754c3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:31Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:32Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022../basicqueuecrudoperationsb49754c3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EnoManage\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EDisabled\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:31.943Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:32.6Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicQueueCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT6M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-454dcf26678af54a8a72c329af89bbc4-4a7ab6e76dd0f241-00", + "traceparent": "00-f6ece6f894346d4dbcc59181cf0fa84c-5306120231edc349-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "a8d17a5413f97a3277ec2cd990035e76", "x-ms-return-client-request-id": "true" @@ -214,8 +214,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:43:58 GMT", - "ETag": "637320842378600000", + "Date": "Mon, 19 Oct 2020 17:00:32 GMT", + "ETag": "637387236326000000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -226,10 +226,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-4c1245649531184a9a209c3546a3958b-115d31478f68c041-00", + "traceparent": "00-fc08ebc39720304083362db8911b3f64-1cf10f1e66966f44-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "a850378e7c4c6ec317a43a396d54685c", "x-ms-return-client-request-id": "true" @@ -238,22 +238,22 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:43:59 GMT", + "Date": "Mon, 19 Oct 2020 17:00:33 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63042\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:43:59Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142945\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:34Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicqueuecrudoperationsb49754c3?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-b0e24dd1074b174f8dddb5c868e49a51-94f32242c103744b-00", + "traceparent": "00-616a72365a33474aa43a2a090f5e72a5-682d0888fdde334e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b4c2c4dd2c7c7065beb6fcddd6c890ff", "x-ms-return-client-request-id": "true" @@ -262,12 +262,12 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:00 GMT", + "Date": "Mon, 19 Oct 2020 17:00:34 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63043\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:00Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142946\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:35Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" } ], "Variables": { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicRuleCrudOperationsAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicRuleCrudOperationsAsync.json index 1784b68b7579..0b7f24b7ed5e 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicRuleCrudOperationsAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicRuleCrudOperationsAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-5b33b85f3cef2240b2aef35002f32d9d-daf3f1f02defe745-00", + "traceparent": "00-c13f19306904bd4287ce41c8f3c8f48b-7c6e33252fa76649-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "c0009fe299ffcd31391cd6bca89f8c73", "x-ms-return-client-request-id": "true" @@ -33,12 +33,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E33df34f6\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:01Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:01Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:01.3Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:01.37Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E33df34f6\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:35Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:35Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:35.75Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:35.797Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04", @@ -47,10 +47,10 @@ "Authorization": "Sanitized", "Content-Length": "929", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-eded11f7f3c8444eb99a393d34e46554-7540fee3f7413e46-00", + "traceparent": "00-0c5b66a33b55f348b19f56ac87f4a55e-14437ebebaf8504f-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "4cf8b4d9fa215c74e45fab24f333c44e", "x-ms-return-client-request-id": "true" @@ -80,23 +80,23 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E226f8811\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:01Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:01Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:01.9158104Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:01.9158104Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E226f8811\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.3189572Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:36.3189572Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-2a310f9608d4444fb7d3b9c415862f44-6ecb6dc713c9e44c-00", + "traceparent": "00-0327e3d12e73ac4cb58a42914c5b542e-3ee96bf65b6dce43-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "601d04770d3b78ed56a1e946c293d7e8", "x-ms-return-client-request-id": "true" @@ -105,13 +105,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:01Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:01Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022TrueFilter\u0022\u003E\u003CSqlExpression\u003E1=1\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:01.9139358Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022TrueFilter\u0022\u003E\u003CSqlExpression\u003E1=1\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.3224418Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04", @@ -120,10 +120,10 @@ "Authorization": "Sanitized", "Content-Length": "1837", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-6e4bc876557f16439da1bc3dc0681385-4705414bb15e0d4c-00", + "traceparent": "00-d14c81b0168ecb40b242d9a265179acb-a06d29dd7c528041-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "43814c37a712e74b2ba3db9fee0dd905", "x-ms-return-client-request-id": "true" @@ -149,7 +149,7 @@ " \u003C/KeyValueOfstringanyType\u003E\r\n", " \u003CKeyValueOfstringanyType\u003E\r\n", " \u003CKey\u003E@dateParam\u003C/Key\u003E\r\n", - " \u003CValue p4:type=\u0022l28:dateTime\u0022 xmlns:l28=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-08-03T20:44:01.3987201Z\u003C/Value\u003E\r\n", + " \u003CValue p4:type=\u0022l28:dateTime\u0022 xmlns:l28=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-10-19T17:00:36.2714646Z\u003C/Value\u003E\r\n", " \u003C/KeyValueOfstringanyType\u003E\r\n", " \u003CKeyValueOfstringanyType\u003E\r\n", " \u003CKey\u003E@timeSpanParam\u003C/Key\u003E\r\n", @@ -169,23 +169,23 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule2\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EstringValue = @stringParam AND intValue = @intParam AND longValue = @longParam AND dateValue = @dateParam AND timeSpanValue = @timeSpanParam\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E1\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:long\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E12\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@dateParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:dateTime\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-08-03T20:44:01.3987201Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@timeSpanParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:duration\u0022 xmlns:d6p1=\u0022http://schemas.microsoft.com/2003/10/Serialization/\u0022\u003EP1D\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022SqlRuleAction\u0022\u003E\u003CSqlExpression\u003ESET a=\u0027b\u0027\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters/\u003E\u003C/Action\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.1501969Z\u003C/CreatedAt\u003E\u003CName\u003Erule2\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule2\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EstringValue = @stringParam AND intValue = @intParam AND longValue = @longParam AND dateValue = @dateParam AND timeSpanValue = @timeSpanParam\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E1\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:long\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E12\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@dateParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:dateTime\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-10-19T17:00:36.2714646Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@timeSpanParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:duration\u0022 xmlns:d6p1=\u0022http://schemas.microsoft.com/2003/10/Serialization/\u0022\u003EP1D\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022SqlRuleAction\u0022\u003E\u003CSqlExpression\u003ESET a=\u0027b\u0027\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters/\u003E\u003C/Action\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.5845445Z\u003C/CreatedAt\u003E\u003CName\u003Erule2\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-3e7559217b6eec4299cc57a020d85090-2b1efcdbb917b146-00", + "traceparent": "00-6f81fb18e3f38b4495b595593cd07a4b-a2473c4b4397e048-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "a44488572b82cc37c680f57f112e9a51", "x-ms-return-client-request-id": "true" @@ -194,13 +194,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule2\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EstringValue = @stringParam AND intValue = @intParam AND longValue = @longParam AND dateValue = @dateParam AND timeSpanValue = @timeSpanParam\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E1\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:long\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E12\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@dateParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:dateTime\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-08-03T20:44:01.3987201Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@timeSpanParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:duration\u0022 xmlns:d6p1=\u0022http://schemas.microsoft.com/2003/10/Serialization/\u0022\u003EP1D\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022SqlRuleAction\u0022\u003E\u003CSqlExpression\u003ESET a=\u0027b\u0027\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters/\u003E\u003C/Action\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.1483547Z\u003C/CreatedAt\u003E\u003CName\u003Erule2\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule2\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule2?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EstringValue = @stringParam AND intValue = @intParam AND longValue = @longParam AND dateValue = @dateParam AND timeSpanValue = @timeSpanParam\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E1\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:long\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E12\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@dateParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:dateTime\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-10-19T17:00:36.2714646Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@timeSpanParam\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:duration\u0022 xmlns:d6p1=\u0022http://schemas.microsoft.com/2003/10/Serialization/\u0022\u003EP1D\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022SqlRuleAction\u0022\u003E\u003CSqlExpression\u003ESET a=\u0027b\u0027\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters/\u003E\u003C/Action\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.5724397Z\u003C/CreatedAt\u003E\u003CName\u003Erule2\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04", @@ -209,10 +209,10 @@ "Authorization": "Sanitized", "Content-Length": "962", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-abb9912ec466384aab654652635961a9-b4ca05a6034eef4c-00", + "traceparent": "00-8211287d0c612248b1634296ea0d7ddd-5e022335fa990645-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "a7ecc38780b2d03bb8353598324e8949", "x-ms-return-client-request-id": "true" @@ -245,23 +245,23 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationId\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.2752018Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationId\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.7095303Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-acf13fe57984854aa04f95a38d7fe557-41172139d4b67c4b-00", + "traceparent": "00-864f45c66b1794499dff02326d50fead-a70b07808e028b41-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "3aeee4c7334f0c6514b47d92b1cbd6fc", "x-ms-return-client-request-id": "true" @@ -270,13 +270,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationId\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.2733318Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationId\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.7130854Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026enrich=False\u0026$skip=0\u0026$top=100", @@ -284,8 +284,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "2b188a093220d7534d74eb4df59f9a78", "x-ms-return-client-request-id": "true" @@ -294,23 +294,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ERules\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules/rule1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:01Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:01Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022rules/rule1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022TrueFilter\u0022\u003E\u003CSqlExpression\u003E1=1\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:01.9139358Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules/rule2?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule2\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022rules/rule2?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EstringValue = @stringParam AND intValue = @intParam AND longValue = @longParam AND dateValue = @dateParam AND timeSpanValue = @timeSpanParam\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:string\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:int\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E1\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:long\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E12\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@dateParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:dateTime\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-08-03T20:44:01.3987201Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@timeSpanParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:duration\u0022 xmlns:d5p1=\u0022http://schemas.microsoft.com/2003/10/Serialization/\u0022\u003EP1D\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022SqlRuleAction\u0022\u003E\u003CSqlExpression\u003ESET a=\u0027b\u0027\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters/\u003E\u003C/Action\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.1483547Z\u003C/CreatedAt\u003E\u003CName\u003Erule2\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules/rule3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022rules/rule3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationId\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:string\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.2733318Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ERules\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules/rule1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022rules/rule1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022TrueFilter\u0022\u003E\u003CSqlExpression\u003E1=1\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.3224418Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules/rule2?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule2\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022rules/rule2?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EstringValue = @stringParam AND intValue = @intParam AND longValue = @longParam AND dateValue = @dateParam AND timeSpanValue = @timeSpanParam\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:string\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:int\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E1\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:long\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E12\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@dateParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:dateTime\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-10-19T17:00:36.2714646Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@timeSpanParam\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:duration\u0022 xmlns:d5p1=\u0022http://schemas.microsoft.com/2003/10/Serialization/\u0022\u003EP1D\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022SqlRuleAction\u0022\u003E\u003CSqlExpression\u003ESET a=\u0027b\u0027\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters/\u003E\u003C/Action\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.5724397Z\u003C/CreatedAt\u003E\u003CName\u003Erule2\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/rules/rule3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022rules/rule3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationId\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d5p1:string\u0022 xmlns:d5p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.7130854Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-74c4ba4738601f45ba483cd031276b1f-980ebb418795e14e-00", + "traceparent": "00-03335615e9b5bc419c0bf35b02894c59-09ac1cc0853d454d-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "2cb8acf65f4053025ee093fd02a81eed", "x-ms-return-client-request-id": "true" @@ -319,13 +319,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:36 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E226f8811\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:01Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:01Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:01.9139358Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:01.9139358Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-08-03T20:44:01.913\u003C/AccessedAt\u003E\u003CCountDetails xmlns:d3p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd3p1:ActiveMessageCount\u003E0\u003C/d3p1:ActiveMessageCount\u003E\u003Cd3p1:DeadLetterMessageCount\u003E0\u003C/d3p1:DeadLetterMessageCount\u003E\u003Cd3p1:ScheduledMessageCount\u003E0\u003C/d3p1:ScheduledMessageCount\u003E\u003Cd3p1:TransferMessageCount\u003E0\u003C/d3p1:TransferMessageCount\u003E\u003Cd3p1:TransferDeadLetterMessageCount\u003E0\u003C/d3p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E226f8811\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.3224418Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:36.3224418Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-10-19T17:00:36.323Z\u003C/AccessedAt\u003E\u003CCountDetails xmlns:d3p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd3p1:ActiveMessageCount\u003E0\u003C/d3p1:ActiveMessageCount\u003E\u003Cd3p1:DeadLetterMessageCount\u003E0\u003C/d3p1:DeadLetterMessageCount\u003E\u003Cd3p1:ScheduledMessageCount\u003E0\u003C/d3p1:ScheduledMessageCount\u003E\u003Cd3p1:TransferMessageCount\u003E0\u003C/d3p1:TransferMessageCount\u003E\u003Cd3p1:TransferDeadLetterMessageCount\u003E0\u003C/d3p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04", @@ -335,10 +335,10 @@ "Content-Length": "970", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-12cbb6306ea4fa41898ed74bb79b6913-c4a0e20233362c49-00", + "traceparent": "00-584b6d57ac596344a375475669908e6e-25145c87afdb8644-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "a78e395f5e3595289017ecda48181674", "x-ms-return-client-request-id": "true" @@ -371,23 +371,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:37 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:02Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:02Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationIdModified\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:02.5252532Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule3\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule3?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CCorrelationId\u003EcorrelationIdModified\u003C/CorrelationId\u003E\u003CMessageId\u003EmessageId\u003C/MessageId\u003E\u003CTo\u003Eto\u003C/To\u003E\u003CReplyTo\u003EreplyTo\u003C/ReplyTo\u003E\u003CLabel\u003Elabel\u003C/Label\u003E\u003CSessionId\u003EsessionId\u003C/SessionId\u003E\u003CReplyToSessionId\u003EreplyToSessionId\u003C/ReplyToSessionId\u003E\u003CContentType\u003EcontentType\u003C/ContentType\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EcustomKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EcustomValue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.9282764Z\u003C/CreatedAt\u003E\u003CName\u003Erule3\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-6544d37bfbf1b14c8060ef9400b4cd8f-995fb26330dff848-00", + "traceparent": "00-b0dff7a33fa71241867a51702f96dabf-7e8d52af38b3e240-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "059c051aa913a9bc88c4cc409f56d4a4", "x-ms-return-client-request-id": "true" @@ -396,23 +396,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:37 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:01Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:01Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022TrueFilter\u0022\u003E\u003CSqlExpression\u003E1=1\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:01.9139358Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:36Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:36Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022TrueFilter\u0022\u003E\u003CSqlExpression\u003E1=1\u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:36.3224418Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-721946403595de4d9675245dab4d1692-104f728b9e2eb148-00", + "traceparent": "00-cf3f30401020b04882671becc8b857f2-31ab63761fbc8641-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "bcedfd55f210974283229b2972270b46", "x-ms-return-client-request-id": "true" @@ -421,8 +421,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:01 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:37 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -433,10 +433,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-f0f58a030b5c5a4e89315ce2ca377c47-2dc26d59a00aa642-00", + "traceparent": "00-b50f42fc9566314d91bfa851f5c70282-40e1004b78b1094c-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "fde21ec9190bb5da7ce51f7191e8f53a", "x-ms-return-client-request-id": "true" @@ -445,23 +445,23 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:02 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:38 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EEntity \u0027recordedtests:Topic:33df34f6|226f8811|rule1\u0027 was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:ecb406ee-7e3f-4e9a-af6f-fc215521df00_G8_B64, SystemTracker:recordedtests:Topic:33df34f6|226f8811|rule1, Timestamp:2020-08-03T20:44:02\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EEntity \u0027recordedtests.servicebus.windows.net:Topic:33df34f6|226f8811|rule1\u0027 was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:0f2d02b9-53f4-4868-9518-cfde74cbac96_B5, SystemTracker:NoSystemTracker, Timestamp:2020-10-19T17:00:37\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6/Subscriptions/226f8811/Rules/rule1?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-0be690c1520dd14b8135d3082dfeea50-18ecdcc70ac3924d-00", + "traceparent": "00-862adfbf49b07e4f90998874caa4c528-4aff25c71459b642-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "4a8548425a2a2864c20582f00d933660", "x-ms-return-client-request-id": "true" @@ -470,23 +470,23 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:04 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:39 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EEntity \u0027recordedtests:Topic:33df34f6|226f8811|rule1\u0027 was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:384e4a9f-576b-4f1b-b2d8-77224f8ba74d_G8_B64, SystemTracker:recordedtests:Topic:33df34f6|226f8811|rule1, Timestamp:2020-08-03T20:44:03\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EEntity \u0027recordedtests.servicebus.windows.net:Topic:33df34f6|226f8811|rule1\u0027 was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:e3d8c3d2-b206-45ce-9258-7561b0e8700e_B5, SystemTracker:NoSystemTracker, Timestamp:2020-10-19T17:00:38\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/33df34f6?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-970470d5cf4a614886726c504558df1e-2f8d394d669bae4b-00", + "traceparent": "00-17c73e0a271e7545bf5127338c9ab6bb-63f12c05a4b01142-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "817686b9d6733c9923373f2bd2d1059a", "x-ms-return-client-request-id": "true" @@ -495,8 +495,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:05 GMT", - "ETag": "637320842413700000", + "Date": "Mon, 19 Oct 2020 17:00:39 GMT", + "ETag": "637387236357970000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -504,7 +504,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2020-08-03T16:44:01.3987201-04:00", + "DateTimeOffsetNow": "2020-10-19T13:00:36.2714646-04:00", "RandomSeed": "860882088", "SERVICEBUS_CONNECTION_STRING": "Endpoint=sb://recordedtests.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Kg==" } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicSubscriptionCrudOperationsAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicSubscriptionCrudOperationsAsync.json index ebbd5cfd18c6..8f5091a9b2af 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicSubscriptionCrudOperationsAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicSubscriptionCrudOperationsAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-18a5fdac8e62d347a094bc082810c728-c3238f24aef0eb4b-00", + "traceparent": "00-858c0bb6a244d2499a22bb2b34029f54-511ac45897ef1e4b-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "f8fec3750236c457e9eba05b99d06dd5", "x-ms-return-client-request-id": "true" @@ -33,12 +33,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicsubscriptioncrudoperations9cc53e8f\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:05Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:05Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:05.753Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:05.823Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasicsubscriptioncrudoperations9cc53e8f\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:40Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:40.067Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:40.123Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04", @@ -47,10 +47,10 @@ "Authorization": "Sanitized", "Content-Length": "1112", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-5729bfb1e9d6eb479cb27f1fbbf16066-c6021d5f64340647-00", + "traceparent": "00-511e9b21241a164c920c3934be52c6db-7520015504077d4d-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "31d6cbb94b4865fa0b01d316daa68cff", "x-ms-return-client-request-id": "true" @@ -83,23 +83,23 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:06Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:06Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:06.2764748Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:06.2764748Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:40Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:40.6317234Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:40.6317234Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-2ddc3fb4de72e544896596ffc6fcd938-a6745001cdba7d4c-00", + "traceparent": "00-a0c293fadcc8784d8193660d2aa2575c-c43610658d763349-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "74f8e82a6ab5540d1d5442f389d82bf8", "x-ms-return-client-request-id": "true" @@ -108,13 +108,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:06Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:06Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:06.2735196Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:06.2735196Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-08-03T20:44:06.273\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CCountDetails xmlns:d3p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd3p1:ActiveMessageCount\u003E0\u003C/d3p1:ActiveMessageCount\u003E\u003Cd3p1:DeadLetterMessageCount\u003E0\u003C/d3p1:DeadLetterMessageCount\u003E\u003Cd3p1:ScheduledMessageCount\u003E0\u003C/d3p1:ScheduledMessageCount\u003E\u003Cd3p1:TransferMessageCount\u003E0\u003C/d3p1:TransferMessageCount\u003E\u003Cd3p1:TransferDeadLetterMessageCount\u003E0\u003C/d3p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:40Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E8\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:40.6453744Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:40.6453744Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-10-19T17:00:40.647Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CCountDetails xmlns:d3p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd3p1:ActiveMessageCount\u003E0\u003C/d3p1:ActiveMessageCount\u003E\u003Cd3p1:DeadLetterMessageCount\u003E0\u003C/d3p1:DeadLetterMessageCount\u003E\u003Cd3p1:ScheduledMessageCount\u003E0\u003C/d3p1:ScheduledMessageCount\u003E\u003Cd3p1:TransferMessageCount\u003E0\u003C/d3p1:TransferMessageCount\u003E\u003Cd3p1:TransferDeadLetterMessageCount\u003E0\u003C/d3p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04", @@ -124,10 +124,10 @@ "Content-Length": "903", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-4459d24fc4460445b778aabe622bc06c-dc2638a2c31c2d41-00", + "traceparent": "00-190c39b526b245429442c631df7828c0-3965734a1a92a241-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "2da345aa14c02961c999ed352e40ea42", "x-ms-return-client-request-id": "true" @@ -154,23 +154,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:06Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:06Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:06.5577373Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:06.5577373Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:40Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:40.7567301Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:40.7567301Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-4cb0a057ca9d2a45b6a32987b96d8aea-72b9333190e4444a-00", + "traceparent": "00-75086aab1a311a41946b2ec8348e61d0-43c102362d3fac48-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b030a15ef9d74f20bd8113f40906db33", "x-ms-return-client-request-id": "true" @@ -179,13 +179,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:06Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:06Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:06.2735196Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:06.5547998Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-08-03T20:44:06.273\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CCountDetails xmlns:d3p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd3p1:ActiveMessageCount\u003E0\u003C/d3p1:ActiveMessageCount\u003E\u003Cd3p1:DeadLetterMessageCount\u003E0\u003C/d3p1:DeadLetterMessageCount\u003E\u003Cd3p1:ScheduledMessageCount\u003E0\u003C/d3p1:ScheduledMessageCount\u003E\u003Cd3p1:TransferMessageCount\u003E0\u003C/d3p1:TransferMessageCount\u003E\u003Cd3p1:TransferDeadLetterMessageCount\u003E0\u003C/d3p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Esb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:40Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022sb://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:40.6453744Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:40.770388Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-10-19T17:00:40.647Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CCountDetails xmlns:d3p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd3p1:ActiveMessageCount\u003E0\u003C/d3p1:ActiveMessageCount\u003E\u003Cd3p1:DeadLetterMessageCount\u003E0\u003C/d3p1:DeadLetterMessageCount\u003E\u003Cd3p1:ScheduledMessageCount\u003E0\u003C/d3p1:ScheduledMessageCount\u003E\u003Cd3p1:TransferMessageCount\u003E0\u003C/d3p1:TransferMessageCount\u003E\u003Cd3p1:TransferDeadLetterMessageCount\u003E0\u003C/d3p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026enrich=False\u0026$skip=0\u0026$top=100", @@ -193,8 +193,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "956cdad55f03153e87cfab1c7cd726dd", "x-ms-return-client-request-id": "true" @@ -203,23 +203,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ESubscriptions\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:06Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:06Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:06Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022Subscriptions/2b187457?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:06.2735196Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:06.5547998Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-08-03T20:44:06.273\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ESubscriptions\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E2b187457\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:40Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:40Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022Subscriptions/2b187457?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT45S\u003C/LockDuration\u003E\u003CRequiresSession\u003Etrue\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Etrue\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E9\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:40.6453744Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:40.770388Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-10-19T17:00:40.647Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicSubscriptionCrudOperations\u003C/UserMetadata\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f/Subscriptions/2b187457?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-4c963e7c9570ae4c84759cdaf60668ed-afcc57505fc82c4c-00", + "traceparent": "00-839cf9c0470a534b95f472f383068f05-a8e805c4f9bcd545-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e895ff6a7ba7b12024536f3f006d20c2", "x-ms-return-client-request-id": "true" @@ -228,8 +228,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:06 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:40 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -240,10 +240,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-bd66b36339b2e246b4857da3ea32c43c-a40607176f4e7242-00", + "traceparent": "00-1162ec08a5c50b4d9fafbccc385ad21f-a9469c2239047c4e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "5460babd55d3ff3f621b29084d04d2e6", "x-ms-return-client-request-id": "true" @@ -252,23 +252,23 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:07 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:41 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EEntity \u0027recordedtests:Topic:basicsubscriptioncrudoperations9cc53e8f|2b187457\u0027 was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:881c431b-96c8-45b8-9eb7-45afd022374b_G8_B64, SystemTracker:recordedtests:Topic:basicsubscriptioncrudoperations9cc53e8f|2b187457, Timestamp:2020-08-03T20:44:06\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EEntity \u0027recordedtests.servicebus.windows.net:Topic:basicsubscriptioncrudoperations9cc53e8f|2b187457\u0027 was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:6bb77880-6451-40f1-8640-ff2f3dd7925e_B7, SystemTracker:NoSystemTracker, Timestamp:2020-10-19T17:00:40\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basicsubscriptioncrudoperations9cc53e8f?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-9ec7be26da8dd349a1a833f5f9500096-73379679be60bb4b-00", + "traceparent": "00-ca4e7caa142fe84b9b639edc6775f10d-77cbcba664e9b043-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "098a365bf3715a8bbabb70afefff151a", "x-ms-return-client-request-id": "true" @@ -277,8 +277,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:08 GMT", - "ETag": "637320842458230000", + "Date": "Mon, 19 Oct 2020 17:00:42 GMT", + "ETag": "637387236401230000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -289,10 +289,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-ac6b9c0b490ba746a8dcfad3b41f94de-f8310694f6a19d4f-00", + "traceparent": "00-088d45bd3036f04fad40bf0261d6d6f4-a813272208eb1644-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "c25ee9aed1771509c095858c51186320", "x-ms-return-client-request-id": "true" @@ -301,12 +301,12 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:09 GMT", + "Date": "Mon, 19 Oct 2020 17:00:43 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63044\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:08Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142953\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:43Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" } ], "Variables": { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicTopicCrudOperationsAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicTopicCrudOperationsAsync.json index ac102bd64520..cd9d0e841f42 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicTopicCrudOperationsAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/BasicTopicCrudOperationsAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "1499", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-57e98a1b1f3f6644a47d14f1a87c02ac-4aec80f8e095e445-00", + "traceparent": "00-fc2ff61822abcf44ad4908741c266e7a-4509fa55ad62b247-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "f857ae802fe4955d48991771f474320b", "x-ms-return-client-request-id": "true" @@ -50,22 +50,22 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:10 GMT", + "Date": "Mon, 19 Oct 2020 17:00:44 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:09Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:09Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:09.657Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:09.723Z\u003C/UpdatedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:43Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:43Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:43.81Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:43.84Z\u003C/UpdatedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-a6049b21c53f014e97b760dde44c2a36-791d73b345c7d441-00", + "traceparent": "00-60ba8d99d201df46a8eac1670c02b2d5-b803b5d66df36649-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b5b4520b2950c4c333fb5ceb691caa4b", "x-ms-return-client-request-id": "true" @@ -74,13 +74,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:10 GMT", - "ETag": "637320842497230000", + "Date": "Mon, 19 Oct 2020 17:00:44 GMT", + "ETag": "637387236438400000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:09Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:09Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:09.657Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:09.723Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:43Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:43Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP2D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E2048\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT1M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:43.81Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:43.84Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04", @@ -90,10 +90,10 @@ "Content-Length": "1836", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-4f90811f2c5cd54286ec0ab04d18ad45-99134977a9824b45-00", + "traceparent": "00-8f7fba184c234343ac039e73ac6d5ac4-bfad4fa1e978f044-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "26a93e96f52f467049a4d75f9b4ed6cb", "x-ms-return-client-request-id": "true" @@ -138,23 +138,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:10 GMT", - "ETag": "637320842497230000", + "Date": "Mon, 19 Oct 2020 17:00:44 GMT", + "ETag": "637387236438400000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cupdated\u003E2020-08-03T20:44:10Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT2M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cupdated\u003E2020-10-19T17:00:44Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT2M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-2fbfc462e212064b8f896ffbf8ffe3aa-a7d1d5cffb99e141-00", + "traceparent": "00-87f98ebeab636a4d9a6cae90c484292a-0039c4809d21d143-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "81fe85a6820356deeb93c5e8d2722b2b", "x-ms-return-client-request-id": "true" @@ -163,13 +163,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:10 GMT", - "ETag": "637320842503130000", + "Date": "Mon, 19 Oct 2020 17:00:44 GMT", + "ETag": "637387236442930000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:09Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:10Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT2M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:09.657Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:10.313Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:43Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:44Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT2M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:43.81Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:44.293Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026enrich=False\u0026$skip=0\u0026$top=100", @@ -177,8 +177,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b6dacbee0bca16dce16e6cab526328e4", "x-ms-return-client-request-id": "true" @@ -187,21 +187,21 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:10 GMT", + "Date": "Mon, 19 Oct 2020 17:00:44 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ETopics\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:11Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:09Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:10Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022../basictopiccrudoperations1f3aa775?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT2M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:09.657Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:10.313Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ETopics\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:45Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ebasictopiccrudoperations1f3aa775\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:43Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:44Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022../basictopiccrudoperations1f3aa775?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP3D\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Etrue\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT2M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Efalse\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003CAuthorizationRule i:type=\u0022SharedAccessAuthorizationRule\u0022\u003E\u003CClaimType\u003ESharedAccessKey\u003C/ClaimType\u003E\u003CClaimValue\u003ENone\u003C/ClaimValue\u003E\u003CRights\u003E\u003CAccessRights\u003EManage\u003C/AccessRights\u003E\u003CAccessRights\u003ESend\u003C/AccessRights\u003E\u003CAccessRights\u003EListen\u003C/AccessRights\u003E\u003C/Rights\u003E\u003CKeyName\u003EallClaims\u003C/KeyName\u003E\u003CPrimaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/PrimaryKey\u003E\u003CSecondaryKey\u003ESanitizedSanitizedSanitizedSanitizedSanitize\u003C/SecondaryKey\u003E\u003C/AuthorizationRule\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:43.81Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:44.293Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CUserMetadata\u003EBasicTopicCrudOperations\u003C/UserMetadata\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-359e187586835a4f9282dbc0ed0a838b-37c819567623cf4b-00", + "traceparent": "00-4e7f95085bbdaa4d8b5fa6096a6159f5-6d0d07a54d2c0f41-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e4449024291e144860533a9c2f8873d6", "x-ms-return-client-request-id": "true" @@ -210,8 +210,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:11 GMT", - "ETag": "637320842503130000", + "Date": "Mon, 19 Oct 2020 17:00:45 GMT", + "ETag": "637387236442930000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -222,10 +222,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-d3fb1ec96038834580d2891089af492c-6ae0cec8444f5b4d-00", + "traceparent": "00-cf4bea785eed6c4b9132ca3c8235a4db-19a4f1d2b36d5c40-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "d070ab7820739a01a9e89f9516320387", "x-ms-return-client-request-id": "true" @@ -234,22 +234,22 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:12 GMT", + "Date": "Mon, 19 Oct 2020 17:00:46 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63045\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:12Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142955\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:46Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/basictopiccrudoperations1f3aa775?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-8f7810275d700c47ab9b7caa42f02c2e-7219e54f57ac264a-00", + "traceparent": "00-d390383bf0ad184dad108d3437e20b9e-072d039392479b47-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "42c3e06a472dc50d83c65577d03fe659", "x-ms-return-client-request-id": "true" @@ -258,12 +258,12 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:13 GMT", + "Date": "Mon, 19 Oct 2020 17:00:47 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63046\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:13Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142956\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:47Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" } ], "Variables": { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/CorrelationFilterPropertiesAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/CorrelationFilterPropertiesAsync.json index 9acc6fa65ae3..b56d4f6a82d5 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/CorrelationFilterPropertiesAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/CorrelationFilterPropertiesAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-12f1de6b4d551847ababcde6461f3a48-45a9752ac9a91e49-00", + "traceparent": "00-2df956673f039040aec698b24d019d17-f99f5f7cffd32c43-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "d47bb64c4899b91aaf3b3e3c9d79fc13", "x-ms-return-client-request-id": "true" @@ -33,12 +33,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:14 GMT", + "Date": "Mon, 19 Oct 2020 17:00:48 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/b5c6f77b?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Eb5c6f77b\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:13Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:13Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/b5c6f77b?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:13.803Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:13.89Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/b5c6f77b?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Eb5c6f77b\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:47Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:47Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/b5c6f77b?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:47.887Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:47.957Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a?api-version=2017-04", @@ -47,10 +47,10 @@ "Authorization": "Sanitized", "Content-Length": "932", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-8ca4effeb4186a4ab97dfd3462063ab2-a30bcff881a2b747-00", + "traceparent": "00-8bb3a80f5b713e46922b19151b4acaa5-7fbc02d241a92546-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "bbfeb95fd0b45d7cbe630f20d284488e", "x-ms-return-client-request-id": "true" @@ -80,13 +80,13 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:14 GMT", - "ETag": "637320842538900000", + "Date": "Mon, 19 Oct 2020 17:00:48 GMT", + "ETag": "637387236479570000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E8d568a3a\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:14Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:14Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:14.4188298Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:14.4188298Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E8d568a3a\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:48Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:48Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:48.476573Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:48.476573Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a/Rules/rule1?api-version=2017-04", @@ -95,10 +95,10 @@ "Authorization": "Sanitized", "Content-Length": "1059", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-697cfa5fed012e43ad252767f59e8e25-b25be9c3699b534d-00", + "traceparent": "00-307799f4a248b54ba55fcbb67e19d08c-bd26ff34bf1f654e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "cf0da0de732ef2436f9cdd67dffcc62c", "x-ms-return-client-request-id": "true" @@ -119,7 +119,7 @@ " \u003C/KeyValueOfstringanyType\u003E\r\n", " \u003CKeyValueOfstringanyType\u003E\r\n", " \u003CKey\u003EdateTimeKey\u003C/Key\u003E\r\n", - " \u003CValue p4:type=\u0022l28:dateTime\u0022 xmlns:l28=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-08-03T20:44:13.8376852Z\u003C/Value\u003E\r\n", + " \u003CValue p4:type=\u0022l28:dateTime\u0022 xmlns:l28=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-10-19T17:00:48.3209366Z\u003C/Value\u003E\r\n", " \u003C/KeyValueOfstringanyType\u003E\r\n", " \u003C/Properties\u003E\r\n", " \u003C/Filter\u003E\r\n", @@ -131,23 +131,23 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:14 GMT", - "ETag": "637320842538900000", + "Date": "Mon, 19 Oct 2020 17:00:48 GMT", + "ETag": "637387236479570000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a/Rules/rule1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:14Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:14Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a/Rules/rule1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EstringKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EstringVal\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EintKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E5\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EdateTimeKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:dateTime\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-08-03T20:44:13.8376852Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:14.5907163Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a/Rules/rule1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:48Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:48Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/b5c6f77b/Subscriptions/8d568a3a/Rules/rule1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022CorrelationFilter\u0022\u003E\u003CProperties\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EstringKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EstringVal\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EintKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E5\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003EdateTimeKey\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:dateTime\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E2020-10-19T17:00:48.3209366Z\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Properties\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:48.6172052Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/b5c6f77b?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-0067615852868b47ac3c0cf4edc3258c-9afd35fcf4890444-00", + "traceparent": "00-5a7a91bad438194f8ed06f7c8bc4f806-fe59a675b086a042-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e7d34848c4217cb0391e163638fae72b", "x-ms-return-client-request-id": "true" @@ -156,8 +156,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:14 GMT", - "ETag": "637320842538900000", + "Date": "Mon, 19 Oct 2020 17:00:49 GMT", + "ETag": "637387236479570000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -165,7 +165,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2020-08-03T16:44:13.8376852-04:00", + "DateTimeOffsetNow": "2020-10-19T13:00:48.3209366-04:00", "RandomSeed": "439913557", "SERVICEBUS_CONNECTION_STRING": "Endpoint=sb://recordedtests.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Kg==" } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetNamespacePropertiesAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetNamespacePropertiesAsync.json index 7e9bdc0d9d43..8e20df363784 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetNamespacePropertiesAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetNamespacePropertiesAsync.json @@ -5,10 +5,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-5fc9f72dfdbe7045bd7ee0001abff767-14237614c4640e44-00", + "traceparent": "00-c5b7b51aa99b3e4b92c3ce2d5ed06411-f7961b1cd5fad340-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "edd0b0ec7b57ebd015efb982f371e85e", "x-ms-return-client-request-id": "true" @@ -17,11 +17,11 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:15 GMT", + "Date": "Mon, 19 Oct 2020 17:00:49 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$namespaceinfo?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erecordedtests\u003C/title\u003E\u003Cupdated\u003E2020-08-03T20:44:15Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$namespaceinfo?api-version=2017-04\u0026amp;enrich=False\u0022\u003E\u003C/link\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CNamespaceInfo xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CCreatedTime\u003E2020-08-03T20:39:21.093Z\u003C/CreatedTime\u003E\u003CMessagingSKU\u003EPremium\u003C/MessagingSKU\u003E\u003CMessagingUnits\u003E4\u003C/MessagingUnits\u003E\u003CModifiedTime\u003E2020-08-03T20:39:21.093Z\u003C/ModifiedTime\u003E\u003CName\u003Erecordedtests\u003C/Name\u003E\u003CNamespaceType\u003EMessaging\u003C/NamespaceType\u003E\u003C/NamespaceInfo\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$namespaceinfo?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erecordedtests.servicebus.windows.net\u003C/title\u003E\u003Cupdated\u003E2020-10-19T17:00:49Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$namespaceinfo?api-version=2017-04\u0026amp;enrich=False\u0022\u003E\u003C/link\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CNamespaceInfo xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CCreatedTime\u003E2020-10-19T16:59:24.207Z\u003C/CreatedTime\u003E\u003CMessagingSKU\u003EStandard\u003C/MessagingSKU\u003E\u003CModifiedTime\u003E2020-10-19T16:59:24.207Z\u003C/ModifiedTime\u003E\u003CName\u003Erecordedtests.servicebus.windows.net\u003C/Name\u003E\u003CNamespaceType\u003EMessaging\u003C/NamespaceType\u003E\u003C/NamespaceInfo\u003E\u003C/content\u003E\u003C/entry\u003E" } ], "Variables": { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetTopicRuntimeInfoAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetTopicRuntimeInfoAsync.json index 1b353019626d..f5882ee5490d 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetTopicRuntimeInfoAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/GetTopicRuntimeInfoAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-904889b5f83e1346a9723c241f6a31c7-e645c54aa9830848-00", + "traceparent": "00-e204329ee4eaa244a1a2ec5ed4a2a43b-c65cc71e28c29a4c-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "4d228ded48b4862007c4f437d228f2e3", "x-ms-return-client-request-id": "true" @@ -33,22 +33,22 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:16 GMT", + "Date": "Mon, 19 Oct 2020 17:00:50 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:16Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:16Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:16.06Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:16.137Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:50Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:50Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:50.153Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:50.19Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-214f2a43afdb194d86b5bbd330c892b2-9f7e6b5ed6bf7e47-00", + "traceparent": "00-45d68b0470ca3542ae62d1c8168e8f25-eaad70401d20e747-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "d05eca5657a1c1e6e060ed4262361aeb", "x-ms-return-client-request-id": "true" @@ -57,13 +57,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:16 GMT", - "ETag": "637320842561370000", + "Date": "Mon, 19 Oct 2020 17:00:50 GMT", + "ETag": "637387236501900000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:16Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:16Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:16.06Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:16.137Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:50Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:50Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:50.153Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:50.19Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04", @@ -73,10 +73,10 @@ "Content-Length": "965", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-13c1e165e3097744b2dee954ba447fbb-3b0ac9e58786a849-00", + "traceparent": "00-0d027ef5cc7ba747b1c648d3135d9b0d-9b6f26ddb4c6cc4b-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "c77552a1325b3334b3783795f0177ed2", "x-ms-return-client-request-id": "true" @@ -105,13 +105,13 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:16 GMT", - "ETag": "637320842561370000", + "Date": "Mon, 19 Oct 2020 17:00:50 GMT", + "ETag": "637387236501900000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cupdated\u003E2020-08-03T20:44:16Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H40M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cupdated\u003E2020-10-19T17:00:50Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EPT1H40M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6/Subscriptions/3efed47c?api-version=2017-04", @@ -120,10 +120,10 @@ "Authorization": "Sanitized", "Content-Length": "932", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-8d3fb7b80b815f4caff9c4457dad6460-19eb22ce2eccd147-00", + "traceparent": "00-9a93be56a1cba74dbc8b20efe530ac35-9ecd337523b71b4e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e7172a72b51b9599a6606c535ade24d0", "x-ms-return-client-request-id": "true" @@ -153,13 +153,13 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:16 GMT", - "ETag": "637320842567300000", + "Date": "Mon, 19 Oct 2020 17:00:50 GMT", + "ETag": "637387236507400000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6/Subscriptions/3efed47c?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E3efed47c\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:16Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:16Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6/Subscriptions/3efed47c?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:16.9970982Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:16.9970982Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6/Subscriptions/3efed47c?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E3efed47c\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:50Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:50Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6/Subscriptions/3efed47c?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:50.8203208Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:50.8203208Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026enrich=False\u0026$skip=0\u0026$top=100", @@ -167,8 +167,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "809608aa2bb22388952b1c281f51d1c9", "x-ms-return-client-request-id": "true" @@ -177,21 +177,21 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:17 GMT", + "Date": "Mon, 19 Oct 2020 17:00:51 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ETopics\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:17Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:16Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:16Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022../gettopicruntimeinfoe8b230a6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:16.0572632Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:16.7291521Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-08-03T20:44:16.994\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E1\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H40M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003ETopics\u003C/title\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:51Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022/\u003E\u003Centry xml:base=\u0022https://recordedtests.servicebus.windows.net/$Resources/topics?api-version=2017-04\u0026amp;enrich=False\u0026amp;$skip=0\u0026amp;$top=100\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:50Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:50Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022../gettopicruntimeinfoe8b230a6?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:50.1605635Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:50.7543216Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-10-19T17:00:50.817Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E1\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H40M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026enrich=True", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-ec72a97e89dcf943858c6e46a94ba9df-f3d1e12b436cc042-00", + "traceparent": "00-d39de6322c8b9049bc1f51f05dde283f-b88653ff3f9c8145-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "37cf1be1331eebcfb8df20fac6e1d8d5", "x-ms-return-client-request-id": "true" @@ -200,23 +200,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:17 GMT", - "ETag": "637320842567300000", + "Date": "Mon, 19 Oct 2020 17:00:51 GMT", + "ETag": "637387236507400000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=True\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:16Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:16Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=True\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:16.0572632Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:16.7291521Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-08-03T20:44:16.994\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E1\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H40M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=True\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Egettopicruntimeinfoe8b230a6\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:50Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:50Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04\u0026amp;enrich=True\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:50.1605635Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:50.7543216Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E2020-10-19T17:00:50.817Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E1\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EPT1H40M\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/gettopicruntimeinfoe8b230a6?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-95f977f8f14dc44ca369990c015a3b20-50c238b889af2047-00", + "traceparent": "00-917c65aa7ec6e142ac47126ed1001167-c9842c78524e264b-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e7eb6754fe80471fa2f451f099717655", "x-ms-return-client-request-id": "true" @@ -225,8 +225,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:17 GMT", - "ETag": "637320842567300000", + "Date": "Mon, 19 Oct 2020 17:00:51 GMT", + "ETag": "637387236507400000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/SqlFilterParamsAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/SqlFilterParamsAsync.json index c162405857a4..7021ca6b7a37 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/SqlFilterParamsAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/SqlFilterParamsAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-4662607a8cbb0741adbdd568475be5a1-b203669fea3d5148-00", + "traceparent": "00-700c2e8562b2bd4a89281f4382ecb9d8-5a82e62349bbd940-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "07f1abbe9d357f5dde4b27d68763f9a1", "x-ms-return-client-request-id": "true" @@ -33,12 +33,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:19 GMT", + "Date": "Mon, 19 Oct 2020 17:00:52 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/d23cafe1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ed23cafe1\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:18Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:18Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/d23cafe1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:18.793Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:18.863Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/d23cafe1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Ed23cafe1\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:52Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:52Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/d23cafe1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:52.297Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:52.37Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9?api-version=2017-04", @@ -47,10 +47,10 @@ "Authorization": "Sanitized", "Content-Length": "932", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-af42658cdeea0d43b7ce27eb31223d9f-3018b19b1e175348-00", + "traceparent": "00-5a950aca6c5eec4a856a0f06afa28199-2770dd9c17e6c041-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "95b0daa94e3764fada4fd5d978eec839", "x-ms-return-client-request-id": "true" @@ -80,13 +80,13 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:19 GMT", - "ETag": "637320842588630000", + "Date": "Mon, 19 Oct 2020 17:00:52 GMT", + "ETag": "637387236523700000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E95ca9ab9\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:19Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:19Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:19.4034358Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:19.4034358Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E95ca9ab9\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:52Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:52Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:52.8521753Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:52.8521753Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9/Rules/rule1?api-version=2017-04", @@ -95,10 +95,10 @@ "Authorization": "Sanitized", "Content-Length": "1980", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-c720e00271d99d40b538ca5db25eff23-7a2f839085d3bb4e-00", + "traceparent": "00-5ac339e9cf7221438f0902f9f7250082-436cffea98152046-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "4477782899391bb43c4ab78556fe6499", "x-ms-return-client-request-id": "true" @@ -144,23 +144,23 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:19 GMT", - "ETag": "637320842588630000", + "Date": "Mon, 19 Oct 2020 17:00:52 GMT", + "ETag": "637387236523700000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9/Rules/rule1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:19Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:19Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9/Rules/rule1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EPROPERTY(@propertyName) = @stringPropertyValue AND PROPERTY(intProperty) = @intPropertyValue AND PROPERTY(longProperty) = @longPropertyValue AND PROPERTY(boolProperty) = @boolPropertyValue AND PROPERTY(doubleProperty) = @doublePropertyValue \u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@propertyName\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EMyProperty\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E3\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:long\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E3\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@boolPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:boolean\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Etrue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@doublePropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:double\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E3\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-08-03T20:44:19.5753107Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9/Rules/rule1?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Erule1\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:52Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:52Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/d23cafe1/Subscriptions/95ca9ab9/Rules/rule1?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CRuleDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CFilter i:type=\u0022SqlFilter\u0022\u003E\u003CSqlExpression\u003EPROPERTY(@propertyName) = @stringPropertyValue AND PROPERTY(intProperty) = @intPropertyValue AND PROPERTY(longProperty) = @longPropertyValue AND PROPERTY(boolProperty) = @boolPropertyValue AND PROPERTY(doubleProperty) = @doublePropertyValue \u003C/SqlExpression\u003E\u003CCompatibilityLevel\u003E20\u003C/CompatibilityLevel\u003E\u003CParameters\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@propertyName\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003EMyProperty\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@stringPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:string\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Estring\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@intPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:int\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E3\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@longPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:long\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E3\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@boolPropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:boolean\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003Etrue\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003CKeyValueOfstringanyType\u003E\u003CKey\u003E@doublePropertyValue\u003C/Key\u003E\u003CValue i:type=\u0022d6p1:double\u0022 xmlns:d6p1=\u0022http://www.w3.org/2001/XMLSchema\u0022\u003E3\u003C/Value\u003E\u003C/KeyValueOfstringanyType\u003E\u003C/Parameters\u003E\u003C/Filter\u003E\u003CAction i:type=\u0022EmptyRuleAction\u0022/\u003E\u003CCreatedAt\u003E2020-10-19T17:00:52.9459202Z\u003C/CreatedAt\u003E\u003CName\u003Erule1\u003C/Name\u003E\u003C/RuleDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/d23cafe1?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-e0b8a2cdc1d09b46ad334e9a824cc226-fa080402bc3f3649-00", + "traceparent": "00-837ce1fc74dbb6458bb19ad989b2f0c6-4e171255ae7c9343-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "4a13009a52ba6fa2b18c2ce5c78407ef", "x-ms-return-client-request-id": "true" @@ -169,8 +169,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:19 GMT", - "ETag": "637320842588630000", + "Date": "Mon, 19 Oct 2020 17:00:53 GMT", + "ETag": "637387236523700000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityAlreadyExistsAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityAlreadyExistsAsync.json index 9e1bd9dc0dc6..90f50fe819d7 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityAlreadyExistsAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityAlreadyExistsAsync.json @@ -7,10 +7,10 @@ "Authorization": "Sanitized", "Content-Length": "747", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-1eaf85dc7117234693ec3e7c0d18f948-36ac5c295a7b2c4a-00", + "traceparent": "00-74426f5f1614ce40816d35be8865983b-0be25fe7b7f27b44-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "3a06169dfdf889550864a91889480422", "x-ms-return-client-request-id": "true" @@ -36,12 +36,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:20 GMT", + "Date": "Mon, 19 Oct 2020 17:00:53 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/af5d474c?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Eaf5d474c\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:20Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:20Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/af5d474c?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:20.56Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:20.63Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/af5d474c?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003Eaf5d474c\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:53Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:53Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/af5d474c?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:53.837Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:53.87Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/78ca4f25?api-version=2017-04", @@ -50,10 +50,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-611a380e27f5f7479d9687dda97bd45d-06b0ecde752e134b-00", + "traceparent": "00-b20dd1ff9358f8428a621f3f4c9dd82d-422d97a6eba73341-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "640f1da10d9f4148005baf4cde831204", "x-ms-return-client-request-id": "true" @@ -76,12 +76,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:21 GMT", + "Date": "Mon, 19 Oct 2020 17:00:55 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/78ca4f25?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E78ca4f25\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:21Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:21Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/78ca4f25?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:21.433Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:21.503Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/78ca4f25?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E78ca4f25\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:54Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:54Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/78ca4f25?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:54.85Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:54.9Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/78ca4f25/Subscriptions/86dd9149?api-version=2017-04", @@ -90,10 +90,10 @@ "Authorization": "Sanitized", "Content-Length": "932", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-17db44e55b5f3b4585df10928033cfbc-79793ba895487240-00", + "traceparent": "00-fd60fe9a3fa657448b0ffc2d6ab50105-f4bf6de692219640-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "c49d6e2256694be13b547db13a36e581", "x-ms-return-client-request-id": "true" @@ -123,13 +123,13 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:21 GMT", - "ETag": "637320842615030000", + "Date": "Mon, 19 Oct 2020 17:00:55 GMT", + "ETag": "637387236549000000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/78ca4f25/Subscriptions/86dd9149?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E86dd9149\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:22Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:22Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/78ca4f25/Subscriptions/86dd9149?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:22.0449699Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:22.0449699Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/78ca4f25/Subscriptions/86dd9149?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E86dd9149\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:00:55Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:00:55Z\u003C/updated\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/78ca4f25/Subscriptions/86dd9149?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CSubscriptionDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDeadLetteringOnFilterEvaluationExceptions\u003Etrue\u003C/DeadLetteringOnFilterEvaluationExceptions\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:00:55.4146926Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:00:55.4146926Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00\u003C/AccessedAt\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003C/SubscriptionDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/af5d474c?api-version=2017-04", @@ -138,10 +138,10 @@ "Authorization": "Sanitized", "Content-Length": "747", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-72db75bf89bbb1429a85768ccc73beaa-dd4b71df8c67a94e-00", + "traceparent": "00-2272bd72c15d2a44b0d92df0666de790-9e2918b16c022248-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "c91ac25e3af18f58cec4399c4e09aa85", "x-ms-return-client-request-id": "true" @@ -167,13 +167,13 @@ "StatusCode": 409, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:21 GMT", - "ETag": "637320842606300000", + "Date": "Mon, 19 Oct 2020 17:00:55 GMT", + "ETag": "637387236538700000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E409\u003C/Code\u003E\u003CDetail\u003ESubCode=40900. Conflict. You\u0027re requesting an operation that isn\u0027t allowed in the resource\u0027s current state. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:95c8278b-5b7f-4a70-ae0d-631336ef14ef_G8, SystemTracker:recordedtests.servicebus.windows.net:af5d474c, Timestamp:2020-08-03T20:44:22\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E409\u003C/Code\u003E\u003CDetail\u003ESubCode=40900. Conflict. You\u0027re requesting an operation that isn\u0027t allowed in the resource\u0027s current state. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:7f438766-9375-41ae-bd49-0684f9d78a6b_G15, SystemTracker:recordedtests.servicebus.windows.net:af5d474c, Timestamp:2020-10-19T17:00:55\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/78ca4f25?api-version=2017-04", @@ -182,10 +182,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-7dad18f859d5ad43bdf51e734e9c5fa0-af9af37c8eb5ed4c-00", + "traceparent": "00-89c8d7f5882f374296a72117fc34989a-25ebc45ac3010f42-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "1bf5a4523faa4ab93bc3294b909606c9", "x-ms-return-client-request-id": "true" @@ -208,13 +208,13 @@ "StatusCode": 409, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:21 GMT", - "ETag": "637320842615030000", + "Date": "Mon, 19 Oct 2020 17:00:55 GMT", + "ETag": "637387236549000000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E409\u003C/Code\u003E\u003CDetail\u003ESubCode=40900. Conflict. You\u0027re requesting an operation that isn\u0027t allowed in the resource\u0027s current state. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:a41d0caa-d839-4b2b-a720-d43124031e23_G8, SystemTracker:recordedtests.servicebus.windows.net:78ca4f25, Timestamp:2020-08-03T20:44:22\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E409\u003C/Code\u003E\u003CDetail\u003ESubCode=40900. Conflict. You\u0027re requesting an operation that isn\u0027t allowed in the resource\u0027s current state. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:903f6e23-0ec4-488b-bc0d-ba6da5737d9a_G15, SystemTracker:recordedtests.servicebus.windows.net:78ca4f25, Timestamp:2020-10-19T17:00:55\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/78ca4f25/Subscriptions/86dd9149?api-version=2017-04", @@ -223,10 +223,10 @@ "Authorization": "Sanitized", "Content-Length": "932", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-008ac9fbb8a2a145af977a8482a0fa02-86eeabc9b1ba544b-00", + "traceparent": "00-bf4a22a74e794646a256356ff8a3da90-2566f83493a43747-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "1bed2d764969e812150ef6a41d45fd32", "x-ms-return-client-request-id": "true" @@ -256,23 +256,23 @@ "StatusCode": 409, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:22 GMT", - "ETag": "637320842615030000", + "Date": "Mon, 19 Oct 2020 17:00:56 GMT", + "ETag": "637387236549000000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E409\u003C/Code\u003E\u003CDetail\u003EThe messaging entity \u0027recordedtests:Topic:78ca4f25|86dd9149\u0027 already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:cb487be5-7b40-45d4-a433-ce0e1e102f82_B64, SystemTracker:NoSystemTracker, Timestamp:2020-08-03T20:44:22\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E409\u003C/Code\u003E\u003CDetail\u003EThe messaging entity \u0027recordedtests.servicebus.windows.net:Topic:78ca4f25|86dd9149\u0027 already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:076209e7-6a1a-4049-8ba3-b0b6748f25fa_B2, SystemTracker:NoSystemTracker, Timestamp:2020-10-19T17:00:55\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/af5d474c?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-1b20f37617e823449dbff951e4a3abb5-155fc01ebbf65341-00", + "traceparent": "00-41c738a10089554b9b64f893e752b6cb-0c070238e1d10c4f-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "955ff8aaca401ed609cf8d2e110dff37", "x-ms-return-client-request-id": "true" @@ -281,8 +281,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:23 GMT", - "ETag": "637320842606300000", + "Date": "Mon, 19 Oct 2020 17:00:56 GMT", + "ETag": "637387236538700000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -293,10 +293,10 @@ "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-60f2e7f883a93744a317f7694a92beed-a6af04b1a9203e47-00", + "traceparent": "00-2b419f37da862c4a8133e68c749d7e04-4da8a5a074b48d43-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "20266fbe8e1b081c910d059c48152df6", "x-ms-return-client-request-id": "true" @@ -305,8 +305,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:24 GMT", - "ETag": "637320842615030000", + "Date": "Mon, 19 Oct 2020 17:00:57 GMT", + "ETag": "637387236549000000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityDoesNotExistAsync.json b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityDoesNotExistAsync.json index 2f8c02130cef..e413216c4fe0 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityDoesNotExistAsync.json +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/SessionRecords/ServiceBusManagementClientLiveTests/ThrowsIfEntityDoesNotExistAsync.json @@ -5,10 +5,10 @@ "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-62cba4c6a4a27841b746895106ab50c2-e8a3e6a8a69b5b46-00", + "traceparent": "00-93b4f33797554c40846b014ac9914b5a-b9642fbfee19e74d-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e67f7725458cedd9a7021d97f264b853", "x-ms-return-client-request-id": "true" @@ -17,22 +17,22 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:25 GMT", + "Date": "Mon, 19 Oct 2020 17:00:58 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63048\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:25Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142961\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:58Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingTopic?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-0958d51ef48c9e489bcfeb698c229463-0b873484fa51c94e-00", + "traceparent": "00-99d403d06c83c643a10386eed7ef7df0-066cb31d900aaf47-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "5d9c068194e515f372d0ca5cc405263b", "x-ms-return-client-request-id": "true" @@ -41,22 +41,22 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:25 GMT", + "Date": "Mon, 19 Oct 2020 17:00:59 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63049\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:26Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142962\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:00:59Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingTopic/Subscriptions/NonExistingPath?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-4ba37f4b12626442aa9b7597d0cc5634-a46cae3da80ba043-00", + "traceparent": "00-63fae578c8e4a74f9ac514f49a746662-4bff761827390142-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "13317d62d78245ff73f4b3a041093c0c", "x-ms-return-client-request-id": "true" @@ -65,12 +65,12 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=feed; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:26 GMT", + "Date": "Mon, 19 Oct 2020 17:01:00 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:37190e26-28dd-4334-8733-54aa0b067026;id=63050\u003C/id\u003E\u003Cupdated\u003E2020-08-03T20:44:26Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" + "ResponseBody": "\u003Cfeed xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Ctitle type=\u0022text\u0022\u003EPublicly Listed Services\u003C/title\u003E\u003Csubtitle type=\u0022text\u0022\u003EThis is the list of publicly-listed services currently available.\u003C/subtitle\u003E\u003Cid\u003Euuid:40da3a58-f564-47c2-82a9-170ff3a4fd67;id=142964\u003C/id\u003E\u003Cupdated\u003E2020-10-19T17:01:00Z\u003C/updated\u003E\u003Cgenerator\u003EService Bus 1.1\u003C/generator\u003E\u003C/feed\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingPath?api-version=2017-04", @@ -80,10 +80,10 @@ "Content-Length": "747", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-9db7af38adb70948b2a19f77b78c3283-9b319a3b6c90584f-00", + "traceparent": "00-bd94b8627e53c949b05783929b9007b7-3a26989a460daf48-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "5d1bdf7413189023846a73bb7a7c28a1", "x-ms-return-client-request-id": "true" @@ -109,12 +109,12 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:27 GMT", + "Date": "Mon, 19 Oct 2020 17:01:00 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ESubCode=40400. Not Found. The Operation doesn\u0027t exist. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:9b07e1f9-bc90-480e-a358-acc38182e44f_G8, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-08-03T20:44:27\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ESubCode=40400. Not Found. The Operation doesn\u0027t exist. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:92025b54-78f0-4e25-8d40-a811ea6e5e68_G15, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-10-19T17:01:01\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingPath?api-version=2017-04", @@ -124,10 +124,10 @@ "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-0ffafcaa0496074dba7f72ae1858c605-3c1de3961bc6b845-00", + "traceparent": "00-d8fb274634a6ee4ebf1690977a374f68-e1692905b045f849-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "7535e2dba432a9d10657eaf1e152d468", "x-ms-return-client-request-id": "true" @@ -150,12 +150,12 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:27 GMT", + "Date": "Mon, 19 Oct 2020 17:01:01 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ESubCode=40400. Not Found. The Operation doesn\u0027t exist. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:c869cc8a-a414-479f-bc91-b94bc9c2bb1a_G8, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-08-03T20:44:28\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ESubCode=40400. Not Found. The Operation doesn\u0027t exist. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:bc46282c-90e3-402c-b4d0-4799d8b0cca5_G15, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-10-19T17:01:01\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingTopic/Subscriptions/NonExistingPath?api-version=2017-04", @@ -165,10 +165,10 @@ "Content-Length": "653", "Content-Type": "application/atom\u002Bxml", "If-Match": "*", - "traceparent": "00-71513cf900c8eb40871db503b2b42ee0-85fa495ddc10d44c-00", + "traceparent": "00-875dedc89b418a418ed14e99941dbb9c-4e574832a5cf5144-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "e5e8be93c9ea4e225aa18f186443caf6", "x-ms-return-client-request-id": "true" @@ -191,22 +191,22 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:28 GMT", + "Date": "Mon, 19 Oct 2020 17:01:01 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EThe incoming request is not recognized as a namespace policy put request. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:8c1093d1-a82a-430e-bd2e-717e40b8a05e_G8, SystemTracker:recordedtests.servicebus.windows.net:NonExistingTopic/Subscriptions/NonExistingPath, Timestamp:2020-08-03T20:44:28\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003EThe incoming request is not recognized as a namespace policy put request. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:b846751b-98b0-45b1-bea7-8ae25cb1f643_G15, SystemTracker:recordedtests.servicebus.windows.net:NonExistingTopic/Subscriptions/NonExistingPath, Timestamp:2020-10-19T17:01:02\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingPath?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-7d8b7ab25aaf5d449f1ca5eb274bcaa9-66794438bbec5145-00", + "traceparent": "00-365cb53878b77e4db2e09531f69ceed3-4afe5650d9399d43-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "5fc412cbc7d4d0da0e7156c12931af31", "x-ms-return-client-request-id": "true" @@ -215,22 +215,22 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:28 GMT", + "Date": "Mon, 19 Oct 2020 17:01:02 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ENo service is hosted at the specified address. TrackingId:9464e766-dfc0-4c94-8759-16e211e95554_G8, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-08-03T20:44:29\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ENo service is hosted at the specified address. TrackingId:c106794e-1c8f-4802-9ec3-ac0601443b71_G15, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-10-19T17:01:02\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingPath?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-6d28729dc19206478ae1c9dae0b3e1d4-2d24e51f02a8534d-00", + "traceparent": "00-f90fe6b8b7fef849b85c476e04ef496f-ee10631f491b4a47-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "bc280a96439412b6bfe71b9114b845c3", "x-ms-return-client-request-id": "true" @@ -239,22 +239,22 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:29 GMT", + "Date": "Mon, 19 Oct 2020 17:01:02 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ENo service is hosted at the specified address. TrackingId:b37fc7dc-0d0f-4516-b035-f714fcd0b310_G8, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-08-03T20:44:29\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ENo service is hosted at the specified address. TrackingId:23baabb7-5346-4656-ad32-d8ee5ed4ad2f_G15, SystemTracker:recordedtests.servicebus.windows.net:NonExistingPath, Timestamp:2020-10-19T17:01:03\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/NonExistingTopic/Subscriptions/NonExistingPath?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-eb0d70a917cc764a81944f1cd145cb29-cd5d3672fd8f9b4b-00", + "traceparent": "00-d2d4d25a10f49a499d82c4908c4ec0e7-c32e8fdba3c99445-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "ce25f38c748ecb94e317d77972612528", "x-ms-return-client-request-id": "true" @@ -263,12 +263,12 @@ "StatusCode": 404, "ResponseHeaders": { "Content-Type": "application/xml; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:29 GMT", + "Date": "Mon, 19 Oct 2020 17:01:03 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ENo service is hosted at the specified address. TrackingId:3b87f25f-ddb9-4fb4-a4c9-01d0cc847eb6_G8, SystemTracker:recordedtests.servicebus.windows.net:NonExistingTopic/Subscriptions/NonExistingPath, Timestamp:2020-08-03T20:44:30\u003C/Detail\u003E\u003C/Error\u003E" + "ResponseBody": "\u003CError\u003E\u003CCode\u003E404\u003C/Code\u003E\u003CDetail\u003ENo service is hosted at the specified address. TrackingId:d3c36508-ea82-457b-9f3e-dcbf4dfcc7a2_G15, SystemTracker:recordedtests.servicebus.windows.net:NonExistingTopic/Subscriptions/NonExistingPath, Timestamp:2020-10-19T17:01:03\u003C/Detail\u003E\u003C/Error\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04", @@ -277,10 +277,10 @@ "Authorization": "Sanitized", "Content-Length": "747", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-c07d9f195cb5b94cbcfae75c94a6dfec-4f840a2639d25d44-00", + "traceparent": "00-36297689230ed54abbb2bd2fb5204af3-e32a06d7a4a3734f-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b69ff3c2ec367da7909c73dcd5a71f9b", "x-ms-return-client-request-id": "true" @@ -306,12 +306,12 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:30 GMT", + "Date": "Mon, 19 Oct 2020 17:01:04 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E59825ef2\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:30Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:30Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:30.87Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:30.957Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E59825ef2\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:01:04Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:01:04Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:01:04.027Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:01:04.053Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04", @@ -320,10 +320,10 @@ "Authorization": "Sanitized", "Content-Length": "577", "Content-Type": "application/atom\u002Bxml", - "traceparent": "00-212f98d4cec7c742b67e3190608b891e-be94663041facf42-00", + "traceparent": "00-e0c3c41244fc92418f6b0ed881516326-5095494e3da58a4e-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "df4d815cef2c111bbb60e3be35e61c1e", "x-ms-return-client-request-id": "true" @@ -346,22 +346,22 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:31 GMT", + "Date": "Mon, 19 Oct 2020 17:01:05 GMT", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E3634932c\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:31Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:31Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:31.747Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:31.817Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E3634932c\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:01:04Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:01:04Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:01:04.92Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:01:04.973Z\u003C/UpdatedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-122db420b7a9124c816ee6a3b104bebe-9d4b7ca785fdd04a-00", + "traceparent": "00-7a5c90e052e7cb4387e8fdafe8e1a0a1-ae1146b692635e43-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "b82a411105a93f1eebb6a56f6dc64cce", "x-ms-return-client-request-id": "true" @@ -370,23 +370,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:31 GMT", - "ETag": "637320842718170000", + "Date": "Mon, 19 Oct 2020 17:01:05 GMT", + "ETag": "637387236649730000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E3634932c\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:31Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:31Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:31.747Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:31.817Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E3634932c\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:01:04Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:01:04Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/3634932c?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CTopicDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CFilteringMessagesBeforePublishing\u003Efalse\u003C/FilteringMessagesBeforePublishing\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:01:04.92Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:01:04.973Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Efalse\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CSubscriptionCount\u003E0\u003C/SubscriptionCount\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableSubscriptionPartitioning\u003Efalse\u003C/EnableSubscriptionPartitioning\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/TopicDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0026enrich=False", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-719ca344e53e0d42844f64a3d8f95465-929563067371e442-00", + "traceparent": "00-b6b93f3956bf6145a9b21b1c9e50131d-9eb8a8cddccb274f-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "ea203d3cc0f0d331d78dfbd508e848aa", "x-ms-return-client-request-id": "true" @@ -395,23 +395,23 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/atom\u002Bxml; type=entry; charset=utf-8", - "Date": "Mon, 03 Aug 2020 20:44:31 GMT", - "ETag": "637320842709570000", + "Date": "Mon, 19 Oct 2020 17:01:05 GMT", + "ETag": "637387236640530000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000", "Transfer-Encoding": "chunked" }, - "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E59825ef2\u003C/title\u003E\u003Cpublished\u003E2020-08-03T20:44:30Z\u003C/published\u003E\u003Cupdated\u003E2020-08-03T20:44:30Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-08-03T20:44:30.87Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-08-03T20:44:30.957Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" + "ResponseBody": "\u003Centry xmlns=\u0022http://www.w3.org/2005/Atom\u0022\u003E\u003Cid\u003Ehttps://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0026amp;enrich=False\u003C/id\u003E\u003Ctitle type=\u0022text\u0022\u003E59825ef2\u003C/title\u003E\u003Cpublished\u003E2020-10-19T17:01:04Z\u003C/published\u003E\u003Cupdated\u003E2020-10-19T17:01:04Z\u003C/updated\u003E\u003Cauthor\u003E\u003Cname\u003Erecordedtests.servicebus.windows.net\u003C/name\u003E\u003C/author\u003E\u003Clink rel=\u0022self\u0022 href=\u0022https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04\u0026amp;enrich=False\u0022/\u003E\u003Ccontent type=\u0022application/xml\u0022\u003E\u003CQueueDescription xmlns=\u0022http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\u0022 xmlns:i=\u0022http://www.w3.org/2001/XMLSchema-instance\u0022\u003E\u003CLockDuration\u003EPT1M\u003C/LockDuration\u003E\u003CMaxSizeInMegabytes\u003E1024\u003C/MaxSizeInMegabytes\u003E\u003CRequiresDuplicateDetection\u003Efalse\u003C/RequiresDuplicateDetection\u003E\u003CRequiresSession\u003Efalse\u003C/RequiresSession\u003E\u003CDefaultMessageTimeToLive\u003EP10675199DT2H48M5.4775807S\u003C/DefaultMessageTimeToLive\u003E\u003CDeadLetteringOnMessageExpiration\u003Efalse\u003C/DeadLetteringOnMessageExpiration\u003E\u003CDuplicateDetectionHistoryTimeWindow\u003EPT10M\u003C/DuplicateDetectionHistoryTimeWindow\u003E\u003CMaxDeliveryCount\u003E10\u003C/MaxDeliveryCount\u003E\u003CEnableBatchedOperations\u003Etrue\u003C/EnableBatchedOperations\u003E\u003CSizeInBytes\u003E0\u003C/SizeInBytes\u003E\u003CMessageCount\u003E0\u003C/MessageCount\u003E\u003CIsAnonymousAccessible\u003Efalse\u003C/IsAnonymousAccessible\u003E\u003CAuthorizationRules\u003E\u003C/AuthorizationRules\u003E\u003CStatus\u003EActive\u003C/Status\u003E\u003CCreatedAt\u003E2020-10-19T17:01:04.027Z\u003C/CreatedAt\u003E\u003CUpdatedAt\u003E2020-10-19T17:01:04.053Z\u003C/UpdatedAt\u003E\u003CAccessedAt\u003E0001-01-01T00:00:00Z\u003C/AccessedAt\u003E\u003CSupportOrdering\u003Etrue\u003C/SupportOrdering\u003E\u003CCountDetails xmlns:d2p1=\u0022http://schemas.microsoft.com/netservices/2011/06/servicebus\u0022\u003E\u003Cd2p1:ActiveMessageCount\u003E0\u003C/d2p1:ActiveMessageCount\u003E\u003Cd2p1:DeadLetterMessageCount\u003E0\u003C/d2p1:DeadLetterMessageCount\u003E\u003Cd2p1:ScheduledMessageCount\u003E0\u003C/d2p1:ScheduledMessageCount\u003E\u003Cd2p1:TransferMessageCount\u003E0\u003C/d2p1:TransferMessageCount\u003E\u003Cd2p1:TransferDeadLetterMessageCount\u003E0\u003C/d2p1:TransferDeadLetterMessageCount\u003E\u003C/CountDetails\u003E\u003CAutoDeleteOnIdle\u003EP10675199DT2H48M5.4775807S\u003C/AutoDeleteOnIdle\u003E\u003CEnablePartitioning\u003Efalse\u003C/EnablePartitioning\u003E\u003CEntityAvailabilityStatus\u003EAvailable\u003C/EntityAvailabilityStatus\u003E\u003CEnableExpress\u003Efalse\u003C/EnableExpress\u003E\u003C/QueueDescription\u003E\u003C/content\u003E\u003C/entry\u003E" }, { "RequestUri": "https://recordedtests.servicebus.windows.net/59825ef2?api-version=2017-04", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-a4fd8ed314c0dd458c4a41b616b586bd-b1df863832e9c948-00", + "traceparent": "00-2747b54f0065e64d90bf2250de2124c0-31e023d5eac5714d-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "93ca5480677d57f1620df47549aca3f4", "x-ms-return-client-request-id": "true" @@ -420,8 +420,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:32 GMT", - "ETag": "637320842709570000", + "Date": "Mon, 19 Oct 2020 17:01:05 GMT", + "ETag": "637387236640530000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, @@ -432,10 +432,10 @@ "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-d58fb924bce2f64ab065cd831ad43875-64dad8322cafb143-00", + "traceparent": "00-681be6173ee1f54eb725640a9a9e2b4b-497940c79f478245-00", "User-Agent": [ - "azsdk-net-Messaging.ServiceBus/7.0.0-dev.20200803.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Messaging.ServiceBus/7.0.0-alpha.20201019.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19041 )" ], "x-ms-client-request-id": "f882151431c5512d1057e11b09483702", "x-ms-return-client-request-id": "true" @@ -444,8 +444,8 @@ "StatusCode": 200, "ResponseHeaders": { "Content-Length": "0", - "Date": "Mon, 03 Aug 2020 20:44:32 GMT", - "ETag": "637320842718170000", + "Date": "Mon, 19 Oct 2020 17:01:08 GMT", + "ETag": "637387236649730000", "Server": "Microsoft-HTTPAPI/2.0", "Strict-Transport-Security": "max-age=31536000" }, From 1e710b86663cc122945d5e27b17fb77a97efde2d Mon Sep 17 00:00:00 2001 From: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com> Date: Fri, 23 Oct 2020 08:05:20 -0700 Subject: [PATCH 04/28] Update CODEOWNERS (#16200) * Update CODEOWNERS * Update CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 39f08b3cc2c5..4350f6d4cf49 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -68,6 +68,7 @@ # PRLabel: %Storage /sdk/storage/ @tg-msft /sdk/storage/Azure.Storage.*/ @amishra-dev @seanmcc-msft @amnguye @kasobol-msft @tg-msft +/sdk/storage/Microsoft.Azure.WebJobs.*/ @amishra-dev @seanmcc-msft @amnguye @kasobol-msft @tg-msft @fabiocav # PRLabel: %Tables /sdk/tables/ @christothes From 50ec101e8e9ba589380a5a8025705b8d54e26071 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Fri, 23 Oct 2020 10:28:34 -0500 Subject: [PATCH 05/28] Added DataLakeDirectoryClient.GetPaths() (#16089) --- .../Azure.Storage.Files.DataLake/CHANGELOG.md | 1 + ...e.Storage.Files.DataLake.netstandard2.0.cs | 2 + .../src/DataLakeDirectoryClient.cs | 91 ++++ .../src/DataLakeFileSystemClient.cs | 30 +- .../src/DataLakePathClient.cs | 35 +- .../src/DataLakeUriBuilder.cs | 6 +- .../src/Models/GetPathsAsyncCollection.cs | 16 +- .../tests/DataLakeTestBase.cs | 16 +- .../tests/DirectoryClientTests.cs | 118 +++++ .../tests/FileSystemClientTests.cs | 54 ++- .../DirectoryClientTests/GetPathsAsync.json | 432 +++++++++++++++++ .../GetPathsAsyncAsync.json | 432 +++++++++++++++++ .../GetPathsAsync_Error.json | 44 ++ .../GetPathsAsync_ErrorAsync.json | 44 ++ .../GetPathsAsync_MaxResultsAsync.json | 433 ++++++++++++++++++ .../GetPathsAsync_Recursive.json | 432 +++++++++++++++++ .../GetPathsAsync_RecursiveAsync.json | 432 +++++++++++++++++ .../GetPathsAsync_Upn.json | 432 +++++++++++++++++ .../GetPathsAsync_UpnAsync.json | 432 +++++++++++++++++ 19 files changed, 3442 insertions(+), 40 deletions(-) create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsyncAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Error.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_ErrorAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_MaxResultsAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Recursive.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_RecursiveAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Upn.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_UpnAsync.json diff --git a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md index eb05e1efda2f..ec60373612be 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md @@ -4,6 +4,7 @@ - Fixed bug where DataLakeFileSystem.SetAccessPolicy() would throw an exception if signed identifier permissions were not in the correct order. - Added seekability to DataLakeFileClient.OpenRead(). - Added additional info to exception messages. +- Added DataLakeDirectoryClient.GetPaths(). ## 12.5.0-preview.1 (2020-09-30) - Added support for service version 2020-02-10. diff --git a/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs b/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs index 18e30be1c6a1..7f8e2846c80b 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs @@ -41,6 +41,8 @@ public DataLakeDirectoryClient(System.Uri directoryUri, Azure.Storage.StorageSha public override Azure.Response GetAccessControl(bool? userPrincipalName = default(bool?), Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.Task> GetAccessControlAsync(bool? userPrincipalName = default(bool?), Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Storage.Files.DataLake.DataLakeFileClient GetFileClient(string fileName) { throw null; } + public virtual Azure.Pageable GetPaths(bool recursive = false, bool userPrincipalName = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPathsAsync(bool recursive = false, bool userPrincipalName = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual new Azure.Response GetProperties(Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.Task> GetPropertiesAsync(Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Storage.Files.DataLake.DataLakeDirectoryClient GetSubDirectoryClient(string subdirectoryName) { throw null; } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs index a80a15ad5c7d..1e4db30a68cf 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeDirectoryClient.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.Storage.Blobs.Specialized; using Azure.Storage.Files.DataLake.Models; using Metadata = System.Collections.Generic.IDictionary; @@ -2187,5 +2188,95 @@ public virtual async Task DeleteSubDirectoryAsync( } } #endregion Delete Sub Directory + + #region Get Paths + /// + /// The operation returns an async sequence + /// of paths in this directory. Enumerating the paths may make + /// multiple requests to the service while fetching all the values. + /// + /// For more information, see + /// + /// List Path(s). + /// + /// + /// If "true", all paths are listed; otherwise, only paths at the root of the filesystem are listed. + /// + /// + /// Optional. Valid only when Hierarchical Namespace is enabled for the account. If + /// "true", the user identity values returned in the owner and group fields of each list + /// entry will be transformed from Azure Active Directory Object IDs to User Principal + /// Names. If "false", the values will be returned as Azure Active Directory Object IDs. + /// The default value is false. Note that group and application Object IDs are not translated + /// because they do not have unique friendly names. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// An + /// describing the paths in the directory. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual Pageable GetPaths( + bool recursive = default, + bool userPrincipalName = default, + CancellationToken cancellationToken = default) => + new GetPathsAsyncCollection( + FileSystemClient, + Path, + recursive, + userPrincipalName, + $"{nameof(DataLakeDirectoryClient)}.{nameof(GetPaths)}") + .ToSyncCollection(cancellationToken); + + /// + /// The operation returns an async sequence + /// of paths in this directory. Enumerating the paths may make + /// multiple requests to the service while fetching all the values. + /// + /// For more information, see + /// + /// List Path(s). + /// + /// + /// If "true", all paths are listed; otherwise, only paths at the root of the filesystem are listed. + /// + /// + /// Optional. Valid only when Hierarchical Namespace is enabled for the account. If + /// "true", the user identity values returned in the owner and group fields of each list + /// entry will be transformed from Azure Active Directory Object IDs to User Principal + /// Names. If "false", the values will be returned as Azure Active Directory Object IDs. + /// The default value is false. Note that group and application Object IDs are not translated + /// because they do not have unique friendly names. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// An + /// describing the paths in the directory. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual AsyncPageable GetPathsAsync( + bool recursive = default, + bool userPrincipalName = default, + CancellationToken cancellationToken = default) => + new GetPathsAsyncCollection( + FileSystemClient, + Path, + recursive, + userPrincipalName, + $"{nameof(DataLakeDirectoryClient)}.{nameof(GetPaths)}") + .ToAsyncCollection(cancellationToken); + #endregion Get Paths } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs index 0175d9587243..87a24a027c0a 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileSystemClient.cs @@ -14,6 +14,7 @@ using System.Text.Json; using System.Collections.Generic; using Azure.Storage.Shared; +using System.ComponentModel; namespace Azure.Storage.Files.DataLake { @@ -1213,9 +1214,10 @@ public virtual async Task> SetMetadataAsync( #region Get Paths /// - /// The operation returns an async sequence - /// of paths in this file system. Enumerating the paths may make - /// multiple requests to the service while fetching all the values. + /// The + /// operation returns an async sequence of paths in this file system. + /// Enumerating the paths may make multiple requests to the service + /// while fetching all the values. /// /// For more information, see /// @@ -1256,12 +1258,14 @@ public virtual Pageable GetPaths( this, path, recursive, - userPrincipalName).ToSyncCollection(cancellationToken); + userPrincipalName, + $"{nameof(DataLakeFileClient)}.{nameof(GetPaths)}") + .ToSyncCollection(cancellationToken); /// - /// The operation returns an async - /// sequence of paths in this file system. Enumerating the paths may - /// make multiple requests to the service while fetching all the + /// The + /// operation returns an async sequence of paths in this file system. Enumerating + /// the paths may make multiple requests to the service while fetching all the /// values. /// /// For more information, see @@ -1302,7 +1306,9 @@ public virtual AsyncPageable GetPathsAsync( new GetPathsAsyncCollection(this, path, recursive, - userPrincipalName).ToAsyncCollection(cancellationToken); + userPrincipalName, + $"{nameof(DataLakeFileClient)}.{nameof(GetPaths)}") + .ToAsyncCollection(cancellationToken); /// /// The operation returns a @@ -1310,7 +1316,8 @@ public virtual AsyncPageable GetPathsAsync( /// from the specified . Use an empty /// to start enumeration from the beginning /// and the if it's not - /// empty to make subsequent calls to + /// empty to make subsequent calls to + /// /// to continue enumerating the paths segment by segment. Paths are /// ordered lexicographically by name. /// @@ -1342,6 +1349,9 @@ public virtual AsyncPageable GetPathsAsync( /// An optional value that specifies the maximum number of items to return. If omitted or greater than 5,000, /// the response will include up to 5,000 items. /// + /// + /// The name of the operation. + /// /// /// Whether to invoke the operation asynchronously. /// @@ -1363,6 +1373,7 @@ internal async Task> GetPathsInternal( bool userPrincipalName, string continuation, int? maxResults, + string operationName, bool async, CancellationToken cancellationToken) { @@ -1387,6 +1398,7 @@ internal async Task> GetPathsInternal( upn: userPrincipalName, path: path, async: async, + operationName: operationName, cancellationToken: cancellationToken) .ConfigureAwait(false); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs index 93315a7d3b3f..b8e8e28c7cd6 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs @@ -25,15 +25,25 @@ namespace Azure.Storage.Files.DataLake public class DataLakePathClient { /// - /// A associated with the path; + /// A associated with the path. /// internal readonly BlockBlobClient _blockBlobClient; /// - /// BlobClient + /// A associated with the path. /// internal virtual BlockBlobClient BlobClient => _blockBlobClient; + /// + /// A associated with Directory's parent File System. + /// + internal readonly DataLakeFileSystemClient _fileSystemClient; + + /// + /// A associated with Directory's parent File System. + /// + internal virtual DataLakeFileSystemClient FileSystemClient => _fileSystemClient; + /// /// The paths's primary endpoint. /// @@ -360,6 +370,13 @@ internal DataLakePathClient(Uri pathUri, HttpPipeline pipeline, DataLakeClientOp _version = options.Version; _clientDiagnostics = new ClientDiagnostics(options); _blockBlobClient = BlockBlobClientInternals.Create(_blobUri, _pipeline, Version.AsBlobsVersion(), _clientDiagnostics); + + uriBuilder.DirectoryOrFilePath = null; + _fileSystemClient = new DataLakeFileSystemClient( + uriBuilder.ToDfsUri(), + _pipeline, + Version, + ClientDiagnostics); } /// @@ -399,6 +416,13 @@ internal DataLakePathClient( _pipeline, Version.AsBlobsVersion(), _clientDiagnostics); + + uriBuilder.DirectoryOrFilePath = null; + _fileSystemClient = new DataLakeFileSystemClient( + uriBuilder.ToDfsUri(), + pipeline, + version, + clientDiagnostics); } internal DataLakePathClient( @@ -423,6 +447,13 @@ internal DataLakePathClient( _pipeline, Version.AsBlobsVersion(), _clientDiagnostics); + + uriBuilder.DirectoryOrFilePath = null; + _fileSystemClient = new DataLakeFileSystemClient( + uriBuilder.ToDfsUri(), + pipeline, + version, + clientDiagnostics); } /// diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs index 2a81577285bf..2651d27c914c 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs @@ -101,7 +101,11 @@ public string DirectoryOrFilePath set { ResetUri(); - if (value == "/") + if (value == null) + { + _directoryOrFilePath = null; + } + else if (value == "/") { _directoryOrFilePath = value; } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/GetPathsAsyncCollection.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/GetPathsAsyncCollection.cs index 6626f1a65170..5bf31ed43d2b 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/GetPathsAsyncCollection.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/GetPathsAsyncCollection.cs @@ -11,19 +11,22 @@ internal class GetPathsAsyncCollection : StorageCollectionEnumerator { private readonly DataLakeFileSystemClient _client; private readonly string _path; - private readonly bool _recursive; - private readonly bool _upn; + private readonly bool? _recursive; + private readonly bool? _upn; + private readonly string _operationName; public GetPathsAsyncCollection( DataLakeFileSystemClient client, string path, - bool recursive, - bool upn) + bool? recursive, + bool? upn, + string operationName) { _client = client; _path = path; _recursive = recursive; _upn = upn; + _operationName = operationName; } public override async ValueTask> GetNextPageAsync( @@ -34,10 +37,11 @@ public override async ValueTask> GetNextPageAsync( { Response response = await _client.GetPathsInternal( _path, - _recursive, - _upn, + _recursive.GetValueOrDefault(), + _upn.GetValueOrDefault(), continuationToken, pageSizeHint, + _operationName, async, cancellationToken).ConfigureAwait(false); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs index fb3379134645..5cd6866649f5 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs @@ -434,5 +434,19 @@ public async ValueTask DisposeAsync() } } } - } + + public string[] PathNames + => new[] + { + "foo", + "bar", + "baz", + "baz/bar", + "foo/foo", + "foo/bar", + "baz/foo", + "baz/foo/bar", + "baz/bar/foo" + }; + } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs index 29e74d6c9246..08e3aae053df 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs @@ -4716,5 +4716,123 @@ public async Task CreateSubDirectoryAndSubDirectoryAsync() Assert.AreEqual($"{subdirectory.BlobUri.AbsoluteUri}/{lowerSubDirectoryName}", lowerSubDirectory.BlobUri.AbsoluteUri); Assert.AreEqual($"{subdirectory.Path}/{lowerSubDirectoryName}", lowerSubDirectory.Path); } + + [Test] + public async Task GetPathsAsync() + { + // Arrange + await using DisposingFileSystem test = await GetNewFileSystem(); + string directoryName = GetNewDirectoryName(); + DataLakeDirectoryClient directory = await test.FileSystem.CreateDirectoryAsync(directoryName); + await SetUpDirectoryForListing(directory); + + // Act + AsyncPageable response = directory.GetPathsAsync(); + IList paths = await response.ToListAsync(); + + // Assert + Assert.AreEqual(3, paths.Count); + Assert.AreEqual($"{directoryName}/bar", paths[0].Name); + Assert.AreEqual($"{directoryName}/baz", paths[1].Name); + Assert.AreEqual($"{directoryName}/foo", paths[2].Name); + } + + [Test] + public async Task GetPathsAsync_Recursive() + { + // Arrange + await using DisposingFileSystem test = await GetNewFileSystem(); + string directoryName = GetNewDirectoryName(); + DataLakeDirectoryClient directory = await test.FileSystem.CreateDirectoryAsync(directoryName); + await SetUpDirectoryForListing(directory); + + // Act + AsyncPageable response = directory.GetPathsAsync( + recursive: true); + IList paths = await response.ToListAsync(); + + // Assert + Assert.AreEqual(PathNames.Length, paths.Count); + Assert.AreEqual($"{directoryName}/bar", paths[0].Name); + Assert.AreEqual($"{directoryName}/baz", paths[1].Name); + Assert.AreEqual($"{directoryName}/baz/bar", paths[2].Name); + Assert.AreEqual($"{directoryName}/baz/bar/foo", paths[3].Name); + Assert.AreEqual($"{directoryName}/baz/foo", paths[4].Name); + Assert.AreEqual($"{directoryName}/baz/foo/bar", paths[5].Name); + Assert.AreEqual($"{directoryName}/foo", paths[6].Name); + Assert.AreEqual($"{directoryName}/foo/bar", paths[7].Name); + Assert.AreEqual($"{directoryName}/foo/foo", paths[8].Name); + } + + [Test] + public async Task GetPathsAsync_Upn() + { + // Arrange + await using DisposingFileSystem test = await GetNewFileSystem(); + string directoryName = GetNewDirectoryName(); + DataLakeDirectoryClient directory = await test.FileSystem.CreateDirectoryAsync(directoryName); + await SetUpDirectoryForListing(directory); + + // Act + AsyncPageable response = directory.GetPathsAsync( + userPrincipalName: true); + IList paths = await response.ToListAsync(); + + // Assert + Assert.AreEqual(3, paths.Count); + Assert.IsNotNull(paths[0].Group); + Assert.IsNotNull(paths[0].Owner); + + Assert.AreEqual($"{directoryName}/bar", paths[0].Name); + Assert.AreEqual($"{directoryName}/baz", paths[1].Name); + Assert.AreEqual($"{directoryName}/foo", paths[2].Name); + } + + [Test] + [AsyncOnly] + public async Task GetPathsAsync_MaxResults() + { + // Arrange + await using DisposingFileSystem test = await GetNewFileSystem(); + string directoryName = GetNewDirectoryName(); + DataLakeDirectoryClient directory = await test.FileSystem.CreateDirectoryAsync(directoryName); + await SetUpDirectoryForListing(directory); + + // Act + Page page = await directory.GetPathsAsync().AsPages(pageSizeHint: 2).FirstAsync(); + + // Assert + Assert.AreEqual(2, page.Values.Count); + Assert.AreEqual($"{directoryName}/bar", page.Values[0].Name); + Assert.AreEqual($"{directoryName}/baz", page.Values[1].Name); + } + + [Test] + public async Task GetPathsAsync_Error() + { + // Arrange + DataLakeServiceClient service = GetServiceClient_SharedKey(); + DataLakeFileSystemClient fileSystem = InstrumentClient(service.GetFileSystemClient(GetNewFileSystemName())); + DataLakeDirectoryClient directory = InstrumentClient(fileSystem.GetDirectoryClient(GetNewDirectoryName())); + + // Act + await TestHelper.AssertExpectedExceptionAsync( + directory.GetPathsAsync().ToListAsync(), + e => Assert.AreEqual("FilesystemNotFound", e.ErrorCode)); + } + + private async Task SetUpDirectoryForListing(DataLakeDirectoryClient directoryClient) + { + string[] pathNames = PathNames; + DataLakeDirectoryClient[] subDirectories = new DataLakeDirectoryClient[pathNames.Length]; + + // Upload directories + for (var i = 0; i < pathNames.Length; i++) + { + DataLakeDirectoryClient directory = InstrumentClient(directoryClient.GetSubDirectoryClient(pathNames[i])); + subDirectories[i] = directory; + await directory.CreateIfNotExistsAsync(); + } + } } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs index c60a937800be..e890da2695ce 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs @@ -541,6 +541,9 @@ public async Task GetPathsAsync() // Assert Assert.AreEqual(3, paths.Count); + Assert.AreEqual("bar", paths[0].Name); + Assert.AreEqual("baz", paths[1].Name); + Assert.AreEqual("foo", paths[2].Name); } [Test] @@ -552,11 +555,21 @@ public async Task GetPathsAsync_Recursive() await SetUpFileSystemForListing(test.FileSystem); // Act - AsyncPageable response = test.FileSystem.GetPathsAsync(recursive: true); + AsyncPageable response = test.FileSystem.GetPathsAsync( + recursive: true); IList paths = await response.ToListAsync(); // Assert Assert.AreEqual(PathNames.Length, paths.Count); + Assert.AreEqual("bar", paths[0].Name); + Assert.AreEqual("baz", paths[1].Name); + Assert.AreEqual("baz/bar", paths[2].Name); + Assert.AreEqual("baz/bar/foo", paths[3].Name); + Assert.AreEqual("baz/foo", paths[4].Name); + Assert.AreEqual("baz/foo/bar", paths[5].Name); + Assert.AreEqual("foo", paths[6].Name); + Assert.AreEqual("foo/bar", paths[7].Name); + Assert.AreEqual("foo/foo", paths[8].Name); } [Test] @@ -568,11 +581,19 @@ public async Task GetPathsAsync_Upn() await SetUpFileSystemForListing(test.FileSystem); // Act - AsyncPageable response = test.FileSystem.GetPathsAsync(userPrincipalName: true); + AsyncPageable response = test.FileSystem.GetPathsAsync( + userPrincipalName: true); + ; IList paths = await response.ToListAsync(); // Assert Assert.AreEqual(3, paths.Count); + Assert.IsNotNull(paths[0].Group); + Assert.IsNotNull(paths[0].Owner); + + Assert.AreEqual("bar", paths[0].Name); + Assert.AreEqual("baz", paths[1].Name); + Assert.AreEqual("foo", paths[2].Name); } [Test] @@ -584,11 +605,14 @@ public async Task GetPathsAsync_Path() await SetUpFileSystemForListing(test.FileSystem); // Act - AsyncPageable response = test.FileSystem.GetPathsAsync(path: "foo"); + AsyncPageable response = test.FileSystem.GetPathsAsync( + path: "foo"); IList paths = await response.ToListAsync(); // Assert Assert.AreEqual(2, paths.Count); + Assert.AreEqual("foo/bar", paths[0].Name); + Assert.AreEqual("foo/foo", paths[1].Name); } [Test] @@ -605,6 +629,8 @@ public async Task GetPathsAsync_MaxResults() // Assert Assert.AreEqual(2, page.Values.Count); + Assert.AreEqual("bar", page.Values[0].Name); + Assert.AreEqual("baz", page.Values[1].Name); } [Test] @@ -2001,10 +2027,10 @@ private class AccessConditionParameters private async Task SetUpFileSystemForListing(DataLakeFileSystemClient fileSystem) { - var pathNames = PathNames; - var directories = new DataLakeDirectoryClient[pathNames.Length]; + string[] pathNames = PathNames; + DataLakeDirectoryClient[] directories = new DataLakeDirectoryClient[pathNames.Length]; - // Upload Blobs + // Upload directories for (var i = 0; i < pathNames.Length; i++) { DataLakeDirectoryClient directory = InstrumentClient(fileSystem.GetDirectoryClient(pathNames[i])); @@ -2012,19 +2038,5 @@ private async Task SetUpFileSystemForListing(DataLakeFileSystemClient fileSystem await directory.CreateIfNotExistsAsync(); } } - - private string[] PathNames - => new[] - { - "foo", - "bar", - "baz", - "baz/bar", - "foo/foo", - "foo/bar", - "baz/foo", - "baz/foo/bar", - "baz/bar/foo" - }; - } + } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync.json new file mode 100644 index 000000000000..287f3905e42b --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync.json @@ -0,0 +1,432 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-dcf0c7b2e521c74db1e26f6aa386aa27-4eeb6064a70d4340-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "dcd23b29-7c46-4f2f-7ddc-8ca6bc269e5e", + "x-ms-date": "Mon, 19 Oct 2020 18:47:52 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:52 GMT", + "ETag": "\u00220x8D8745F7C78AABF\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:53 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "dcd23b29-7c46-4f2f-7ddc-8ca6bc269e5e", + "x-ms-request-id": "f6b6e0cc-001e-0074-4048-a67950000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-e94a80ac2d07e84783fe0782efd91440-1e550e47281f7c46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "54f76a10-c6a2-5860-1b82-e26355160c86", + "x-ms-date": "Mon, 19 Oct 2020 18:47:53 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:52 GMT", + "ETag": "\u00220x8D8745F7CC08794\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:53 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "54f76a10-c6a2-5860-1b82-e26355160c86", + "x-ms-request-id": "5976cf04-201f-0063-7a48-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-cbc0da1c9df5ca4a9c0adb835589c5b5-4762d4c059647244-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d7085496-22ff-fc7f-2fdf-cb252f24f869", + "x-ms-date": "Mon, 19 Oct 2020 18:47:53 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7CD7D00C\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:53 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "d7085496-22ff-fc7f-2fdf-cb252f24f869", + "x-ms-request-id": "5976cf05-201f-0063-7b48-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-8dbd64851c056b469538f263b6ddcda6-c6489b7e0dd63a4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "01cdfbb9-340d-4286-e9e7-fd0eec906afb", + "x-ms-date": "Mon, 19 Oct 2020 18:47:53 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7CE1D159\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:53 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "01cdfbb9-340d-4286-e9e7-fd0eec906afb", + "x-ms-request-id": "5976cf06-201f-0063-7c48-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-95cea7b262c6604e8be7d34c54013feb-5c38e28f15320c46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "336c5602-f757-895b-47d3-334722d56c23", + "x-ms-date": "Mon, 19 Oct 2020 18:47:53 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7CEBDDC2\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:53 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "336c5602-f757-895b-47d3-334722d56c23", + "x-ms-request-id": "5976cf09-201f-0063-7f48-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-90ebfd995144a64580b23c51dc894d37-8c6963c16bd69d40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "960bbd5d-3624-62a4-8e29-64bc7871539b", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7CF5C51E\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "960bbd5d-3624-62a4-8e29-64bc7871539b", + "x-ms-request-id": "5976cf0a-201f-0063-8048-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-348b5b1d260fb541ba6b5a0d85414d18-ca768da3ed2f0743-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "64ea7980-d6c9-bdff-9493-fa12cb2a94d1", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7D006D78\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "64ea7980-d6c9-bdff-9493-fa12cb2a94d1", + "x-ms-request-id": "5976cf0b-201f-0063-0148-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-028796a4566ad147b2e9f687b95fe87d-2746f00e59c6914f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ff3b01b1-ee87-6ed1-fff0-22a606f00745", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7D0AF3E9\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "ff3b01b1-ee87-6ed1-fff0-22a606f00745", + "x-ms-request-id": "5976cf0c-201f-0063-0248-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-e5eef464f3f70b42858e93fbd9c18f5f-d4d166fb4b9a704e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "c9606b97-95ee-1549-23aa-11467ada55c9", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7D1562C0\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c9606b97-95ee-1549-23aa-11467ada55c9", + "x-ms-request-id": "5976cf0d-201f-0063-0348-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-52058ebcd712f04490eb13f287ad51fd-3bd4e303f40e9441-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "9a0e3279-3e8f-3357-d5e6-4f3b54e5691e", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7D200B96\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "9a0e3279-3e8f-3357-d5e6-4f3b54e5691e", + "x-ms-request-id": "5976cf0e-201f-0063-0448-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece/test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-20e0e9085a3bc74a960969eef5b5a2c9-7dce8f4a79e6724c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "47cc4bec-bacb-f239-88c7-51c2396cf6f1", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "ETag": "\u00220x8D8745F7D2A31B0\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "47cc4bec-bacb-f239-88c7-51c2396cf6f1", + "x-ms-request-id": "5976cf0f-201f-0063-0548-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece?resource=filesystem\u0026recursive=false\u0026directory=test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "084f6c13-2118-7e53-a86e-4777fe84d455", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:47:53 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "084f6c13-2118-7e53-a86e-4777fe84d455", + "x-ms-request-id": "5976cf10-201f-0063-0648-a6d05b000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:53 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7CE1D159\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:53 GMT\u0022,\u0022name\u0022:\u0022test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:53 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7CEBDDC2\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:53 GMT\u0022,\u0022name\u0022:\u0022test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:53 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7CD7D00C\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:53 GMT\u0022,\u0022name\u0022:\u0022test-directory-d3a0a7ab-d03b-5020-f9e3-261842f77722/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-1fecb163-0cc7-739b-655c-2a61227beece?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-69ee5852995e7047bde3fea6c97a6ee5-c0bee8014c47cd4e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "cdaecc23-ed1d-cdd8-9341-b971a6102b66", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "cdaecc23-ed1d-cdd8-9341-b971a6102b66", + "x-ms-request-id": "f6b6e13f-001e-0074-0b48-a67950000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2004167959", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsyncAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsyncAsync.json new file mode 100644 index 000000000000..8bb9b2bb2dc0 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsyncAsync.json @@ -0,0 +1,432 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-aa9b83834b6cf24f90c0488a921d869f-1548f72d03fbb740-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "4a1cd6ff-50d3-d068-a9b3-f10972c93a71", + "x-ms-date": "Mon, 19 Oct 2020 18:47:58 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F7FA31A88\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:58 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "4a1cd6ff-50d3-d068-a9b3-f10972c93a71", + "x-ms-request-id": "247adaae-d01e-0077-0448-a69834000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3224a63127a072409b261534bf48a16a-66df9735530f1c47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "8614f870-2a62-ca4c-ddda-23190598d497", + "x-ms-date": "Mon, 19 Oct 2020 18:47:58 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F7FEA807D\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:58 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "8614f870-2a62-ca4c-ddda-23190598d497", + "x-ms-request-id": "81430d61-901f-0066-6148-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-7310ad641461ab44aa807892b7820517-0310bb348499cd4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "035f9599-00fd-8f7f-b8fe-185b01f525d6", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F7FF4896D\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "035f9599-00fd-8f7f-b8fe-185b01f525d6", + "x-ms-request-id": "81430d62-901f-0066-6248-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-3c836d227d9dcd4fb581108db4f8381a-72aa2bf8c0aa5a41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "6f7f5620-d139-2a99-8fc0-b5022be07c8e", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F7FFE8ED2\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "6f7f5620-d139-2a99-8fc0-b5022be07c8e", + "x-ms-request-id": "81430d63-901f-0066-6348-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-0565a193c546574bb544c6269be4b82a-3892f24b9d5d4d40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "aa3b6beb-b576-4c9c-4d71-e94afdb100dc", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F8007DA63\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "aa3b6beb-b576-4c9c-4d71-e94afdb100dc", + "x-ms-request-id": "81430d64-901f-0066-6448-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-76d931e13024b248a6ea1958b62154ef-242b66e63813b843-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "c0165815-d1a4-ee17-d386-83225776e92f", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F8011E56E\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c0165815-d1a4-ee17-d386-83225776e92f", + "x-ms-request-id": "81430d65-901f-0066-6548-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-471a31e211291e4593c805ab69ba9a2c-360244fbba71b04a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a5354144-3f9a-4938-5d06-a1ffbff6871f", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F801BC4CE\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "a5354144-3f9a-4938-5d06-a1ffbff6871f", + "x-ms-request-id": "81430d66-901f-0066-6648-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-e897b48023724f4aa2e3a58850af7146-15c4e1acc1087a45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "16de68c4-4441-f394-3202-2ceb94d6e95b", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F80251B72\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "16de68c4-4441-f394-3202-2ceb94d6e95b", + "x-ms-request-id": "81430d67-901f-0066-6748-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-e5179ce3266dd540a9f972f3368470d8-f2f12245ffbc024b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "573b643f-7117-6bde-cae0-eee377cb4baa", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F802E79DB\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "573b643f-7117-6bde-cae0-eee377cb4baa", + "x-ms-request-id": "81430d68-901f-0066-6848-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-dc7ae9a3f45eff459e1d68fcace9ec23-5da6f61056b9e247-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "2fab0875-929b-6244-17c3-fde2b35029be", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F803856F5\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "2fab0875-929b-6244-17c3-fde2b35029be", + "x-ms-request-id": "81430d69-901f-0066-6948-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2/test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-91bea297f2135c4f88895b4ead3b31b1-d69017baef767a47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "6e6eacbe-1c1f-f10e-cf10-af4700976fe2", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "ETag": "\u00220x8D8745F80423B47\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "6e6eacbe-1c1f-f10e-cf10-af4700976fe2", + "x-ms-request-id": "81430d6a-901f-0066-6a48-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2?resource=filesystem\u0026recursive=false\u0026directory=test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "06249a78-bae2-ed9f-6ab7-ee6b17d04053", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "06249a78-bae2-ed9f-6ab7-ee6b17d04053", + "x-ms-request-id": "81430d6b-901f-0066-6b48-a60280000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:59 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7FFE8ED2\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:59 GMT\u0022,\u0022name\u0022:\u0022test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:59 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F8007DA63\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:59 GMT\u0022,\u0022name\u0022:\u0022test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:59 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7FF4896D\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:59 GMT\u0022,\u0022name\u0022:\u0022test-directory-b4f393a2-35e4-41f8-27ba-4ad0fb1287e2/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-ca4e8bbb-657a-a1c9-3899-35c8cc526fe2?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-04c21f0c175c244bb75ee05e31b241bf-e72530e306f5794e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "66cf8993-6872-5900-2df5-3b0676599620", + "x-ms-date": "Mon, 19 Oct 2020 18:47:59 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "66cf8993-6872-5900-2df5-3b0676599620", + "x-ms-request-id": "247adb4d-d01e-0077-0548-a69834000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "992772166", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Error.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Error.json new file mode 100644 index 000000000000..3907433f97c8 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Error.json @@ -0,0 +1,44 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-7b51477b-6a53-4c8b-cfd0-aeaf86d78970?resource=filesystem\u0026recursive=false\u0026directory=test-directory-041eba33-715b-3e7f-4040-36a1839d386d\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "47f41942-9c7a-0985-c813-3a1333e9c831", + "x-ms-date": "Mon, 19 Oct 2020 18:47:54 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Content-Length": "175", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:47:54 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "47f41942-9c7a-0985-c813-3a1333e9c831", + "x-ms-error-code": "FilesystemNotFound", + "x-ms-request-id": "f20a18dd-901f-0092-7848-a6c976000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": { + "error": { + "code": "FilesystemNotFound", + "message": "The specified filesystem does not exist.\nRequestId:f20a18dd-901f-0092-7848-a6c976000000\nTime:2020-10-19T18:47:55.1032337Z" + } + } + } + ], + "Variables": { + "RandomSeed": "771856370", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_ErrorAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_ErrorAsync.json new file mode 100644 index 000000000000..8de8692f1c0c --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_ErrorAsync.json @@ -0,0 +1,44 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-b93b4545-804d-24e5-b053-c8fc1ed315f7?resource=filesystem\u0026recursive=false\u0026directory=test-directory-04fe66fc-999f-3c8d-1441-86573f2bd866\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "83f2ef5f-efed-abf7-b7fe-a50bf98de585", + "x-ms-date": "Mon, 19 Oct 2020 18:48:00 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Content-Length": "175", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:47:59 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "83f2ef5f-efed-abf7-b7fe-a50bf98de585", + "x-ms-error-code": "FilesystemNotFound", + "x-ms-request-id": "c68b5932-001f-0080-3548-a6b2a6000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": { + "error": { + "code": "FilesystemNotFound", + "message": "The specified filesystem does not exist.\nRequestId:c68b5932-001f-0080-3548-a6b2a6000000\nTime:2020-10-19T18:48:00.2944256Z" + } + } + } + ], + "Variables": { + "RandomSeed": "1715968484", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_MaxResultsAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_MaxResultsAsync.json new file mode 100644 index 000000000000..680939222ddc --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_MaxResultsAsync.json @@ -0,0 +1,433 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-47ea748c6c133045befd5933d33c3841-29f66a114319e041-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "1641ed42-07e0-2027-e07f-8f700b274801", + "x-ms-date": "Mon, 19 Oct 2020 18:48:00 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F80D8385E\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:00 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "1641ed42-07e0-2027-e07f-8f700b274801", + "x-ms-request-id": "18de60d9-901e-0059-6a48-a6ca23000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-1a9df1b52be5424fa32c926f31b8ed0f-10a630c141823a4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "baee1fcb-5af7-d523-e512-4c1a957024b8", + "x-ms-date": "Mon, 19 Oct 2020 18:48:00 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F810F7290\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:00 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "baee1fcb-5af7-d523-e512-4c1a957024b8", + "x-ms-request-id": "e421ef7b-301f-0050-4748-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-7d6c40d71a5835428be18e17b708e05c-64ef58bf9461974c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "dceb768a-903a-1d1e-9d95-bd8fa04deca8", + "x-ms-date": "Mon, 19 Oct 2020 18:48:00 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F81199EE9\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:00 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "dceb768a-903a-1d1e-9d95-bd8fa04deca8", + "x-ms-request-id": "e421ef7c-301f-0050-4848-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-f03e9fcdbdabf4438c8c9317ca478717-cfe39b14c72b244a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "1f8fb231-4784-a47e-5bdb-ae26e6cff187", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F81245A9C\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "1f8fb231-4784-a47e-5bdb-ae26e6cff187", + "x-ms-request-id": "e421ef7d-301f-0050-4948-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-90f6cee8a944be4fb0757e42f9c43965-e5bf7d693532f641-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ee5ec602-ccbd-0824-f340-785b421840f1", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F812DA11D\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "ee5ec602-ccbd-0824-f340-785b421840f1", + "x-ms-request-id": "e421ef7e-301f-0050-4a48-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-a5532056da56f04bbb698c594be57e15-240fa430fe2d7549-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "2024378b-0370-3cca-c0a3-ddc79608571e", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F81379202\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "2024378b-0370-3cca-c0a3-ddc79608571e", + "x-ms-request-id": "e421ef7f-301f-0050-4b48-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-86f0be493315c84294ff5046f4557177-2f3e4c4309535842-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0ad03947-1ff3-6780-93bd-26d7e4278c46", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F8140F292\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "0ad03947-1ff3-6780-93bd-26d7e4278c46", + "x-ms-request-id": "e421ef80-301f-0050-4c48-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2a01c6bdf517f14fa583b11293ebf764-f51a10a7fb8ea847-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "5d8089c5-4c38-642a-a90b-b96542245baf", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F814AE6D4\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "5d8089c5-4c38-642a-a90b-b96542245baf", + "x-ms-request-id": "e421ef81-301f-0050-4d48-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-513f1e30eceebf4fa7b06186532ee253-45fd502a7f617a49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "5b11c965-2fa7-510e-9fd7-5721f3b7df18", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F8157362C\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "5b11c965-2fa7-510e-9fd7-5721f3b7df18", + "x-ms-request-id": "e421ef84-301f-0050-5048-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-3a5bd2d6f2103946ad8880824d766303-b06ee439a889314b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "79ff2707-ff12-7f08-49d8-7b518504a764", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F8165F181\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "79ff2707-ff12-7f08-49d8-7b518504a764", + "x-ms-request-id": "e421ef85-301f-0050-5148-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447/test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-640dbfd1ac8b354f847232e6ff2ac458-f5903c0706a08f49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "cb1af948-66b8-8805-9206-c300c0e2645e", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:00 GMT", + "ETag": "\u00220x8D8745F81753E63\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "cb1af948-66b8-8805-9206-c300c0e2645e", + "x-ms-request-id": "e421ef86-301f-0050-5248-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447?resource=filesystem\u0026recursive=false\u0026directory=test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15\u0026maxResults=2\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "8b08f705-dbea-68ac-b0fe-a8bf33b868b2", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8b08f705-dbea-68ac-b0fe-a8bf33b868b2", + "x-ms-continuation": "VBak8\u002BiX74mZx8MBGBwYA2ZvbxaK7N7wi5LT1gMYABbUgpXqi5LT1gMAAA==", + "x-ms-request-id": "e421ef88-301f-0050-5348-a68ff0000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:01 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F81245A9C\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:01 GMT\u0022,\u0022name\u0022:\u0022test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:01 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F812DA11D\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:01 GMT\u0022,\u0022name\u0022:\u0022test-directory-a7773c7f-6d70-2e07-c9c6-72b7fc284a15/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-950e690b-1ecb-4096-8479-53ae90e40447?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-11be8abdb28a6d4f861128079b4f725f-a1dcb10136c83d4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "c9fafd76-d8d9-6373-2e52-1795aad8dcb6", + "x-ms-date": "Mon, 19 Oct 2020 18:48:01 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:01 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c9fafd76-d8d9-6373-2e52-1795aad8dcb6", + "x-ms-request-id": "18de6166-901e-0059-5748-a6ca23000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "613029601", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Recursive.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Recursive.json new file mode 100644 index 000000000000..997977215927 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Recursive.json @@ -0,0 +1,432 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6612e01f78dae24bb97fb03ff5f10ee4-e5d1a444e442d34c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "c2631ba1-775a-94f4-41b3-72a295ae0d18", + "x-ms-date": "Mon, 19 Oct 2020 18:47:55 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:55 GMT", + "ETag": "\u00220x8D8745F7DCAD791\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:55 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c2631ba1-775a-94f4-41b3-72a295ae0d18", + "x-ms-request-id": "7d44b9b4-801e-006a-6c48-a69588000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8bc7b936dbc8a14ebf5a6dc351d7dc5e-d4ca95120dfe7549-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "56afbbba-5ff7-fc66-03d9-3369d8e2575c", + "x-ms-date": "Mon, 19 Oct 2020 18:47:55 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:55 GMT", + "ETag": "\u00220x8D8745F7E0AB56E\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:55 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "56afbbba-5ff7-fc66-03d9-3369d8e2575c", + "x-ms-request-id": "feeccfc3-501f-009d-1648-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2b61fddccdfb0f46a8ede04e611e790d-e374aedf1f2d2946-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "81585085-6135-b89f-57ae-c44cc9b5df0f", + "x-ms-date": "Mon, 19 Oct 2020 18:47:55 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:55 GMT", + "ETag": "\u00220x8D8745F7E1492FC\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:55 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "81585085-6135-b89f-57ae-c44cc9b5df0f", + "x-ms-request-id": "feeccfc4-501f-009d-1748-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-e034ed2574496942bca04f2f6b26aa9d-c0cc92054fa3b444-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "87e48ba4-d689-9926-3bd3-805480a6c904", + "x-ms-date": "Mon, 19 Oct 2020 18:47:55 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:55 GMT", + "ETag": "\u00220x8D8745F7E1F4238\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:55 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "87e48ba4-d689-9926-3bd3-805480a6c904", + "x-ms-request-id": "feeccfc5-501f-009d-1848-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-9dfe2e3da81374439f8c8881e909de3f-0bf96d569131294c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "3ea7dcbf-58d1-3e86-1468-3e8812f6f422", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:55 GMT", + "ETag": "\u00220x8D8745F7E2BAB71\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "3ea7dcbf-58d1-3e86-1468-3e8812f6f422", + "x-ms-request-id": "feeccfc6-501f-009d-1948-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-a72d79d1165ed44a8f28d139be6abb55-dce6321b87816248-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a495aede-8aff-8d32-068c-bcaf7dc4df0d", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7E366E64\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "a495aede-8aff-8d32-068c-bcaf7dc4df0d", + "x-ms-request-id": "feeccfc7-501f-009d-1a48-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-507bc660790c974b9f897c67808083b3-45e68d1725b7c749-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "63aa7093-4f61-c823-66bd-302e601f6b7a", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7E413239\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "63aa7093-4f61-c823-66bd-302e601f6b7a", + "x-ms-request-id": "feeccfc9-501f-009d-1b48-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-fcf2620a94c0d44ab65b8b397596560b-10d8e88d4ae09942-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0c1bb56b-7b19-9fac-72fc-c6648de841ec", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7E4B4361\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "0c1bb56b-7b19-9fac-72fc-c6648de841ec", + "x-ms-request-id": "feeccfcc-501f-009d-1e48-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-94e7ecaed770774e97fb29c8eb6581e6-a697c2395aacef4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "abc20904-5e03-9660-c918-164be24693b0", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7E553688\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "abc20904-5e03-9660-c918-164be24693b0", + "x-ms-request-id": "feeccfcd-501f-009d-1f48-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-38113c2dbc03274c8d1e814d2f39f037-41fbe1e45cc36a46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "8360b3be-9525-f3e8-2636-950e8273087f", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7E5F476F\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "8360b3be-9525-f3e8-2636-950e8273087f", + "x-ms-request-id": "feeccfce-501f-009d-2048-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a/test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-d6b6bf5240620c479f5b8d6895cccfc6-9cefa174ff8c8249-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "2f8c8631-0fe5-1c8a-c2f9-dd4fc3f15083", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7E696F31\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "2f8c8631-0fe5-1c8a-c2f9-dd4fc3f15083", + "x-ms-request-id": "feeccfcf-501f-009d-2148-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a?resource=filesystem\u0026recursive=true\u0026directory=test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "fbdc094f-d9e6-e69a-90a0-4bfa5c3de617", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "fbdc094f-d9e6-e69a-90a0-4bfa5c3de617", + "x-ms-request-id": "feeccfd0-501f-009d-2248-a6bf1a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:55 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E1F4238\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:55 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E2BAB71\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E366E64\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E696F31\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/bar/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E553688\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E5F476F\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/baz/foo/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:55 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E1492FC\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:55 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E4B4361\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/foo/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7E413239\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:56 GMT\u0022,\u0022name\u0022:\u0022test-directory-8e7ed98f-a54c-8918-8ff0-9f123de5b897/foo/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-9df01850-11db-e824-0c05-6f4ce389bf7a?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-40a1878f4f435e4ab93478d525040050-0eb497f81a30e044-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "baff871e-5415-4e9d-2cb3-03e08e9f28e8", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "baff871e-5415-4e9d-2cb3-03e08e9f28e8", + "x-ms-request-id": "7d44ba12-801e-006a-3548-a69588000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1155927077", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_RecursiveAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_RecursiveAsync.json new file mode 100644 index 000000000000..e3db7a385c7f --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_RecursiveAsync.json @@ -0,0 +1,432 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c20786dee59cb44790fb729ab97c60b1-88721681b498aa43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "51001928-7e23-5313-5491-77ee084330fd", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:01 GMT", + "ETag": "\u00220x8D8745F81E54EF3\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "51001928-7e23-5313-5491-77ee084330fd", + "x-ms-request-id": "545c9666-e01e-000e-2c48-a66410000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-896f6203711cb943b17862aeeb5b616b-e9a64a568eda264e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "5f018139-3d0e-5cbc-c3ef-25080e4fb896", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F8218912F\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "5f018139-3d0e-5cbc-c3ef-25080e4fb896", + "x-ms-request-id": "106b519b-d01f-0048-6d48-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-f6f11609081f0e479f7cacd9b853373f-4061c8e6820c5d46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "1989b59d-f5bc-80c0-7509-74cb674771a5", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F8222218A\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "1989b59d-f5bc-80c0-7509-74cb674771a5", + "x-ms-request-id": "106b519c-d01f-0048-6e48-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-0767217911dab449b4b9753877caa1ef-d5da0e2ff9d8ee4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "596a9747-9ec5-46da-e7af-60d48477c4aa", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F822BF94B\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "596a9747-9ec5-46da-e7af-60d48477c4aa", + "x-ms-request-id": "106b519d-d01f-0048-6f48-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-512e525f8569e742bf235f43ac4ff511-5a2e3cfc247e6d42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d0833227-18dd-b4e0-df52-d9bd4507bcc6", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F82356578\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "d0833227-18dd-b4e0-df52-d9bd4507bcc6", + "x-ms-request-id": "106b519e-d01f-0048-7048-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-db0d88865a651c438673dfa7173ddbb4-eae05da9f8b83147-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "52adaf51-f4f3-0ccc-95f0-e1950c63b1d1", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F823F31BF\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "52adaf51-f4f3-0ccc-95f0-e1950c63b1d1", + "x-ms-request-id": "106b519f-d01f-0048-7148-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2367d337e9ed7642886f5fa13d9b9ce3-39b9033d601f914e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "956c3b94-6a5a-1cd2-f646-182f3fc55311", + "x-ms-date": "Mon, 19 Oct 2020 18:48:02 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F82487896\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "956c3b94-6a5a-1cd2-f646-182f3fc55311", + "x-ms-request-id": "106b51a0-d01f-0048-7248-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-52223eba16c55742b7d7409db9ea84f0-69ba00723b6abf40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d100f6fe-1bf7-2276-42b8-cdaf9862c512", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F8251BA3E\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:03 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "d100f6fe-1bf7-2276-42b8-cdaf9862c512", + "x-ms-request-id": "106b51a1-d01f-0048-7348-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-72a9da94b2dcd243b1795ba9a1f2b1d9-9ce525573801954c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "4830e7d0-82c4-a71a-38cc-6b662cf907bb", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F825AEF6C\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:03 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "4830e7d0-82c4-a71a-38cc-6b662cf907bb", + "x-ms-request-id": "106b51a2-d01f-0048-7448-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-0b8274cccb90d54aa9aa783f1d2d9e59-4ae4da45fc8e4944-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "b1de3a35-7d31-4d4e-2efe-afa8d8656e98", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F8264335F\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:03 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "b1de3a35-7d31-4d4e-2efe-afa8d8656e98", + "x-ms-request-id": "106b51a3-d01f-0048-7548-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73/test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-0df1e643a0c6834b8f4f3ae19543f024-b4a3a02a2d6f5341-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "f2302a9a-551b-648a-19b3-22bedd14e2c6", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "ETag": "\u00220x8D8745F826D6A34\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:03 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "f2302a9a-551b-648a-19b3-22bedd14e2c6", + "x-ms-request-id": "106b51a4-d01f-0048-7648-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73?resource=filesystem\u0026recursive=true\u0026directory=test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf\u0026upn=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ae0e3bfa-7b34-707c-316b-6f4d10176616", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:48:03 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ae0e3bfa-7b34-707c-316b-6f4d10176616", + "x-ms-request-id": "106b51a5-d01f-0048-7748-a65097000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F822BF94B\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F82356578\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F823F31BF\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F826D6A34\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/bar/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F825AEF6C\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F8264335F\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/baz/foo/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F8222218A\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F8251BA3E\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:03 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/foo/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F82487896\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:02 GMT\u0022,\u0022name\u0022:\u0022test-directory-0f1742b9-cb03-1056-2b1a-6fc39bbd55cf/foo/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-6da0b7f1-1a2e-f778-f50b-f28e51badf73?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2488992e74cefb4cacb4e3a515c3e8b3-4d74cc4bb8551a4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a2c3e3a8-3406-7b91-29f4-b6883af1f34c", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:02 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "a2c3e3a8-3406-7b91-29f4-b6883af1f34c", + "x-ms-request-id": "545c9757-e01e-000e-7e48-a66410000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "438625655", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Upn.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Upn.json new file mode 100644 index 000000000000..0e23bbfdfadb --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_Upn.json @@ -0,0 +1,432 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-56b66415640ab34092b7db61807ee84e-dccd6bfe63a17045-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "f0bda5fb-d6a5-8975-a664-5a92f27aefbc", + "x-ms-date": "Mon, 19 Oct 2020 18:47:56 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:56 GMT", + "ETag": "\u00220x8D8745F7EBA4F14\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:56 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "f0bda5fb-d6a5-8975-a664-5a92f27aefbc", + "x-ms-request-id": "281c31b5-f01e-0070-3648-a6f457000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2a323fe1e315124686fa402df386fae8-a9849c2411480e4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "19411295-7f69-55be-73d3-bb387f21b6b5", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7EFC6D00\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "19411295-7f69-55be-73d3-bb387f21b6b5", + "x-ms-request-id": "e055d2b9-301f-0032-2548-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-eaa5f98e2ec67c4aa1076fdce32ec0d1-d7eb08d0f03feb40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "c0bd8f55-f5af-4219-9923-d1adfe833500", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F06DC23\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c0bd8f55-f5af-4219-9923-d1adfe833500", + "x-ms-request-id": "e055d2ba-301f-0032-2648-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-d2c74f92aa9c5b48be68b8a646d40403-f829941ad66a7944-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "f0e3109c-f663-6006-bc8e-00dcd88f8f6c", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F10D419\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "f0e3109c-f663-6006-bc8e-00dcd88f8f6c", + "x-ms-request-id": "e055d2bb-301f-0032-2748-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2f92898617bf59458f8fcdcdc65c3090-f5e4872ba3579340-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ed101249-45a0-b59c-6ec7-21297cea1346", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F1B8AEB\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "ed101249-45a0-b59c-6ec7-21297cea1346", + "x-ms-request-id": "e055d2bc-301f-0032-2848-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-59897b316778044ea00752c624e72882-286f5528c1f69e41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "c5930851-a17f-64cc-ddbb-97c537ca5add", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F25A6B2\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c5930851-a17f-64cc-ddbb-97c537ca5add", + "x-ms-request-id": "e055d2bd-301f-0032-2948-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-5dda54f09781da43a76397106a23b49e-0de95cd614e5f74f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "74d8f432-4e57-82c7-f07a-ae733c6c0d51", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F3124A5\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "74d8f432-4e57-82c7-f07a-ae733c6c0d51", + "x-ms-request-id": "e055d2be-301f-0032-2a48-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-bdf8d67928d7014d834bf3033b371e97-de75a3ba6aba394d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "42923411-e6f1-6f85-db54-203701553874", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F3BE006\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "42923411-e6f1-6f85-db54-203701553874", + "x-ms-request-id": "e055d2bf-301f-0032-2b48-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-0684cd153cb7704e8be8d1551698d6f4-7a69460606ee5641-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0861db32-cad9-ca5f-c564-8ddf63449fe9", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F469C39\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "0861db32-cad9-ca5f-c564-8ddf63449fe9", + "x-ms-request-id": "e055d2c0-301f-0032-2c48-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2e28f7cf6ac2f448b626142e7c560b0e-c21603ede4e58247-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "250467a1-30f3-f49b-201a-0cd1b3504b34", + "x-ms-date": "Mon, 19 Oct 2020 18:47:57 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F50AC93\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "250467a1-30f3-f49b-201a-0cd1b3504b34", + "x-ms-request-id": "e055d2c1-301f-0032-2d48-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61/test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-4fdec4664827974fb2df7bfb4c68d197-00277174fa1d3d45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "fc3dc65e-793f-b4f5-d300-2f386acb1db3", + "x-ms-date": "Mon, 19 Oct 2020 18:47:58 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "ETag": "\u00220x8D8745F7F5AAD71\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:47:58 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "fc3dc65e-793f-b4f5-d300-2f386acb1db3", + "x-ms-request-id": "e055d2c2-301f-0032-2e48-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61?resource=filesystem\u0026recursive=false\u0026directory=test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83\u0026upn=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ec739200-4f12-1ff5-579f-271e332d5272", + "x-ms-date": "Mon, 19 Oct 2020 18:47:58 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:47:57 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ec739200-4f12-1ff5-579f-271e332d5272", + "x-ms-request-id": "e055d2c3-301f-0032-2f48-a64dd7000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:57 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7F10D419\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:57 GMT\u0022,\u0022name\u0022:\u0022test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:57 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7F1B8AEB\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:57 GMT\u0022,\u0022name\u0022:\u0022test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:47:57 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F7F06DC23\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:47:57 GMT\u0022,\u0022name\u0022:\u0022test-directory-9b95ac47-a581-ea31-346d-5753d3f10e83/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-99774ff9-a2d8-d47a-83dd-9875ea3eaa61?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-809a2ad72bbe4e4fa2be91bc8684ec1a-11953de2af09df4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d738b40d-3158-48a0-9f01-0c59e3870bd2", + "x-ms-date": "Mon, 19 Oct 2020 18:47:58 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:47:58 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "d738b40d-3158-48a0-9f01-0c59e3870bd2", + "x-ms-request-id": "281c326a-f01e-0070-4048-a6f457000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1777626952", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_UpnAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_UpnAsync.json new file mode 100644 index 000000000000..165ff4b4a1b2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/DirectoryClientTests/GetPathsAsync_UpnAsync.json @@ -0,0 +1,432 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-f19ab426fb1e43478ad0f6cd65af740b-6b23c5804abac648-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "63cadb97-88b0-b4d0-d3ff-ac57a078f7e1", + "x-ms-date": "Mon, 19 Oct 2020 18:48:03 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F82AEE56B\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:03 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "63cadb97-88b0-b4d0-d3ff-ac57a078f7e1", + "x-ms-request-id": "07a37141-f01e-003d-3748-a63bbb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-11080856e69125498c337be5d8ef1011-f0481d7f00160d4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a41b9fc1-273c-35d1-6ed5-73603bf2cfdb", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:03 GMT", + "ETag": "\u00220x8D8745F831FDA4B\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "a41b9fc1-273c-35d1-6ed5-73603bf2cfdb", + "x-ms-request-id": "12b78dbc-e01f-007c-6a48-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-ad837b614444d54f95b3e3f895d92d62-edf600977989fc4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "451ce475-fcdc-e9c3-2f7e-c88f9a40f926", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:03 GMT", + "ETag": "\u00220x8D8745F8329EDD1\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "451ce475-fcdc-e9c3-2f7e-c88f9a40f926", + "x-ms-request-id": "12b78dbd-e01f-007c-6b48-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-1336d59b95e9344a90583dbb071e9ebf-1fa0efa162e02846-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "57eaa688-8ad5-61ff-e95c-6f46f8ecb87d", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:03 GMT", + "ETag": "\u00220x8D8745F8333E3C2\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "57eaa688-8ad5-61ff-e95c-6f46f8ecb87d", + "x-ms-request-id": "12b78dbe-e01f-007c-6c48-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/baz?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2b56924b594efb49a1517c727c129216-761875c22c76934e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "f4060648-a255-fd50-8801-1081cc5d0836", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F833D3A33\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "f4060648-a255-fd50-8801-1081cc5d0836", + "x-ms-request-id": "12b78dbf-e01f-007c-6d48-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/baz/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-27233aadb7800649820bb51d333aef88-1cc12fa6f68b794c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "f1fec09e-c4e5-8c27-84cc-ef48426e6ce3", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F83467658\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "f1fec09e-c4e5-8c27-84cc-ef48426e6ce3", + "x-ms-request-id": "12b78dc0-e01f-007c-6e48-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/foo/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-26f9209f7c630944bcffa72da7d22c15-58ec14cabde14f41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0ce2d6b6-175e-4a50-4058-d3ebce30f247", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F834FCDEC\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "0ce2d6b6-175e-4a50-4058-d3ebce30f247", + "x-ms-request-id": "12b78dc1-e01f-007c-6f48-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-5a56b14a8739784b86d499cced291518-141eb22164264641-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "6c915237-5f8c-fb85-99bb-6d71920cbb5e", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F8359C170\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "6c915237-5f8c-fb85-99bb-6d71920cbb5e", + "x-ms-request-id": "12b78dc2-e01f-007c-7048-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/baz/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-2dd6913bb8e54f4abfabe03459807c03-db0652d65cf2a844-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "7bb3e559-869e-e4bb-acab-e4292fffa7bc", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F836476D3\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "7bb3e559-869e-e4bb-acab-e4292fffa7bc", + "x-ms-request-id": "12b78dc3-e01f-007c-7148-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/baz/foo/bar?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-cfccc4456614b7439facdb4b22036e8a-4ee078cd0e1d9547-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ac17aff7-3f58-57bf-3a7a-ad43318fe966", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F836F277B\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "ac17aff7-3f58-57bf-3a7a-ad43318fe966", + "x-ms-request-id": "12b78dc4-e01f-007c-7248-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151/test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/baz/bar/foo?resource=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "If-None-Match": "*", + "traceparent": "00-ff294c6c28a2e548bd63425131f1baf3-700c597f9eb00444-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "80328764-fae7-7863-44dd-55a8f7bbef0a", + "x-ms-date": "Mon, 19 Oct 2020 18:48:04 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "ETag": "\u00220x8D8745F83793EB2\u0022", + "Last-Modified": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "80328764-fae7-7863-44dd-55a8f7bbef0a", + "x-ms-request-id": "12b78dc6-e01f-007c-7348-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.dfs.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151?resource=filesystem\u0026recursive=false\u0026directory=test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff\u0026upn=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "aadf9bb1-685d-067f-24b8-6b28ddf1bc2b", + "x-ms-date": "Mon, 19 Oct 2020 18:48:05 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 19 Oct 2020 18:48:04 GMT", + "Server": [ + "Windows-Azure-HDFS/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "aadf9bb1-685d-067f-24b8-6b28ddf1bc2b", + "x-ms-request-id": "12b78dc7-e01f-007c-7448-a6635f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [ + "{\u0022paths\u0022:[{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:04 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F8333E3C2\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:04 GMT\u0022,\u0022name\u0022:\u0022test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/bar\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:04 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F833D3A33\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:04 GMT\u0022,\u0022name\u0022:\u0022test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/baz\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022},{\u0022contentLength\u0022:\u00220\u0022,\u0022creationTime\u0022:\u0022Mon, 19 Oct 2020 18:48:04 GMT\u0022,\u0022etag\u0022:\u00220x8D8745F8329EDD1\u0022,\u0022group\u0022:\u0022$superuser\u0022,\u0022isDirectory\u0022:\u0022true\u0022,\u0022lastModified\u0022:\u0022Mon, 19 Oct 2020 18:48:04 GMT\u0022,\u0022name\u0022:\u0022test-directory-135e5f61-61a8-f46d-f050-4ddee4f7a1ff/foo\u0022,\u0022owner\u0022:\u0022$superuser\u0022,\u0022permissions\u0022:\u0022rwxr-x---\u0022}]}\n" + ] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2ecb6b47-6597-a573-9a4c-7b4b122f7151?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-46bdd45e2e5beb42a8d1be00954ce9ad-fce33bb4a6929846-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201019.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "5bf7f206-45dc-26ad-20da-6fb02b2de623", + "x-ms-date": "Mon, 19 Oct 2020 18:48:05 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 19 Oct 2020 18:48:05 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "5bf7f206-45dc-26ad-20da-6fb02b2de623", + "x-ms-request-id": "07a3720d-f01e-003d-5a48-a63bbb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2031102275", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file From e9f077c8a4ba32db614643dba9d4af9da2f22c53 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Fri, 23 Oct 2020 10:47:33 -0500 Subject: [PATCH 06/28] Hide ability to create a ShareLeaseClient for a Share or ShareSnapshot (#16119) --- sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md | 1 + .../api/Azure.Storage.Files.Shares.netstandard2.0.cs | 1 - sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md index ae2ea5ed7014..58e94d49961a 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md @@ -6,6 +6,7 @@ - Renamed ShareClient.SetTier() -> ShareClient.SetProperties(). SetProperties() can be used to set both Share Tier and Share Quota. - Changed ShareDeleteOptions.IncludeSnapshots -> .ShareSnapshotsDeleteOption, and added option to also delete Share Snapshots that have been leased. - Added additional info to exception messages. +- Removed ability to create a ShareLeaseClient for a Share or Share Snapshot. This feature has been rescheduled for future release. ## 12.5.0-preview.1 (2020-09-30) - Added support for service version 2020-02-10. diff --git a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs index aa9761b623c0..84a612809555 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs @@ -903,7 +903,6 @@ public partial class ShareLeaseClient { public static readonly System.TimeSpan InfiniteLeaseDuration; protected ShareLeaseClient() { } - public ShareLeaseClient(Azure.Storage.Files.Shares.ShareClient client, string leaseId = null) { } public ShareLeaseClient(Azure.Storage.Files.Shares.ShareFileClient client, string leaseId = null) { } protected virtual Azure.Storage.Files.Shares.ShareFileClient FileClient { get { throw null; } } public virtual string LeaseId { get { throw null; } } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs index 75fdf97d7ed8..7772d88e2776 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs @@ -106,7 +106,7 @@ public ShareLeaseClient(ShareFileClient client, string leaseId = null) /// An optional lease ID. If no lease ID is provided, a random lease /// ID will be created. /// - public ShareLeaseClient(ShareClient client, string leaseId = null) + internal ShareLeaseClient(ShareClient client, string leaseId = null) { _share = client ?? throw Errors.ArgumentNull(nameof(client)); LeaseId = leaseId ?? CreateUniqueLeaseId(); From 86bc4e2bff04e6b458d4c9e7cda32c5beb341ad2 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Fri, 23 Oct 2020 11:16:55 -0500 Subject: [PATCH 07/28] Made all Share Lease and Share Snapshot Lease tests playback-only (#16181) --- .../tests/ShareClientTests.cs | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs index b8fb4115061a..9cff3fe37bdd 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs @@ -476,6 +476,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task DeleteIfExistsAsync_Lease() { @@ -500,6 +501,7 @@ public async Task DeleteIfExistsAsync_Lease() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task DeleteIfExistsAsync_LeaseFailed() { @@ -607,6 +609,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task GetPropertiesAsync_Lease() { @@ -634,6 +637,7 @@ public async Task GetPropertiesAsync_Lease() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task GetPropertiesAsync_LeaseFailed() { @@ -685,6 +689,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task SetMetadataAsync_Lease() { @@ -716,6 +721,7 @@ await shareClient.SetMetadataAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task SetMetadataAsync_LeaseFailed() { @@ -776,6 +782,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task GetAccessPolicyAsync_Lease() { @@ -803,6 +810,7 @@ public async Task GetAccessPolicyAsync_Lease() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task GetAccessPolicyAsync_LeaseFailed() { @@ -838,6 +846,7 @@ public async Task SetAccessPolicyAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task SetAccessPolicyAsync_Lease() { @@ -870,6 +879,7 @@ await shareClient.SetAccessPolicyAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task SetAccessPolicyAsync_LeaseFailed() { @@ -1096,6 +1106,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task GetStatisticsAsync_Lease() { @@ -1123,6 +1134,7 @@ public async Task GetStatisticsAsync_Lease() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task GetStatisticsAsync_LeaseFailed() { @@ -1241,6 +1253,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task SetQuotaAsync_Lease() { @@ -1270,6 +1283,7 @@ await shareClient.SetQuotaAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task SetQuotaAsync_LeaseFailed() { @@ -1307,6 +1321,7 @@ public async Task DeleteAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task DeleteAsync_IncludeLeasedSnapshots() { @@ -1404,6 +1419,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task DeleteAsync_Lease() { @@ -1428,6 +1444,7 @@ public async Task DeleteAsync_Lease() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task DeleteAsync_LeaseFailed() { @@ -1530,6 +1547,7 @@ public async Task GetDirectoryClient_SpecialCharacters(string directoryName) } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task AcquireLeaseAsync() { @@ -1559,6 +1577,7 @@ public async Task AcquireLeaseAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task AcquireLeaseAsync_ExtendedExceptionMessage() { @@ -1579,6 +1598,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task AcquireLeaseAsync_Snapshot() { @@ -1604,6 +1624,7 @@ public async Task AcquireLeaseAsync_Snapshot() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task AcquireLeaseAsync_Error() { @@ -1620,6 +1641,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task AcquireLeaseAsync_SnapshotError() { @@ -1637,6 +1659,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ReleaseLeaseAsync() { @@ -1657,6 +1680,7 @@ public async Task ReleaseLeaseAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ReleaseLeaseAsync_Error() { @@ -1673,6 +1697,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ReleaseLeaseAsync_Snapshot() { @@ -1691,6 +1716,7 @@ public async Task ReleaseLeaseAsync_Snapshot() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ReleaseLeaseAsync_SnapshotError() { @@ -1708,6 +1734,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ChangeLeaseAsync() { @@ -1727,6 +1754,7 @@ public async Task ChangeLeaseAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ChangeLeaseAsync_Error() { @@ -1744,6 +1772,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ChangeLeaseAsync_Snapshot() { @@ -1767,6 +1796,7 @@ public async Task ChangeLeaseAsync_Snapshot() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task ChangeLeaseAsync_SnapshotError() { @@ -1784,6 +1814,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task BreakLeaseAsync() { @@ -1804,6 +1835,7 @@ public async Task BreakLeaseAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task BreakLeaseAsync_Error() { @@ -1821,6 +1853,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task BreakLeaseAsync_Snapshot() { @@ -1839,6 +1872,7 @@ public async Task BreakLeaseAsync_Snapshot() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task BreakLeaseAsync_SnapshotError() { @@ -1856,6 +1890,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task RenewLeaseAsync() { @@ -1883,6 +1918,7 @@ public async Task RenewLeaseAsync() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task RenewLeaseAsync_Error() { @@ -1900,6 +1936,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task RenewLeaseAsync_Snapshot() { @@ -1921,6 +1958,7 @@ public async Task RenewLeaseAsync_Snapshot() } [Test] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/15505")] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2020_02_10)] public async Task RenewLeaseAsync_SnapshotError() { From d846c825c5d6e9ffb8f9517dabfbefe96a4b94cc Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 23 Oct 2020 12:37:14 -0400 Subject: [PATCH 08/28] [Event Hubs Client] Shared Key Credential + Connection String Parser (#16044) The focus of these changes is to expose the shared key credential and connection string parser as part of the API surface. Adjustments to the internal representation were made to support SAS rotation and refining the API surface. --- ...ging.EventHubs.Processor.netstandard2.0.cs | 1 + .../src/EventProcessorClient.cs | 57 +++ .../EventProcessorClientLiveTests.cs | 84 +++++ .../Processor/EventProcessorClientTests.cs | 15 +- .../EventHubSharedKeyCredential.cs | 119 ------ .../Authorization/EventHubTokenCredential.cs | 3 +- .../SharedAccessSignatureCredential.cs | 16 +- .../src/Core/ConnectionStringParser.cs | 174 --------- .../src/Core/ConnectionStringProperties.cs | 119 ------ .../src/Resources.Designer.cs | 11 + .../src/Resources.resx | 3 + .../src/Testing/EventHubsTestEnvironment.cs | 12 +- .../EventHubTokenCredentialTests.cs | 2 - .../SharedAccessSignatureCredentialTests.cs | 24 +- .../Core/ConnectionStringPropertiesTests.cs | 110 ------ ...zure.Messaging.EventHubs.netstandard2.0.cs | 50 +++ .../EventHubsSharedAccessKeyCredential.cs | 175 +++++++++ .../src/Consumer/EventHubConsumerClient.cs | 30 ++ .../src/EventHubConnection.cs | 64 +++- .../src/EventHubProperties.cs | 30 ++ .../EventHubsConnectionStringProperties.cs | 347 +++++++++++++++++ .../src/PartitionProperties.cs | 30 ++ .../Primitives/EventProcessor{TPartition}.cs | 88 +++-- .../src/Primitives/PartitionReceiver.cs | 40 ++ .../src/Producer/EventHubProducerClient.cs | 38 ++ ...ventHubsSharedAccessKeyCredentialTests.cs} | 178 ++++++--- .../Connection/EventHubConnectionLiveTests.cs | 9 +- .../Connection/EventHubConnectionTests.cs | 199 +++++++--- .../EventHubConsumerClientLiveTests.cs | 81 ++++ .../Consumer/EventHubConsumerClientTests.cs | 66 +++- ...entHubsConnectionStringPropertiesTests.cs} | 351 ++++++++++++++++-- .../EventProcessorTests.Constructor.cs | 93 ++++- .../EventProcessorTests.Infrastructure.cs | 4 +- .../tests/Primitives/EventProcessorTests.cs | 7 + .../Primitives/PartitionReceiverLiveTests.cs | 37 ++ .../Primitives/PartitionReceiverTests.cs | 126 ++++++- .../EventHubProducerClientLiveTests.cs | 28 ++ .../Producer/EventHubProducerClientTests.cs | 47 ++- .../Producer/IdempotentPublishingLiveTests.cs | 2 +- 39 files changed, 2096 insertions(+), 774 deletions(-) delete mode 100755 sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubSharedKeyCredential.cs mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubTokenCredential.cs delete mode 100755 sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringParser.cs delete mode 100644 sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringProperties.cs mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubTokenCredentialTests.cs delete mode 100644 sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringPropertiesTests.cs create mode 100644 sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubProperties.cs create mode 100644 sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubsConnectionStringProperties.cs mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs/src/PartitionProperties.cs rename sdk/eventhub/{Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubSharedKeyCredentialTests.cs => Azure.Messaging.EventHubs/tests/Authorization/EventHubsSharedAccessKeyCredentialTests.cs} (58%) mode change 100755 => 100644 mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs rename sdk/eventhub/{Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringParserTests.cs => Azure.Messaging.EventHubs/tests/Core/EventHubsConnectionStringPropertiesTests.cs} (50%) mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs mode change 100755 => 100644 sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/api/Azure.Messaging.EventHubs.Processor.netstandard2.0.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/api/Azure.Messaging.EventHubs.Processor.netstandard2.0.cs index a5aa8f6c0c14..ff8ed3c52970 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/api/Azure.Messaging.EventHubs.Processor.netstandard2.0.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/api/Azure.Messaging.EventHubs.Processor.netstandard2.0.cs @@ -7,6 +7,7 @@ public EventProcessorClient(Azure.Storage.Blobs.BlobContainerClient checkpointSt public EventProcessorClient(Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions) { } public EventProcessorClient(Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString, string eventHubName) { } public EventProcessorClient(Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions = null) { } + public EventProcessorClient(Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Messaging.EventHubs.EventHubsSharedAccessKeyCredential credential, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions = null) { } public EventProcessorClient(Azure.Storage.Blobs.BlobContainerClient checkpointStore, string consumerGroup, string connectionString, string eventHubName, Azure.Messaging.EventHubs.EventProcessorClientOptions clientOptions) { } public new string ConsumerGroup { get { throw null; } } public new string EventHubName { get { throw null; } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs index ae44438dc2eb..3ad9d1f90e2b 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs @@ -405,6 +405,33 @@ public EventProcessorClient(BlobContainerClient checkpointStore, StorageManager = CreateStorageManager(checkpointStore); } + /// + /// Initializes a new instance of the class. + /// + /// + /// The client responsible for persisting checkpoints and processor state to durable storage. The associated container is expected to exist. + /// The name of the consumer group this processor is associated with. Events are read in the context of this group. + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the processor with. + /// The Event Hubs shared access key credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration. + /// The set of options to use for this processor. + /// + /// + /// The container associated with the is expected to exist; the + /// does not assume the ability to manage the storage account and is safe to run without permission to manage the storage account. + /// + /// + public EventProcessorClient(BlobContainerClient checkpointStore, + string consumerGroup, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventProcessorClientOptions clientOptions = default) : base((clientOptions ?? DefaultClientOptions).CacheEventCount, consumerGroup, fullyQualifiedNamespace, eventHubName, credential, CreateOptions(clientOptions)) + { + Argument.AssertNotNull(checkpointStore, nameof(checkpointStore)); + StorageManager = CreateStorageManager(checkpointStore); + } + /// /// Initializes a new instance of the class. /// @@ -432,6 +459,36 @@ public EventProcessorClient(BlobContainerClient checkpointStore, StorageManager = CreateStorageManager(checkpointStore); } + /// + /// Initializes a new instance of the class. + /// + /// + /// Responsible for creation of checkpoints and for ownership claim. + /// The name of the consumer group this processor is associated with. Events are read in the context of this group. + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the processor with. + /// The maximum number of events that will be read from the Event Hubs service and held in a local memory cache when reading is active and events are being emitted to an enumerator for processing. + /// A shared access key credential to satisfy base class requirements; this credential may not be null but will only be used in the case that has not been overridden. + /// The set of options to use for this processor. + /// + /// + /// This constructor is intended only to support functional testing and mocking; it should not be used for production scenarios. + /// + /// + internal EventProcessorClient(StorageManager storageManager, + string consumerGroup, + string fullyQualifiedNamespace, + string eventHubName, + int cacheEventCount, + EventHubsSharedAccessKeyCredential credential, + EventProcessorOptions clientOptions) : base(cacheEventCount, consumerGroup, fullyQualifiedNamespace, eventHubName, credential, clientOptions) + { + Argument.AssertNotNull(storageManager, nameof(storageManager)); + + DefaultStartingPosition = (clientOptions?.DefaultStartingPosition ?? DefaultStartingPosition); + StorageManager = storageManager; + } + /// /// Initializes a new instance of the class. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs index 387e77496a25..cf513a24b803 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientLiveTests.cs @@ -134,6 +134,56 @@ public async Task EventsCanBeReadByOneProcessorClientUsingAnIdentityCredential() } } + /// + /// Verifies that the can read a set of published events. + /// + /// + [Test] + public async Task EventsCanBeReadByOneProcessorClientUsingTheSharedKeyCredential() + { + // Setup the environment. + + await using EventHubScope scope = await EventHubScope.CreateAsync(2); + var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); + + using var cancellationSource = new CancellationTokenSource(); + cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + + // Send a set of events. + + var sourceEvents = EventGenerator.CreateEvents(50).ToList(); + var sentCount = await SendEvents(connectionString, sourceEvents, cancellationSource.Token); + + Assert.That(sentCount, Is.EqualTo(sourceEvents.Count), "Not all of the source events were sent."); + + // Attempt to read back the events. + + var processedEvents = new ConcurrentDictionary(); + var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var options = new EventProcessorOptions { LoadBalancingUpdateInterval = TimeSpan.FromMilliseconds(250) }; + var processor = CreateProcessorWithSharedAccessKey(scope.ConsumerGroups.First(), scope.EventHubName, options: options); + + processor.ProcessErrorAsync += CreateAssertingErrorHandler(); + processor.ProcessEventAsync += CreateEventTrackingHandler(sentCount, processedEvents, completionSource, cancellationSource.Token); + + await processor.StartProcessingAsync(cancellationSource.Token); + + await Task.WhenAny(completionSource.Task, Task.Delay(Timeout.Infinite, cancellationSource.Token)); + Assert.That(cancellationSource.IsCancellationRequested, Is.False, $"The cancellation token should not have been signaled. { processedEvents.Count } events were processed."); + + await processor.StopProcessingAsync(cancellationSource.Token); + cancellationSource.Cancel(); + + // Validate the events that were processed. + + foreach (var sourceEvent in sourceEvents) + { + var sourceId = sourceEvent.Properties[EventGenerator.IdPropertyName].ToString(); + Assert.That(processedEvents.TryGetValue(sourceId, out var processedEvent), Is.True, $"The event with custom identifier [{ sourceId }] was not processed." ); + Assert.That(sourceEvent.IsEquivalentTo(processedEvent), $"The event with custom identifier [{ sourceId }] did not match the corresponding processed event."); + } + } + /// /// Verifies that the can read a set of published events. /// @@ -477,6 +527,29 @@ private EventProcessorClient CreateProcessorWithIdentity(string consumerGroup, return new TestEventProcessorClient(storageManager, consumerGroup, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, eventHubName, credential, createConnection, options); } + /// + /// Creates an that uses mock storage and + /// a connection based on an identity credential. + /// + /// + /// The consumer group for the processor. + /// The name of the Event Hub for the processor. + /// The set of client options to pass. + /// + /// The processor instance. + /// + private EventProcessorClient CreateProcessorWithSharedAccessKey(string consumerGroup, + string eventHubName, + StorageManager storageManager = default, + EventProcessorOptions options = default) + { + var credential = new EventHubsSharedAccessKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); + EventHubConnection createConnection() => new EventHubConnection(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, eventHubName, credential); + + storageManager ??= new InMemoryStorageManager(_=> {}); + return new TestEventProcessorClient(storageManager, consumerGroup, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, eventHubName, credential, createConnection, options); + } + /// /// Sends a set of events using a new producer to do so. /// @@ -575,6 +648,17 @@ public class TestEventProcessorClient : EventProcessorClient { private readonly Func InjectedConnectionFactory; + internal TestEventProcessorClient(StorageManager storageManager, + string consumerGroup, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + Func connectionFactory, + EventProcessorOptions options) : base(storageManager, consumerGroup, fullyQualifiedNamespace, eventHubName, 100, credential, options) + { + InjectedConnectionFactory = connectionFactory; + } + internal TestEventProcessorClient(StorageManager storageManager, string consumerGroup, string fullyQualifiedNamespace, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientTests.cs index 1dce55fe8e86..053781ca4f96 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Processor/EventProcessorClientTests.cs @@ -37,7 +37,8 @@ public class EventProcessorClientTests public void ConstructorsValidateTheConsumerGroup(string consumerGroup) { Assert.That(() => new EventProcessorClient(Mock.Of(), consumerGroup, "dummyConnection", new EventProcessorClientOptions()), Throws.InstanceOf(), "The connection string constructor should validate the consumer group."); - Assert.That(() => new EventProcessorClient(Mock.Of(), consumerGroup, "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorClientOptions()), Throws.InstanceOf(), "The namespace constructor should validate the consumer group."); + Assert.That(() => new EventProcessorClient(Mock.Of(), consumerGroup, "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorClientOptions()), Throws.InstanceOf(), "The token credential constructor should validate the consumer group."); + Assert.That(() => new EventProcessorClient(Mock.Of(), consumerGroup, "dummyNamespace", "dummyEventHub", new EventHubsSharedAccessKeyCredential("key", "value"), new EventProcessorClientOptions()), Throws.InstanceOf(), "The shared key credential constructor should validate the consumer group."); } /// @@ -51,7 +52,8 @@ public void ConstructorsValidateTheBlobContainerClient() var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"; Assert.That(() => new EventProcessorClient(null, "consumerGroup", fakeConnection, new EventProcessorClientOptions()), Throws.InstanceOf(), "The connection string constructor should validate the blob container client."); - Assert.That(() => new EventProcessorClient(null, "consumerGroup", "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorClientOptions()), Throws.InstanceOf(), "The namespace constructor should validate the blob container client."); + Assert.That(() => new EventProcessorClient(null, "consumerGroup", "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorClientOptions()), Throws.InstanceOf(), "The token credential constructor should validate the blob container client."); + Assert.That(() => new EventProcessorClient(null, "consumerGroup", "dummyNamespace", "dummyEventHub", new EventHubsSharedAccessKeyCredential("key", "value"), new EventProcessorClientOptions()), Throws.InstanceOf(), "The shared key credential constructor should validate the blob container client."); } /// @@ -77,7 +79,8 @@ public void ConstructorsValidateTheConnectionString(string connectionString) [TestCase("http://namspace.servciebus.windows.com")] public void ConstructorValidatesTheNamespace(string constructorArgument) { - Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", Mock.Of()), Throws.InstanceOf()); + Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", Mock.Of()), Throws.InstanceOf(), "The token credential should validate."); + Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential should validate."); } /// @@ -89,7 +92,8 @@ public void ConstructorValidatesTheNamespace(string constructorArgument) [TestCase("")] public void ConstructorValidatesTheEventHub(string constructorArgument) { - Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, Mock.Of()), Throws.InstanceOf()); + Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, Mock.Of()), Throws.InstanceOf(), "The token credential should validate."); + Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential should validate."); } /// @@ -99,7 +103,8 @@ public void ConstructorValidatesTheEventHub(string constructorArgument) [Test] public void ConstructorValidatesTheCredential() { - Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException); + Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException, "The token credential should validate."); + Assert.That(() => new EventProcessorClient(Mock.Of(), EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(EventHubsSharedAccessKeyCredential)), Throws.ArgumentNullException, "The shared key credential should validate."); } /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubSharedKeyCredential.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubSharedKeyCredential.cs deleted file mode 100755 index 64ccedc1acdc..000000000000 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubSharedKeyCredential.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Messaging.EventHubs.Authorization; - -namespace Azure.Messaging.EventHubs -{ - /// - /// Provides a credential based on a shared access signature for a given - /// Event Hub instance. - /// - /// - /// - /// - internal sealed class EventHubSharedKeyCredential : TokenCredential - { - /// - /// The name of the shared access key to be used for authorization, as - /// reported by the Azure portal. - /// - /// - private string SharedAccessKeyName { get; set; } - - /// - /// The value of the shared access key to be used for authorization, as - /// reported by the Azure portal. - /// - /// - private string SharedAccessKey { get; set; } - - /// - /// A reference to a corresponding SharedAccessSignatureCredential. - /// - /// - private SharedAccessSignatureCredential SharedAccessSignatureCredential { get; set; } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The name of the shared access key to be used for authorization, as reported by the Azure portal. - /// The value of the shared access key to be used for authorization, as reported by the Azure portal. - /// - public EventHubSharedKeyCredential(string sharedAccessKeyName, - string sharedAccessKey) - { - Argument.AssertNotNullOrEmpty(sharedAccessKeyName, nameof(sharedAccessKeyName)); - Argument.AssertNotNullOrEmpty(sharedAccessKey, nameof(sharedAccessKey)); - - SharedAccessKeyName = sharedAccessKeyName; - SharedAccessKey = sharedAccessKey; - } - - /// - /// Retrieves the token that represents the shared access signature credential, for - /// use in authorization against an Event Hub. - /// - /// - /// The details of the authentication request. - /// The token used to request cancellation of the operation. - /// - /// The token representing the shared access signature for this credential. - /// - public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => throw new InvalidOperationException(Resources.SharedKeyCredentialCannotGenerateTokens); - - /// - /// Retrieves the token that represents the shared access signature credential, for - /// use in authorization against an Event Hub. - /// - /// - /// The details of the authentication request. - /// The token used to request cancellation of the operation. - /// - /// The token representing the shared access signature for this credential. - /// - public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) => throw new InvalidOperationException(Resources.SharedKeyCredentialCannotGenerateTokens); - - /// - /// Allows the rotation of Shared Access Signatures. - /// - /// - /// The name of the shared access key that the signature should be based on. - /// The value of the shared access key for the signature. - /// - public void UpdateSharedAccessKey(string keyName, - string keyValue) - { - Argument.AssertNotNullOrEmpty(keyName, nameof(keyName)); - Argument.AssertNotNullOrEmpty(keyValue, nameof(keyValue)); - - SharedAccessKeyName = keyName; - SharedAccessKey = keyValue; - - SharedAccessSignatureCredential?.UpdateSharedAccessKey(keyName, keyValue); - } - - /// - /// Coverts to shared access signature credential. - /// It retains a reference to the generated SharedAccessSignatureCredential. - /// - /// - /// The Event Hubs resource to which the token is intended to serve as authorization. - /// The duration that the signature should be considered valid; if not specified, a default will be assumed. - /// - /// A new based on the requested shared access key. - /// - internal SharedAccessSignatureCredential AsSharedAccessSignatureCredential(string eventHubResource, - TimeSpan? signatureValidityDuration = default) - { - SharedAccessSignatureCredential = new SharedAccessSignatureCredential(new SharedAccessSignature(eventHubResource, SharedAccessKeyName, SharedAccessKey, signatureValidityDuration)); - - return SharedAccessSignatureCredential; - } - } -} diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubTokenCredential.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubTokenCredential.cs old mode 100755 new mode 100644 index 0da9234d4590..b6a7f72a6699 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubTokenCredential.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/EventHubTokenCredential.cs @@ -56,8 +56,7 @@ public EventHubTokenCredential(TokenCredential tokenCredential, Resource = eventHubResource; IsSharedAccessSignatureCredential = - (tokenCredential is EventHubSharedKeyCredential) - || (tokenCredential is SharedAccessSignatureCredential) + (tokenCredential is SharedAccessSignatureCredential) || ((tokenCredential as EventHubTokenCredential)?.IsSharedAccessSignatureCredential == true); } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/SharedAccessSignatureCredential.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/SharedAccessSignatureCredential.cs index 49cc4106e8f5..4029e64a8851 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/SharedAccessSignatureCredential.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Authorization/SharedAccessSignatureCredential.cs @@ -90,7 +90,7 @@ public override ValueTask GetTokenAsync(TokenRequestContext request CancellationToken cancellationToken) => new ValueTask(GetToken(requestContext, cancellationToken)); /// - /// It creates a new shared signature using the key name and the key value passed as + /// Creates a new shared signature using the key name and the key value passed as /// input allowing credentials rotation. A call will not extend the signature duration. /// /// @@ -108,5 +108,19 @@ internal void UpdateSharedAccessKey(string keyName, string keyValue) SharedAccessSignature.SignatureExpiration); } } + + /// + /// Creates a new shared signature allowing credentials rotation. + /// + /// + /// The shared access signature that forms the basis of this security token. + /// + internal void UpdateSharedAccessSignature(string signature) + { + lock (SignatureSyncRoot) + { + SharedAccessSignature = new SharedAccessSignature(signature); + } + } } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringParser.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringParser.cs deleted file mode 100755 index 3f366c3c3dda..000000000000 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringParser.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core; - -namespace Azure.Messaging.EventHubs.Core -{ - /// - /// Allows for parsing Event Hubs connection strings. - /// - /// - internal static class ConnectionStringParser - { - /// The token that identifies the endpoint address for the Event Hubs namespace. - private const string EndpointToken = "Endpoint"; - - /// The token that identifies the name of a specific Event Hub under the namespace. - private const string EventHubNameToken = "EntityPath"; - - /// The token that identifies the name of a shared access key. - private const string SharedAccessKeyNameToken = "SharedAccessKeyName"; - - /// The token that identifies the value of a shared access key. - private const string SharedAccessKeyValueToken = "SharedAccessKey"; - - /// The token that identifies the value of a shared access signature. - private const string SharedAccessSignatureToken = "SharedAccessSignature"; - - /// The character used to separate a token and its value in the connection string. - private const char TokenValueSeparator = '='; - - /// The character used to mark the beginning of a new token/value pair in the connection string. - private const char TokenValuePairDelimiter = ';'; - - /// The name of the protocol used by an Event Hubs endpoint. - private const string EventHubsEndpointSchemeName = "sb"; - - /// The formatted protocol used by an Event Hubs endpoint. - private static readonly string EventHubsEndpointScheme = $"{ EventHubsEndpointSchemeName }{ Uri.SchemeDelimiter }"; - - /// - /// Parses the specified Event Hubs connection string into its component properties. - /// - /// - /// The connection string to parse. - /// - /// The component properties parsed from the connection string. - /// - /// - /// - public static ConnectionStringProperties Parse(string connectionString) - { - Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString)); - - int tokenPositionModifier = (connectionString[0] == TokenValuePairDelimiter) ? 0 : 1; - int lastPosition = 0; - int currentPosition = 0; - int valueStart; - - string slice; - string token; - string value; - - var parsedValues = - ( - EndpointToken: default(UriBuilder), - EventHubNameToken: default(string), - SharedAccessKeyNameToken: default(string), - SharedAccessKeyValueToken: default(string), - SharedAccessSignatureToken: default(string) - ); - - while (currentPosition != -1) - { - // Slice the string into the next token/value pair. - - currentPosition = connectionString.IndexOf(TokenValuePairDelimiter, lastPosition + 1); - - if (currentPosition >= 0) - { - slice = connectionString.Substring(lastPosition, (currentPosition - lastPosition)); - } - else - { - slice = connectionString.Substring(lastPosition); - } - - // Break the token and value apart, if this is a legal pair. - - valueStart = slice.IndexOf(TokenValueSeparator); - - if (valueStart >= 0) - { - token = slice.Substring((1 - tokenPositionModifier), (valueStart - 1 + tokenPositionModifier)); - value = slice.Substring(valueStart + 1); - - // Guard against leading and trailing spaces, only trimming if there is a need. - - if ((!string.IsNullOrEmpty(token)) && (char.IsWhiteSpace(token[0])) || char.IsWhiteSpace(token[token.Length - 1])) - { - token = token.Trim(); - } - - if ((!string.IsNullOrEmpty(value)) && (char.IsWhiteSpace(value[0]) || char.IsWhiteSpace(value[value.Length - 1]))) - { - value = value.Trim(); - } - - // If there was no value for a key, then consider the connection string to - // be malformed. - - if (string.IsNullOrEmpty(value)) - { - throw new FormatException(Resources.InvalidConnectionString); - } - - // Compare the token against the known connection string properties and capture the - // pair if they are a known attribute. - - if (string.Compare(EndpointToken, token, StringComparison.OrdinalIgnoreCase) == 0) - { - parsedValues.EndpointToken = new UriBuilder(value) - { - Scheme = EventHubsEndpointScheme, - Port = -1 - }; - - if ((string.Compare(parsedValues.EndpointToken.Scheme, EventHubsEndpointSchemeName, StringComparison.OrdinalIgnoreCase) != 0) - || (Uri.CheckHostName(parsedValues.EndpointToken.Host) == UriHostNameType.Unknown)) - { - throw new FormatException(Resources.InvalidConnectionString); - } - } - else if (string.Compare(EventHubNameToken, token, StringComparison.OrdinalIgnoreCase) == 0) - { - parsedValues.EventHubNameToken = value; - } - else if (string.Compare(SharedAccessKeyNameToken, token, StringComparison.OrdinalIgnoreCase) == 0) - { - parsedValues.SharedAccessKeyNameToken = value; - } - else if (string.Compare(SharedAccessKeyValueToken, token, StringComparison.OrdinalIgnoreCase) == 0) - { - parsedValues.SharedAccessKeyValueToken = value; - } - else if (string.Compare(SharedAccessSignatureToken, token, StringComparison.OrdinalIgnoreCase) == 0) - { - parsedValues.SharedAccessSignatureToken = value; - } - } - else if ((slice.Length != 1) || (slice[0] != TokenValuePairDelimiter)) - { - // This wasn't a legal pair and it is not simply a trailing delimiter; consider - // the connection string to be malformed. - - throw new FormatException(Resources.InvalidConnectionString); - } - - tokenPositionModifier = 0; - lastPosition = currentPosition; - } - - return new ConnectionStringProperties - ( - parsedValues.EndpointToken?.Uri, - parsedValues.EventHubNameToken, - parsedValues.SharedAccessKeyNameToken, - parsedValues.SharedAccessKeyValueToken, - parsedValues.SharedAccessSignatureToken - ); - } - } -} diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringProperties.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringProperties.cs deleted file mode 100644 index f1e6401bfdfc..000000000000 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Core/ConnectionStringProperties.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; - -namespace Azure.Messaging.EventHubs.Core -{ - /// - /// The set of properties that comprise a connection string from the - /// Azure portal. - /// - /// - internal struct ConnectionStringProperties - { - /// - /// The endpoint to be used for connecting to the Event Hubs namespace. - /// - /// - /// The endpoint address, including protocol, from the connection string. - /// - public Uri Endpoint { get; } - - /// - /// The name of the specific Event Hub instance under the associated Event Hubs namespace. - /// - /// - public string EventHubName { get; } - - /// - /// The name of the shared access key, either for the Event Hubs namespace - /// or the Event Hub. - /// - /// - public string SharedAccessKeyName { get; } - - /// - /// The value of the shared access key, either for the Event Hubs namespace - /// or the Event Hub. - /// - /// - public string SharedAccessKey { get; } - - /// - /// The value of the fully-formed shared access signature, either for the Event Hubs - /// namespace or the Event Hub. - /// - /// - public string SharedAccessSignature { get; } - - /// - /// Initializes a new instance of the structure. - /// - /// - /// The endpoint of the Event Hubs namespace. - /// The name of the specific Event Hub under the namespace. - /// The name of the shared access key, to use authorization. - /// The shared access key to use for authorization. - /// The precomputed shared access signature to use for authorization. - /// - public ConnectionStringProperties(Uri endpoint, - string eventHubName, - string sharedAccessKeyName, - string sharedAccessKey, - string sharedAccessSignature) - { - Endpoint = endpoint; - EventHubName = eventHubName; - SharedAccessKeyName = sharedAccessKeyName; - SharedAccessKey = sharedAccessKey; - SharedAccessSignature = sharedAccessSignature; - } - - /// - /// Performs the actions needed to validate the set of connection string properties for connecting to the - /// Event Hubs service. - /// - /// - /// The name of the Event Hub that was explicitly passed independent of the connection string, allowing easier use of a namespace-level connection string. - /// The name of the argument associated with the connection string; to be used when raising variants. - /// - /// In the case that the properties violate an invariant or otherwise represent a combination that is not permissible, an appropriate exception will be thrown. - /// - public void Validate(string explicitEventHubName, - string connectionStringArgumentName) - { - // The Event Hub name may only be specified in one of the possible forms, either as part of the - // connection string or as a stand-alone parameter, but not both. If specified in both to the same - // value, then do not consider this a failure. - - if ((!string.IsNullOrEmpty(explicitEventHubName)) - && (!string.IsNullOrEmpty(EventHubName)) - && (!string.Equals(explicitEventHubName, EventHubName, StringComparison.InvariantCultureIgnoreCase))) - { - throw new ArgumentException(Resources.OnlyOneEventHubNameMayBeSpecified, connectionStringArgumentName); - } - - // The connection string may contain a precomputed shared access signature OR a shared key name and value, - // but not both. - - if ((!string.IsNullOrEmpty(SharedAccessSignature)) - && ((!string.IsNullOrEmpty(SharedAccessKeyName)) || (!string.IsNullOrEmpty(SharedAccessKey)))) - { - throw new ArgumentException(Resources.OnlyOneSharedAccessAuthorizationMayBeSpecified, connectionStringArgumentName); - } - - // Ensure that each of the needed components are present for connecting. - - var hasSharedKey = ((!string.IsNullOrEmpty(SharedAccessKeyName)) && (!string.IsNullOrEmpty(SharedAccessKey))); - var hasSharedSignature = (!string.IsNullOrEmpty(SharedAccessSignature)); - - if (string.IsNullOrEmpty(Endpoint?.Host) - || ((string.IsNullOrEmpty(explicitEventHubName)) && (string.IsNullOrEmpty(EventHubName))) - || ((!hasSharedKey) && (!hasSharedSignature))) - { - throw new ArgumentException(Resources.MissingConnectionInformation, connectionStringArgumentName); - } - } - } -} diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.Designer.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.Designer.cs index 3777fb7e9710..d0e3034bac96 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.Designer.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.Designer.cs @@ -286,6 +286,17 @@ internal static string InvalidSharedAccessSignature } } + /// + /// Looks up a localized string similar to The endpoint address could not be parsed; it was either malformed or not using the `sb://` scheme.. + /// + internal static string InvalidEndpointAddress + { + get + { + return ResourceManager.GetString("InvalidEndpointAddress", resourceCulture); + } + } + /// /// Looks up a localized string similar to The time period may not be Zero or Infinite.. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.resx b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.resx index bd1f476eb16c..5ba5bb875a57 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.resx +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.resx @@ -159,6 +159,9 @@ The specified connection type, "{0}", is not recognized as valid in this context. + + The endpoint address could not be parsed; it was either malformed or not using the `sb://` scheme. + The shared access signature could not be parsed; it was either malformed or incorrectly encoded. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs index 959dc33f6ce3..e96155181574 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Testing/EventHubsTestEnvironment.cs @@ -43,7 +43,7 @@ public sealed class EventHubsTestEnvironment: TestEnvironment private readonly Lazy ActivePerTestExecutionLimit; /// The connection string for the active Event Hubs namespace for this test run, lazily created. - private readonly Lazy ParsedConnectionString; + private readonly Lazy ParsedConnectionString; /// /// The shared instance of the to be used during test runs. @@ -89,7 +89,7 @@ public sealed class EventHubsTestEnvironment: TestEnvironment /// /// The fully qualified namespace, as contained within the associated connection string. /// - public string FullyQualifiedNamespace => ParsedConnectionString.Value.Endpoint.Host; + public string FullyQualifiedNamespace => ParsedConnectionString.Value.FullyQualifiedNamespace; /// /// The name of the Event Hub to use during Live tests. @@ -139,7 +139,7 @@ public sealed class EventHubsTestEnvironment: TestEnvironment /// private EventHubsTestEnvironment() : base("eventhub") { - ParsedConnectionString = new Lazy(() => ConnectionStringParser.Parse(EventHubsConnectionString), LazyThreadSafetyMode.ExecutionAndPublication); + ParsedConnectionString = new Lazy(() => EventHubsConnectionStringProperties.Parse(EventHubsConnectionString), LazyThreadSafetyMode.ExecutionAndPublication); ActiveEventHubsNamespace = new Lazy(EnsureEventHubsNamespace, LazyThreadSafetyMode.ExecutionAndPublication); ActivePerTestExecutionLimit = new Lazy(() => @@ -183,7 +183,7 @@ public string BuildConnectionStringWithSharedAccessSignature(string eventHubName int validDurationMinutes = 30) { var signature = new SharedAccessSignature(signatureAudience, SharedAccessKeyName, SharedAccessKey, TimeSpan.FromMinutes(validDurationMinutes)); - return $"Endpoint={ ParsedConnectionString.Value.Endpoint };EntityPath={ eventHubName };SharedAccessSignature={ signature.Value }"; + return $"Endpoint=sb://{ ParsedConnectionString.Value.FullyQualifiedNamespace };EntityPath={ eventHubName };SharedAccessSignature={ signature.Value }"; } /// @@ -200,11 +200,11 @@ private NamespaceProperties EnsureEventHubsNamespace() if (!string.IsNullOrEmpty(environmentConnectionString)) { - var parsed = ConnectionStringParser.Parse(environmentConnectionString); + var parsed = EventHubsConnectionStringProperties.Parse(environmentConnectionString); return new NamespaceProperties ( - parsed.Endpoint.Host.Substring(0, parsed.Endpoint.Host.IndexOf('.')), + parsed.FullyQualifiedNamespace.Substring(0, parsed.FullyQualifiedNamespace.IndexOf('.')), environmentConnectionString.Replace($";EntityPath={ parsed.EventHubName }", string.Empty), shouldRemoveAtCompletion: false ); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubTokenCredentialTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubTokenCredentialTests.cs old mode 100755 new mode 100644 index 7de82da1f25c..52e76620f521 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubTokenCredentialTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubTokenCredentialTests.cs @@ -32,8 +32,6 @@ public static IEnumerable SharedAccessSignatureCredentialTestCases() var signature = new SharedAccessSignature("hub", "keyName", "key", "TOkEn!", DateTimeOffset.UtcNow.AddHours(4)); yield return new object[] { new SharedAccessSignatureCredential(signature), true }; - yield return new object[] { new EventHubSharedKeyCredential("blah", "foo"), true }; - yield return new object[] { new EventHubTokenCredential(new EventHubSharedKeyCredential("blah", "foo"), "hub"), true }; yield return new object[] { new EventHubTokenCredential(credentialMock, "thing"), false }; yield return new object[] { credentialMock, false }; } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/SharedAccessSignatureCredentialTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/SharedAccessSignatureCredentialTests.cs index 2bcc8beb8406..7d774d720424 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/SharedAccessSignatureCredentialTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/SharedAccessSignatureCredentialTests.cs @@ -179,7 +179,7 @@ public void GetTokenDoesNotExtendATokenCloseToExpiringWhenCreatedWithoutTheKey() /// /// [Test] - public void ShouldUpdateSharedAccessKey() + public void SharedAccessKeyCanBeUpdated() { var value = "TOkEn!"; var tokenExpiration = DateTimeOffset.UtcNow.Add(TimeSpan.FromSeconds(GetSignatureRefreshBuffer().TotalSeconds / 2)); @@ -195,6 +195,28 @@ public void ShouldUpdateSharedAccessKey() Assert.That(newSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration)); } + /// + /// Verifies that a signature can be rotated without refreshing its validity. + /// + /// + [Test] + public void SharedAccesSignatureCanBeUpdated() + { + var tokenExpiration = TimeSpan.FromSeconds(GetSignatureRefreshBuffer().TotalSeconds / 2); + var signature = new SharedAccessSignature("hub-name", "keyName", "key", tokenExpiration); + var updatedSignature = new SharedAccessSignature("hub-name", "newKeyName", "newKey", tokenExpiration.Add(TimeSpan.FromMinutes(30))); + var credential = new SharedAccessSignatureCredential(signature); + + credential.UpdateSharedAccessSignature(updatedSignature.Value); + + var newSignature = GetSharedAccessSignature(credential); + + Assert.That(newSignature.Value, Is.EqualTo(updatedSignature.Value)); + Assert.That(newSignature.SharedAccessKeyName, Is.EqualTo(updatedSignature.SharedAccessKeyName)); + Assert.That(newSignature.SharedAccessKey, Is.Null); + Assert.That(newSignature.SignatureExpiration, Is.EqualTo(updatedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5))); + } + /// /// Converts a value to the corresponding Unix-style time stamp. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringPropertiesTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringPropertiesTests.cs deleted file mode 100644 index 390d9269eab4..000000000000 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringPropertiesTests.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Messaging.EventHubs.Core; -using NUnit.Framework; - -namespace Azure.Messaging.EventHubs.Tests -{ - /// - /// The suite of tests for the - /// class. - /// - /// - [TestFixture] - public class ConnectionStringPropertiesTests - { - /// - /// Verifies functionality of the - /// method. - /// - /// - [Test] - [TestCase("SharedAccessKeyName=[value];SharedAccessKey=[value];EntityPath=[value]")] - [TestCase("Endpoint=sb://value.com;SharedAccessKey=[value];EntityPath=[value]")] - [TestCase("Endpoint=sb://value.com;SharedAccessKeyName=[value];EntityPath=[value]")] - [TestCase("Endpoint=sb://value.com;SharedAccessKeyName=[value];SharedAccessKey=[value]")] - [TestCase("HostName=value.azure-devices.net;SharedAccessKeyName=[value];SharedAccessKey=[value]")] - [TestCase("HostName=value.azure-devices.net;SharedAccessKeyName=[value];SharedAccessKey=[value];EntityPath=[value]")] - public void ValidateDetectsMissingConnectionStringInformation(string connectionString) - { - var properties = ConnectionStringParser.Parse(connectionString); - Assert.That(() => properties.Validate(null, "Dummy"), Throws.ArgumentException.And.Message.StartsWith(Resources.MissingConnectionInformation)); - } - - /// - /// Verifies functionality of the - /// method. - /// - /// - [Test] - public void ValidateDetectsMultipleEventHubNames() - { - var eventHubName = "myHub"; - var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=[unique_fake]"; - var properties = ConnectionStringParser.Parse(fakeConnection); - - Assert.That(() => properties.Validate(eventHubName, "Dummy"), Throws.ArgumentException.And.Message.StartsWith(Resources.OnlyOneEventHubNameMayBeSpecified)); - } - - /// - /// Verifies functionality of the - /// method. - /// - /// - [Test] - public void ValidateAllowsMultipleEventHubNamesIfEqual() - { - var eventHubName = "myHub"; - var fakeConnection = $"Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath={ eventHubName }"; - var properties = ConnectionStringParser.Parse(fakeConnection); - - Assert.That(() => properties.Validate(eventHubName, "dummy"), Throws.Nothing, "Validation should accept the same Event Hub in multiple places."); - } - - /// - /// Verifies functionality of the - /// method. - /// - /// - [Test] - [TestCase("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=[unique_fake];SharedAccessSignature=[not_real]")] - [TestCase("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;EntityPath=[unique_fake];SharedAccessSignature=[not_real]")] - [TestCase("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKey=[not_real];EntityPath=[unique_fake];SharedAccessSignature=[not_real]")] - public void ValidateDetectsMultipleAuthorizationCredentials(string connectionString) - { - var properties = ConnectionStringParser.Parse(connectionString); - Assert.That(() => properties.Validate(null, "Dummy"), Throws.ArgumentException.And.Message.StartsWith(Resources.OnlyOneSharedAccessAuthorizationMayBeSpecified)); - } - - /// - /// Verifies functionality of the - /// method. - /// - /// - [Test] - public void ValidateAllowsSharedAccessKeyAuthorization() - { - var eventHubName = "myHub"; - var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]"; - var properties = ConnectionStringParser.Parse(fakeConnection); - - Assert.That(() => properties.Validate(eventHubName, "dummy"), Throws.Nothing, "Validation should accept the shared access key authorization."); - } - - /// - /// Verifies functionality of the - /// method. - /// - /// - [Test] - public void ValidateAllowsSharedAccessSignatureAuthorization() - { - var eventHubName = "myHub"; - var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessSignature=[not_real]"; - var properties = ConnectionStringParser.Parse(fakeConnection); - - Assert.That(() => properties.Validate(eventHubName, "dummy"), Throws.Nothing, "Validation should accept the shared access signature authorization."); - } - } -} diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/api/Azure.Messaging.EventHubs.netstandard2.0.cs b/sdk/eventhub/Azure.Messaging.EventHubs/api/Azure.Messaging.EventHubs.netstandard2.0.cs index 8e469627fbfa..34074c03f942 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/api/Azure.Messaging.EventHubs.netstandard2.0.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/api/Azure.Messaging.EventHubs.netstandard2.0.cs @@ -34,6 +34,7 @@ public EventHubConnection(string connectionString, Azure.Messaging.EventHubs.Eve public EventHubConnection(string connectionString, string eventHubName) { } public EventHubConnection(string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.EventHubConnectionOptions connectionOptions = null) { } public EventHubConnection(string connectionString, string eventHubName, Azure.Messaging.EventHubs.EventHubConnectionOptions connectionOptions) { } + public EventHubConnection(string fullyQualifiedNamespace, string eventHubName, Azure.Messaging.EventHubs.EventHubsSharedAccessKeyCredential credential, Azure.Messaging.EventHubs.EventHubConnectionOptions connectionOptions = null) { } public string EventHubName { get { throw null; } } public string FullyQualifiedNamespace { get { throw null; } } public bool IsClosed { get { throw null; } } @@ -64,6 +65,29 @@ protected internal EventHubProperties(string name, System.DateTimeOffset created public System.DateTimeOffset CreatedOn { get { throw null; } } public string Name { get { throw null; } } public string[] PartitionIds { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() { throw null; } + } + public partial class EventHubsConnectionStringProperties + { + public EventHubsConnectionStringProperties() { } + public System.Uri Endpoint { get { throw null; } } + public string EventHubName { get { throw null; } } + public string FullyQualifiedNamespace { get { throw null; } } + public string SharedAccessKey { get { throw null; } } + public string SharedAccessKeyName { get { throw null; } } + public string SharedAccessSignature { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static Azure.Messaging.EventHubs.EventHubsConnectionStringProperties Parse(string connectionString) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() { throw null; } } public partial class EventHubsException : System.Exception { @@ -121,6 +145,22 @@ protected EventHubsRetryPolicy() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override string ToString() { throw null; } } + public sealed partial class EventHubsSharedAccessKeyCredential + { + public EventHubsSharedAccessKeyCredential(string sharedAccessSignature) { } + public EventHubsSharedAccessKeyCredential(string sharedAccessKeyName, string sharedAccessKey) { } + public string SharedAccessKey { get { throw null; } } + public string SharedAccessKeyName { get { throw null; } } + public string SharedAccessSignature { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() { throw null; } + public void UpdateSharedAccessKey(string keyName, string keyValue) { } + public void UpdateSharedAccessSignature(string sharedAccessSignature) { } + } public enum EventHubsTransportType { AmqpTcp = 0, @@ -136,6 +176,12 @@ protected internal PartitionProperties(string eventHubName, string partitionId, public long LastEnqueuedOffset { get { throw null; } } public long LastEnqueuedSequenceNumber { get { throw null; } } public System.DateTimeOffset LastEnqueuedTime { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override string ToString() { throw null; } } } namespace Azure.Messaging.EventHubs.Consumer @@ -150,6 +196,7 @@ public EventHubConsumerClient(string consumerGroup, string connectionString, Azu public EventHubConsumerClient(string consumerGroup, string connectionString, string eventHubName) { } public EventHubConsumerClient(string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions = null) { } public EventHubConsumerClient(string consumerGroup, string connectionString, string eventHubName, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions) { } + public EventHubConsumerClient(string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Messaging.EventHubs.EventHubsSharedAccessKeyCredential credential, Azure.Messaging.EventHubs.Consumer.EventHubConsumerClientOptions clientOptions = null) { } public string ConsumerGroup { get { throw null; } } public string EventHubName { get { throw null; } } public string FullyQualifiedNamespace { get { throw null; } } @@ -306,6 +353,7 @@ public EventProcessorPartitionOwnership() { } protected EventProcessor() { } protected EventProcessor(int eventBatchMaximumCount, string consumerGroup, string connectionString, Azure.Messaging.EventHubs.Primitives.EventProcessorOptions options = null) { } protected EventProcessor(int eventBatchMaximumCount, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.Primitives.EventProcessorOptions options = null) { } + protected EventProcessor(int eventBatchMaximumCount, string consumerGroup, string fullyQualifiedNamespace, string eventHubName, Azure.Messaging.EventHubs.EventHubsSharedAccessKeyCredential credential, Azure.Messaging.EventHubs.Primitives.EventProcessorOptions options = null) { } protected EventProcessor(int eventBatchMaximumCount, string consumerGroup, string connectionString, string eventHubName, Azure.Messaging.EventHubs.Primitives.EventProcessorOptions options = null) { } public string ConsumerGroup { get { throw null; } } public string EventHubName { get { throw null; } } @@ -339,6 +387,7 @@ protected PartitionReceiver() { } public PartitionReceiver(string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, Azure.Messaging.EventHubs.EventHubConnection connection, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = null) { } public PartitionReceiver(string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string connectionString, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = null) { } public PartitionReceiver(string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = null) { } + public PartitionReceiver(string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string fullyQualifiedNamespace, string eventHubName, Azure.Messaging.EventHubs.EventHubsSharedAccessKeyCredential credential, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = null) { } public PartitionReceiver(string consumerGroup, string partitionId, Azure.Messaging.EventHubs.Consumer.EventPosition eventPosition, string connectionString, string eventHubName, Azure.Messaging.EventHubs.Primitives.PartitionReceiverOptions options = null) { } public string ConsumerGroup { get { throw null; } } public string EventHubName { get { throw null; } } @@ -458,6 +507,7 @@ public EventHubProducerClient(string connectionString) { } public EventHubProducerClient(string connectionString, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions clientOptions) { } public EventHubProducerClient(string connectionString, string eventHubName) { } public EventHubProducerClient(string fullyQualifiedNamespace, string eventHubName, Azure.Core.TokenCredential credential, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions clientOptions = null) { } + public EventHubProducerClient(string fullyQualifiedNamespace, string eventHubName, Azure.Messaging.EventHubs.EventHubsSharedAccessKeyCredential credential, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions clientOptions = null) { } public EventHubProducerClient(string connectionString, string eventHubName, Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions clientOptions) { } public string EventHubName { get { throw null; } } public string FullyQualifiedNamespace { get { throw null; } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs new file mode 100644 index 000000000000..3964ef651302 --- /dev/null +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Authorization/EventHubsSharedAccessKeyCredential.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; +using Azure.Core; +using Azure.Messaging.EventHubs.Authorization; + +namespace Azure.Messaging.EventHubs +{ + /// + /// Provides a credential based on a shared access signature for a given + /// Event Hub instance. + /// + /// + public sealed class EventHubsSharedAccessKeyCredential + { + /// + /// The name of the shared access key to be used for authorization, as + /// reported by the Azure portal. + /// + /// + /// + /// This will only be populated when the credential is created using a shared key, not when created + /// using a precomputed shared access signature. + /// + /// + public string SharedAccessKeyName { get; private set; } + + /// + /// The value of the shared access key to be used for authorization, as + /// reported by the Azure portal. + /// + /// + /// + /// This will only be populated when the credential is created using a shared key, not when created + /// using a precomputed shared access signature. + /// + /// + public string SharedAccessKey { get; private set; } + + /// + /// The value of the precomputed shared access signature to be used for authorization. + /// + /// + /// + /// This will only be populated when the credential is created using a precomputed shared access signature, not when created + /// using a shared key. + /// + /// + public string SharedAccessSignature { get; private set; } + + /// + /// A reference to a corresponding SharedAccessSignatureCredential. + /// + /// + private SharedAccessSignatureCredential SharedAccessSignatureCredential { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the shared access key to be used for authorization, as reported by the Azure portal. + /// The value of the shared access key to be used for authorization, as reported by the Azure portal. + /// + public EventHubsSharedAccessKeyCredential(string sharedAccessKeyName, + string sharedAccessKey) + { + Argument.AssertNotNullOrEmpty(sharedAccessKeyName, nameof(sharedAccessKeyName)); + Argument.AssertNotNullOrEmpty(sharedAccessKey, nameof(sharedAccessKey)); + + SharedAccessKeyName = sharedAccessKeyName; + SharedAccessKey = sharedAccessKey; + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The shared access signature that forms the basis of this security token. + /// + public EventHubsSharedAccessKeyCredential(string sharedAccessSignature) + { + Argument.AssertNotNullOrEmpty(sharedAccessSignature, nameof(sharedAccessSignature)); + SharedAccessSignature = sharedAccessSignature; + } + + /// + /// Allows the rotation of Shared Access Signatures. + /// + /// + /// The name of the shared access key that the signature should be based on. + /// The value of the shared access key for the signature. + /// + public void UpdateSharedAccessKey(string keyName, + string keyValue) + { + Argument.AssertNotNullOrEmpty(keyName, nameof(keyName)); + Argument.AssertNotNullOrEmpty(keyValue, nameof(keyValue)); + + SharedAccessKeyName = keyName; + SharedAccessKey = keyValue; + SharedAccessSignature = null; + + SharedAccessSignatureCredential?.UpdateSharedAccessKey(keyName, keyValue); + } + + /// + /// Allows the rotation of Shared Access Signatures. + /// + /// + /// The shared access signature that forms the basis of this security token. + /// + public void UpdateSharedAccessSignature(string sharedAccessSignature) + { + Argument.AssertNotNullOrEmpty(sharedAccessSignature, nameof(sharedAccessSignature)); + + SharedAccessSignature = sharedAccessSignature; + SharedAccessKeyName = null; + SharedAccessKey = null; + + SharedAccessSignatureCredential?.UpdateSharedAccessSignature(sharedAccessSignature); + } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + /// + /// Converts the instance to string representation. + /// + /// + /// A that represents this instance. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); + + /// + /// Coverts to shared access signature credential. + /// It retains a reference to the generated SharedAccessSignatureCredential. + /// + /// + /// The Event Hubs resource to which the token is intended to serve as authorization. + /// The duration that the signature should be considered valid; if not specified, a default will be assumed. + /// + /// A new based on the requested shared access key. + /// + internal SharedAccessSignatureCredential AsSharedAccessSignatureCredential(string eventHubResource, + TimeSpan? signatureValidityDuration = default) + { + + SharedAccessSignatureCredential = string.IsNullOrEmpty(SharedAccessSignature) + ? new SharedAccessSignatureCredential(new SharedAccessSignature(eventHubResource, SharedAccessKeyName, SharedAccessKey, signatureValidityDuration)) + : new SharedAccessSignatureCredential(new SharedAccessSignature(SharedAccessSignature)); + + return SharedAccessSignatureCredential; + } + } +} diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs index fbf8e0808ea5..48a6f3e8fc5e 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs @@ -215,6 +215,35 @@ public EventHubConsumerClient(string consumerGroup, RetryPolicy = clientOptions.RetryOptions.ToRetryPolicy(); } + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the consumer group this consumer is associated with. Events are read in the context of this group. + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the consumer with. + /// The Event Hubs shared access key credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration. + /// A set of options to apply when configuring the consumer. + /// + public EventHubConsumerClient(string consumerGroup, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubConsumerClientOptions clientOptions = default) + { + Argument.AssertNotNullOrEmpty(consumerGroup, nameof(consumerGroup)); + Argument.AssertWellFormedEventHubsNamespace(fullyQualifiedNamespace, nameof(fullyQualifiedNamespace)); + Argument.AssertNotNullOrEmpty(eventHubName, nameof(eventHubName)); + Argument.AssertNotNull(credential, nameof(credential)); + + clientOptions = clientOptions?.Clone() ?? new EventHubConsumerClientOptions(); + + OwnsConnection = true; + Connection = new EventHubConnection(fullyQualifiedNamespace, eventHubName, credential, clientOptions.ConnectionOptions); + ConsumerGroup = consumerGroup; + RetryPolicy = clientOptions.RetryOptions.ToRetryPolicy(); + } + /// /// Initializes a new instance of the class. /// @@ -258,6 +287,7 @@ public EventHubConsumerClient(string consumerGroup, { Argument.AssertNotNullOrEmpty(consumerGroup, nameof(consumerGroup)); Argument.AssertNotNull(connection, nameof(connection)); + clientOptions = clientOptions?.Clone() ?? new EventHubConsumerClientOptions(); OwnsConnection = false; diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs index 4c1ae8d7aded..32d3490e9184 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs @@ -27,6 +27,13 @@ namespace Azure.Messaging.EventHubs /// public class EventHubConnection : IAsyncDisposable { + /// + /// The default transport type to assume when forming credentials, when no + /// transport type was specified. + /// + /// + private static EventHubsTransportType DefaultCredentialTransportType { get; } = new EventHubConnectionOptions().TransportType; + /// /// The fully qualified Event Hubs namespace that the connection is associated with. This is likely /// to be similar to {yournamespace}.servicebus.windows.net. @@ -150,10 +157,10 @@ public EventHubConnection(string connectionString, connectionOptions = connectionOptions?.Clone() ?? new EventHubConnectionOptions(); ValidateConnectionOptions(connectionOptions); - var connectionStringProperties = ConnectionStringParser.Parse(connectionString); + var connectionStringProperties = EventHubsConnectionStringProperties.Parse(connectionString); connectionStringProperties.Validate(eventHubName, nameof(connectionString)); - var fullyQualifiedNamespace = connectionStringProperties.Endpoint.Host; + var fullyQualifiedNamespace = connectionStringProperties.FullyQualifiedNamespace; if (string.IsNullOrEmpty(eventHubName)) { @@ -186,6 +193,25 @@ public EventHubConnection(string connectionString, #pragma warning restore CA2214 // Do not call overridable methods in constructors. } + /// + /// Initializes a new instance of the class. + /// + /// + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the connection with. + /// The to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration. + /// A set of options to apply when configuring the connection. + /// + public EventHubConnection(string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubConnectionOptions connectionOptions = default) : this(fullyQualifiedNamespace, + eventHubName, + TranslateSharedKeyCredential(credential, fullyQualifiedNamespace, eventHubName, connectionOptions?.TransportType), + connectionOptions) + { + } + /// /// Initializes a new instance of the class. /// @@ -207,16 +233,6 @@ public EventHubConnection(string fullyQualifiedNamespace, connectionOptions = connectionOptions?.Clone() ?? new EventHubConnectionOptions(); ValidateConnectionOptions(connectionOptions); - switch (credential) - { - case SharedAccessSignatureCredential _: - break; - - case EventHubSharedKeyCredential sharedKeyCredential: - credential = sharedKeyCredential.AsSharedAccessSignatureCredential(BuildConnectionAudience(connectionOptions.TransportType, fullyQualifiedNamespace, eventHubName)); - break; - } - var tokenCredential = new EventHubTokenCredential(credential, BuildConnectionAudience(connectionOptions.TransportType, fullyQualifiedNamespace, eventHubName)); FullyQualifiedNamespace = fullyQualifiedNamespace; @@ -484,6 +500,30 @@ internal static string BuildConnectionAudience(EventHubsTransportType transportT return builder.Uri.AbsoluteUri.ToLowerInvariant(); } + /// + /// Translates an into the equivalent shared access signature credential. + /// + /// + /// The credential to translate. + /// The fully qualified Event Hubs namespace being connected to. + /// The name of the Event Hub being connected to. + /// The type of transport being used for the connection. + /// + /// The which the was translated into. + /// + internal static SharedAccessSignatureCredential TranslateSharedKeyCredential(EventHubsSharedAccessKeyCredential credential, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsTransportType? transportType) + { + if ((credential == null) || (string.IsNullOrEmpty(fullyQualifiedNamespace)) || (string.IsNullOrEmpty(eventHubName))) + { + return null; + } + + return credential.AsSharedAccessSignatureCredential(BuildConnectionAudience(transportType ?? DefaultCredentialTransportType, fullyQualifiedNamespace, eventHubName)); + } + /// /// Performs the actions needed to validate the associated /// with this client. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubProperties.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubProperties.cs old mode 100755 new mode 100644 index edecca1d3525..14a132c29a27 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubProperties.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubProperties.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.ComponentModel; namespace Azure.Messaging.EventHubs { @@ -46,5 +47,34 @@ protected internal EventHubProperties(string name, CreatedOn = createdOn; PartitionIds = partitionIds; } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + /// + /// Converts the instance to string representation. + /// + /// + /// A that represents this instance. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubsConnectionStringProperties.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubsConnectionStringProperties.cs new file mode 100644 index 000000000000..1eff269ab057 --- /dev/null +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubsConnectionStringProperties.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; +using System.Text; +using Azure.Core; + +namespace Azure.Messaging.EventHubs +{ + /// + /// The set of properties that comprise an Event Hubs connection string. + /// + /// + public class EventHubsConnectionStringProperties + { + /// The token that identifies the endpoint address for the Event Hubs namespace. + private const string EndpointToken = "Endpoint"; + + /// The token that identifies the name of a specific Event Hub under the namespace. + private const string EventHubNameToken = "EntityPath"; + + /// The token that identifies the name of a shared access key. + private const string SharedAccessKeyNameToken = "SharedAccessKeyName"; + + /// The token that identifies the value of a shared access key. + private const string SharedAccessKeyValueToken = "SharedAccessKey"; + + /// The token that identifies the value of a shared access signature. + private const string SharedAccessSignatureToken = "SharedAccessSignature"; + + /// The character used to separate a token and its value in the connection string. + private const char TokenValueSeparator = '='; + + /// The character used to mark the beginning of a new token/value pair in the connection string. + private const char TokenValuePairDelimiter = ';'; + + /// The name of the protocol used by an Event Hubs endpoint. + private const string EventHubsEndpointSchemeName = "sb"; + + /// The formatted protocol used by an Event Hubs endpoint. + private static readonly string EventHubsEndpointScheme = $"{ EventHubsEndpointSchemeName }{ Uri.SchemeDelimiter }"; + + /// + /// The fully qualified Event Hubs namespace that the consumer is associated with. This is likely + /// to be similar to {yournamespace}.servicebus.windows.net. + /// + /// + /// The namespace of the Event Hub, as derived from the endpoint address of the connection string. + /// + public string FullyQualifiedNamespace => Endpoint?.Host; + + /// + /// The endpoint to be used for connecting to the Event Hubs namespace. + /// + /// + /// The endpoint address, including protocol, from the connection string. + /// + public Uri Endpoint { get; internal set; } + + /// + /// The name of the specific Event Hub instance under the associated Event Hubs namespace. + /// + /// + public string EventHubName { get; internal set; } + + /// + /// The name of the shared access key, either for the Event Hubs namespace + /// or the Event Hub. + /// + /// + public string SharedAccessKeyName { get; internal set; } + + /// + /// The value of the shared access key, either for the Event Hubs namespace + /// or the Event Hub. + /// + /// + public string SharedAccessKey { get; internal set; } + + /// + /// The value of the fully-formed shared access signature, either for the Event Hubs + /// namespace or the Event Hub. + /// + /// + public string SharedAccessSignature { get; internal set; } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + /// + /// Converts the instance to string representation. + /// + /// + /// A that represents this instance. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); + + /// + /// Creates an Event Hubs connection string based on this set of . + /// + /// + /// + /// A valid Event Hubs connection string; depending on the specified property information, this may + /// represent the namespace-level or Event Hub-level. + /// + /// + /// + internal string ToConnectionString() + { + Validate(null, null); + + var endpointBuilder = new UriBuilder(Endpoint) + { + Scheme = EventHubsEndpointScheme, + Port = -1 + }; + + if ((string.Compare(endpointBuilder.Scheme, EventHubsEndpointSchemeName, StringComparison.OrdinalIgnoreCase) != 0) + || (Uri.CheckHostName(endpointBuilder.Host) == UriHostNameType.Unknown)) + { + throw new ArgumentException(Resources.InvalidEndpointAddress); + } + + var builder = new StringBuilder() + .Append(EndpointToken) + .Append(TokenValueSeparator) + .Append(endpointBuilder.Uri.AbsoluteUri) + .Append(TokenValuePairDelimiter); + + if (!string.IsNullOrEmpty(EventHubName)) + { + builder + .Append(EventHubNameToken) + .Append(TokenValueSeparator) + .Append(EventHubName) + .Append(TokenValuePairDelimiter); + } + + if (!string.IsNullOrEmpty(SharedAccessSignature)) + { + builder + .Append(SharedAccessSignatureToken) + .Append(TokenValueSeparator) + .Append(SharedAccessSignature) + .Append(TokenValuePairDelimiter); + } + else + { + builder + .Append(SharedAccessKeyNameToken) + .Append(TokenValueSeparator) + .Append(SharedAccessKeyName) + .Append(TokenValuePairDelimiter) + .Append(SharedAccessKeyValueToken) + .Append(TokenValueSeparator) + .Append(SharedAccessKey) + .Append(TokenValuePairDelimiter); + } + + return builder.ToString(); + } + + /// + /// Performs the actions needed to validate the set of connection string properties for connecting to the + /// Event Hubs service. + /// + /// + /// The name of the Event Hub that was explicitly passed independent of the connection string, allowing easier use of a namespace-level connection string. + /// The name of the argument associated with the connection string; to be used when raising variants. + /// + /// In the case that the properties violate an invariant or otherwise represent a combination that is not permissible, an appropriate exception will be thrown. + /// + internal void Validate(string explicitEventHubName, + string connectionStringArgumentName) + { + // The Event Hub name may only be specified in one of the possible forms, either as part of the + // connection string or as a stand-alone parameter, but not both. If specified in both to the same + // value, then do not consider this a failure. + + if ((!string.IsNullOrEmpty(explicitEventHubName)) + && (!string.IsNullOrEmpty(EventHubName)) + && (!string.Equals(explicitEventHubName, EventHubName, StringComparison.InvariantCultureIgnoreCase))) + { + throw new ArgumentException(Resources.OnlyOneEventHubNameMayBeSpecified, connectionStringArgumentName); + } + + // The connection string may contain a precomputed shared access signature OR a shared key name and value, + // but not both. + + if ((!string.IsNullOrEmpty(SharedAccessSignature)) + && ((!string.IsNullOrEmpty(SharedAccessKeyName)) || (!string.IsNullOrEmpty(SharedAccessKey)))) + { + throw new ArgumentException(Resources.OnlyOneSharedAccessAuthorizationMayBeSpecified, connectionStringArgumentName); + } + + // Ensure that each of the needed components are present for connecting. + + var hasSharedKey = ((!string.IsNullOrEmpty(SharedAccessKeyName)) && (!string.IsNullOrEmpty(SharedAccessKey))); + var hasSharedSignature = (!string.IsNullOrEmpty(SharedAccessSignature)); + + if (string.IsNullOrEmpty(Endpoint?.Host) + || ((string.IsNullOrEmpty(explicitEventHubName)) && (string.IsNullOrEmpty(EventHubName))) + || ((!hasSharedKey) && (!hasSharedSignature))) + { + throw new ArgumentException(Resources.MissingConnectionInformation, connectionStringArgumentName); + } + } + + /// + /// Parses the specified Event Hubs connection string into its component properties. + /// + /// + /// The connection string to parse. + /// + /// The component properties parsed from the connection string. + /// + /// The specified connection string was malformed and could not be parsed. + /// + public static EventHubsConnectionStringProperties Parse(string connectionString) + { + Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString)); + + var parsedValues = new EventHubsConnectionStringProperties(); + var tokenPositionModifier = (connectionString[0] == TokenValuePairDelimiter) ? 0 : 1; + var lastPosition = 0; + var currentPosition = 0; + + int valueStart; + string slice; + string token; + string value; + + while (currentPosition != -1) + { + // Slice the string into the next token/value pair. + + currentPosition = connectionString.IndexOf(TokenValuePairDelimiter, lastPosition + 1); + + if (currentPosition >= 0) + { + slice = connectionString.Substring(lastPosition, (currentPosition - lastPosition)); + } + else + { + slice = connectionString.Substring(lastPosition); + } + + // Break the token and value apart, if this is a legal pair. + + valueStart = slice.IndexOf(TokenValueSeparator); + + if (valueStart >= 0) + { + token = slice.Substring((1 - tokenPositionModifier), (valueStart - 1 + tokenPositionModifier)); + value = slice.Substring(valueStart + 1); + + // Guard against leading and trailing spaces, only trimming if there is a need. + + if ((!string.IsNullOrEmpty(token)) && (char.IsWhiteSpace(token[0])) || char.IsWhiteSpace(token[token.Length - 1])) + { + token = token.Trim(); + } + + if ((!string.IsNullOrEmpty(value)) && (char.IsWhiteSpace(value[0]) || char.IsWhiteSpace(value[value.Length - 1]))) + { + value = value.Trim(); + } + + // If there was no value for a key, then consider the connection string to + // be malformed. + + if (string.IsNullOrEmpty(value)) + { + throw new FormatException(Resources.InvalidConnectionString); + } + + // Compare the token against the known connection string properties and capture the + // pair if they are a known attribute. + + if (string.Compare(EndpointToken, token, StringComparison.OrdinalIgnoreCase) == 0) + { + var endpointBuilder = new UriBuilder(value) + { + Scheme = EventHubsEndpointScheme, + Port = -1 + }; + + if ((string.Compare(endpointBuilder.Scheme, EventHubsEndpointSchemeName, StringComparison.OrdinalIgnoreCase) != 0) + || (Uri.CheckHostName(endpointBuilder.Host) == UriHostNameType.Unknown)) + { + throw new FormatException(Resources.InvalidConnectionString); + } + + parsedValues.Endpoint = endpointBuilder.Uri; + } + else if (string.Compare(EventHubNameToken, token, StringComparison.OrdinalIgnoreCase) == 0) + { + parsedValues.EventHubName = value; + } + else if (string.Compare(SharedAccessKeyNameToken, token, StringComparison.OrdinalIgnoreCase) == 0) + { + parsedValues.SharedAccessKeyName = value; + } + else if (string.Compare(SharedAccessKeyValueToken, token, StringComparison.OrdinalIgnoreCase) == 0) + { + parsedValues.SharedAccessKey = value; + } + else if (string.Compare(SharedAccessSignatureToken, token, StringComparison.OrdinalIgnoreCase) == 0) + { + parsedValues.SharedAccessSignature = value; + } + } + else if ((slice.Length != 1) || (slice[0] != TokenValuePairDelimiter)) + { + // This wasn't a legal pair and it is not simply a trailing delimiter; consider + // the connection string to be malformed. + + throw new FormatException(Resources.InvalidConnectionString); + } + + tokenPositionModifier = 0; + lastPosition = currentPosition; + } + + return parsedValues; + } + } +} diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/PartitionProperties.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/PartitionProperties.cs old mode 100755 new mode 100644 index f0070e76140f..122cd4d023dd --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/PartitionProperties.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/PartitionProperties.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.ComponentModel; namespace Azure.Messaging.EventHubs { @@ -84,5 +85,34 @@ protected internal PartitionProperties(string eventHubName, LastEnqueuedTime = lastEnqueuedTime; IsEmpty = isEmpty; } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + /// + /// Converts the instance to string representation. + /// + /// + /// A that represents this instance. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor{TPartition}.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor{TPartition}.cs index ed7e82b0456f..0512721dcfb9 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor{TPartition}.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor{TPartition}.cs @@ -243,10 +243,7 @@ internal EventProcessor(int eventBatchMaximumCount, RetryPolicy = options.RetryOptions.ToRetryPolicy(); Options = options; EventBatchMaximumCount = eventBatchMaximumCount; - -#pragma warning disable CA2214 // Do not call overridable methods in constructors. The virtual methods are internal and used for testing. - LoadBalancer = loadBalancer ?? CreatePartitionLoadBalancer(CreateStorageManager(this), Identifier, ConsumerGroup, FullyQualifiedNamespace, EventHubName, options.PartitionOwnershipExpirationInterval, options.LoadBalancingUpdateInterval); -#pragma warning restore CA2214 // Do not call overridable methods in constructors. + LoadBalancer = loadBalancer ?? new PartitionLoadBalancer(CreateStorageManager(this), Identifier, ConsumerGroup, FullyQualifiedNamespace, EventHubName, options.PartitionOwnershipExpirationInterval, options.LoadBalancingUpdateInterval); } /// @@ -306,7 +303,7 @@ protected EventProcessor(int eventBatchMaximumCount, options = options?.Clone() ?? new EventProcessorOptions(); - var connectionStringProperties = ConnectionStringParser.Parse(connectionString); + var connectionStringProperties = EventHubsConnectionStringProperties.Parse(connectionString); connectionStringProperties.Validate(eventHubName, nameof(connectionString)); ConnectionFactory = () => new EventHubConnection(connectionString, eventHubName, options.ConnectionOptions); @@ -317,10 +314,44 @@ protected EventProcessor(int eventBatchMaximumCount, RetryPolicy = options.RetryOptions.ToRetryPolicy(); Options = options; EventBatchMaximumCount = eventBatchMaximumCount; + LoadBalancer = new PartitionLoadBalancer(CreateStorageManager(this), Identifier, ConsumerGroup, FullyQualifiedNamespace, EventHubName, options.PartitionOwnershipExpirationInterval, options.LoadBalancingUpdateInterval); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The desired number of events to include in a batch to be processed. This size is the maximum count in a batch; the actual count may be smaller, depending on whether events are available in the Event Hub. + /// The name of the consumer group the processor is associated with. Events are read in the context of this group. + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the processor with. + /// The Event Hubs shared access key credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration. + /// The set of options to use for the processor. + /// + protected EventProcessor(int eventBatchMaximumCount, + string consumerGroup, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventProcessorOptions options = default) + { + Argument.AssertInRange(eventBatchMaximumCount, 1, int.MaxValue, nameof(eventBatchMaximumCount)); + Argument.AssertNotNullOrEmpty(consumerGroup, nameof(consumerGroup)); + Argument.AssertWellFormedEventHubsNamespace(fullyQualifiedNamespace, nameof(fullyQualifiedNamespace)); + Argument.AssertNotNullOrEmpty(eventHubName, nameof(eventHubName)); + Argument.AssertNotNull(credential, nameof(credential)); -#pragma warning disable CA2214 // Do not call overridable methods in constructors. The virtual methods are internal and used for testing. - LoadBalancer = CreatePartitionLoadBalancer(CreateStorageManager(this), Identifier, ConsumerGroup, FullyQualifiedNamespace, EventHubName, options.PartitionOwnershipExpirationInterval, options.LoadBalancingUpdateInterval); -#pragma warning restore CA2214 // Do not call overridable methods in constructors + options = options?.Clone() ?? new EventProcessorOptions(); + + ConnectionFactory = () => new EventHubConnection(fullyQualifiedNamespace, eventHubName, credential, options.ConnectionOptions); + FullyQualifiedNamespace = fullyQualifiedNamespace; + EventHubName = eventHubName; + ConsumerGroup = consumerGroup; + Identifier = string.IsNullOrEmpty(options.Identifier) ? Guid.NewGuid().ToString() : options.Identifier; + RetryPolicy = options.RetryOptions.ToRetryPolicy(); + Options = options; + EventBatchMaximumCount = eventBatchMaximumCount; + LoadBalancer = new PartitionLoadBalancer(CreateStorageManager(this), Identifier, ConsumerGroup, FullyQualifiedNamespace, EventHubName, options.PartitionOwnershipExpirationInterval, options.LoadBalancingUpdateInterval); } /// @@ -455,37 +486,6 @@ internal virtual TransportConsumer CreateConsumer(string consumerGroup, EventProcessorOptions options) => connection.CreateTransportConsumer(consumerGroup, partitionId, eventPosition, options.RetryOptions.ToRetryPolicy(), options.TrackLastEnqueuedEventProperties, prefetchCount: (uint?)options.PrefetchCount, prefetchSizeInBytes: options.PrefetchSizeInBytes, ownerLevel: 0); - /// - /// Creates a to use for interacting with durable storage. - /// - /// - /// The instance to associate with the storage manager. - /// - /// A with the requested configuration. - /// - internal virtual StorageManager CreateStorageManager(EventProcessor instance) => new DelegatingStorageManager(instance); - - /// - /// Creates a for managing partition ownership for the event processor. - /// - /// - /// Responsible for managing persistence of the partition ownership data. - /// The identifier of the event processor associated with the load balancer. - /// The name of the consumer group this load balancer is associated with. - /// The fully qualified Event Hubs namespace that the processor is associated with. - /// The name of the Event Hub that the processor is associated with. - /// The minimum amount of time for an ownership to be considered expired without further updates. - /// The minimum amount of time to be elapsed between two load balancing verifications. - /// - internal virtual PartitionLoadBalancer CreatePartitionLoadBalancer(StorageManager storageManager, - string identifier, - string consumerGroup, - string fullyQualifiedNamespace, - string eventHubName, - TimeSpan ownershipExpiration, - TimeSpan loadBalancingInterval) => - new PartitionLoadBalancer(storageManager, identifier, consumerGroup, fullyQualifiedNamespace, eventHubName, ownershipExpiration, loadBalancingInterval); - /// /// Performs the tasks needed to process a batch of events. /// @@ -1517,6 +1517,16 @@ private Task InvokeOnProcessingErrorAsync(Exception exception, string operationDescription, CancellationToken cancellationToken) => Task.Run(() => OnProcessingErrorAsync(exception, partition, operationDescription, cancellationToken)); + /// + /// Creates a to use for interacting with durable storage. + /// + /// + /// The instance to associate with the storage manager. + /// + /// A with the requested configuration. + /// + internal static StorageManager CreateStorageManager(EventProcessor instance) => new DelegatingStorageManager(instance); + /// /// A virtual instance that delegates calls to the /// to which it is associated. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/PartitionReceiver.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/PartitionReceiver.cs index 2053ba9fb9ba..fef7fac9cb18 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/PartitionReceiver.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/PartitionReceiver.cs @@ -202,6 +202,46 @@ public PartitionReceiver(string consumerGroup, } + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the consumer group this client is associated with. Events are read in the context of this group. + /// The identifier of the Event Hub partition from which events will be received. + /// The position within the partition where the client should begin reading events. + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the client with. + /// The Event Hubs shared key credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration. + /// A set of options to apply when configuring the client. + /// + public PartitionReceiver(string consumerGroup, + string partitionId, + EventPosition eventPosition, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + PartitionReceiverOptions options = default) + { + Argument.AssertNotNullOrEmpty(consumerGroup, nameof(consumerGroup)); + Argument.AssertNotNullOrEmpty(partitionId, nameof(partitionId)); + Argument.AssertWellFormedEventHubsNamespace(fullyQualifiedNamespace, nameof(fullyQualifiedNamespace)); + Argument.AssertNotNullOrEmpty(eventHubName, nameof(eventHubName)); + Argument.AssertNotNull(credential, nameof(credential)); + + options = options?.Clone() ?? new PartitionReceiverOptions(); + + Connection = new EventHubConnection(fullyQualifiedNamespace, eventHubName, credential, options.ConnectionOptions); + ConsumerGroup = consumerGroup; + PartitionId = partitionId; + InitialPosition = eventPosition; + DefaultMaximumWaitTime = options.DefaultMaximumReceiveWaitTime; + RetryPolicy = options.RetryOptions.ToRetryPolicy(); + +#pragma warning disable CA2214 // Do not call overridable methods in constructors. This internal method is virtual for testing purposes. + InnerConsumer = CreateTransportConsumer(consumerGroup, partitionId, eventPosition, RetryPolicy, options); +#pragma warning restore CA2214 // Do not call overridable methods in constructors. + } + /// /// Initializes a new instance of the class. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs index 5a84a3301b06..d8e94e812f88 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Producer/EventHubProducerClient.cs @@ -239,6 +239,44 @@ public EventHubProducerClient(string connectionString, } } + /// + /// Initializes a new instance of the class. + /// + /// + /// The fully qualified Event Hubs namespace to connect to. This is likely to be similar to {yournamespace}.servicebus.windows.net. + /// The name of the specific Event Hub to associate the producer with. + /// The Event Hubs shared access key credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration. + /// A set of options to apply when configuring the producer. + /// + public EventHubProducerClient(string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubProducerClientOptions clientOptions = default) + { + Argument.AssertWellFormedEventHubsNamespace(fullyQualifiedNamespace, nameof(fullyQualifiedNamespace)); + Argument.AssertNotNullOrEmpty(eventHubName, nameof(eventHubName)); + Argument.AssertNotNull(credential, nameof(credential)); + + clientOptions = clientOptions?.Clone() ?? new EventHubProducerClientOptions(); + + OwnsConnection = true; + Connection = new EventHubConnection(fullyQualifiedNamespace, eventHubName, credential, clientOptions.ConnectionOptions); + Options = clientOptions; + RetryPolicy = clientOptions.RetryOptions.ToRetryPolicy(); + + PartitionProducerPool = new TransportProducerPool(partitionId => + Connection.CreateTransportProducer( + partitionId, + clientOptions.CreateFeatureFlags(), + Options.GetPublishingOptionsOrDefaultForPartition(partitionId), + RetryPolicy)); + + if (RequiresStatefulPartitions(clientOptions)) + { + PartitionState = new ConcurrentDictionary(); + } + } + /// /// Initializes a new instance of the class. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubSharedKeyCredentialTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Authorization/EventHubsSharedAccessKeyCredentialTests.cs old mode 100755 new mode 100644 similarity index 58% rename from sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubSharedKeyCredentialTests.cs rename to sdk/eventhub/Azure.Messaging.EventHubs/tests/Authorization/EventHubsSharedAccessKeyCredentialTests.cs index 099cc4eddb84..5da17e8517e9 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Authorization/EventHubSharedKeyCredentialTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Authorization/EventHubsSharedAccessKeyCredentialTests.cs @@ -10,12 +10,12 @@ namespace Azure.Messaging.EventHubs.Tests { /// - /// The suite of tests for the + /// The suite of tests for the /// class. /// /// [TestFixture] - public class EventHubSharedKeyCredentialTests + public class EventHubsSharedAccessKeyCredentialTests { /// /// Verifies functionality of the constructor. @@ -26,7 +26,7 @@ public class EventHubSharedKeyCredentialTests [TestCase("")] public void ConstructorValidatesTheKeyName(string keyName) { - Assert.That(() => new EventHubSharedKeyCredential(keyName, "someKey"), Throws.InstanceOf()); + Assert.That(() => new EventHubsSharedAccessKeyCredential(keyName, "someKey"), Throws.InstanceOf()); } /// @@ -38,7 +38,7 @@ public void ConstructorValidatesTheKeyName(string keyName) [TestCase("")] public void ConstructorValidatesTheKeyValue(string keyValue) { - Assert.That(() => new EventHubSharedKeyCredential("someName", keyValue), Throws.InstanceOf()); + Assert.That(() => new EventHubsSharedAccessKeyCredential("someName", keyValue), Throws.InstanceOf()); } /// @@ -46,14 +46,27 @@ public void ConstructorValidatesTheKeyValue(string keyValue) /// /// [Test] - public void ConstructorValidatesInitializesProperties() + [TestCase(null)] + [TestCase("")] + public void ConstructorValidatesInitializesSharedAccessSignatureProperties(string signature) + { + Assert.That(() => new EventHubsSharedAccessKeyCredential(signature), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void ConstructorInitializesSharedKeyProperties() { var name = "KeyName"; var value = "KeyValue"; - var credential = new EventHubSharedKeyCredential(name, value); - var initializedValue = GetSharedAccessKey(credential); + var credential = new EventHubsSharedAccessKeyCredential(name, value); - Assert.That(initializedValue, Is.EqualTo(value), "The shared key should have been set."); + Assert.That(credential.SharedAccessKeyName, Is.EqualTo(name), "The shared key name should have been set."); + Assert.That(credential.SharedAccessKey, Is.EqualTo(value), "The shared key should have been set."); + Assert.That(credential.SharedAccessSignature, Is.Null, "The shared access signature should not have been set."); } /// @@ -61,9 +74,14 @@ public void ConstructorValidatesInitializesProperties() /// /// [Test] - public void GetTokenIsNotPermitted() + public void ConstructorInitializesSharedSignatureProperties() { - Assert.That(() => new EventHubSharedKeyCredential("key", "value").GetToken(new TokenRequestContext(new[] { "test" }), default), Throws.InvalidOperationException); + var signature = new SharedAccessSignature("RESOURCE", "keyname", "keyvalue").Value; + var credential = new EventHubsSharedAccessKeyCredential(signature); + + Assert.That(credential.SharedAccessSignature, Is.EqualTo(signature), "The shared access signature name should have been set."); + Assert.That(credential.SharedAccessKeyName, Is.Null, "The shared key name should have been set."); + Assert.That(credential.SharedAccessKey, Is.Null, "The shared access key should not have been set."); } /// @@ -71,9 +89,52 @@ public void GetTokenIsNotPermitted() /// /// [Test] - public void GetTokenAsyncIsNotPermitted() + public void AsSharedAccessSignatureCredentialProducesTheExpectedCredentialForSharedKeys() { - Assert.That(async () => await (new EventHubSharedKeyCredential("key", "value").GetTokenAsync(new TokenRequestContext(new[] { "thing" }), default)), Throws.InvalidOperationException); + var resource = "amqps://some.hub.com/path"; + var keyName = "sharedKey"; + var keyValue = "keyValue"; + var validSpan = TimeSpan.FromHours(4); + var signature = new SharedAccessSignature(resource, keyName, keyValue, validSpan); + var keyCredential = new EventHubsSharedAccessKeyCredential(keyName, keyValue); + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + + Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); + + var credentialSignature = GetSharedAccessSignature(sasCredential); + Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); + Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(signature.SharedAccessKeyName), "The shared access key name should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.EqualTo(signature.SharedAccessKey), "The shared access key should match."); + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + + /// + /// The signature expiration will always be extended after calling AsSharedAccessSignatureCredential. + /// + /// + [Test] + public void AsSharedAccessSignatureCredentialShouldRefreshTokenValidityForSharedKeys() + { + var beforeResource = "amqps://before/path"; + var afterResource = "amqps://after/path"; + var beforeSpan = TimeSpan.FromHours(4); + var afterSpan = TimeSpan.FromHours(8); + var keyName = "keyName"; + var keyValue = "keyValue"; + var expectedSignature = new SharedAccessSignature(beforeResource, keyName, keyValue, beforeSpan); + var keyCredential = new EventHubsSharedAccessKeyCredential(keyName, keyValue); + + SharedAccessSignatureCredential sasCredential = keyCredential.AsSharedAccessSignatureCredential(beforeResource, beforeSpan); + SharedAccessSignature beforeSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(beforeSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + + expectedSignature = new SharedAccessSignature(afterResource, keyName, keyValue, afterSpan); + sasCredential = keyCredential.AsSharedAccessSignatureCredential(afterResource, afterSpan); + SharedAccessSignature afterSignature = GetSharedAccessSignature(sasCredential); + + Assert.That(afterSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); } /// @@ -81,14 +142,14 @@ public void GetTokenAsyncIsNotPermitted() /// /// [Test] - public void AsSharedAccessSignatureCredentialProducesTheExpectedCredential() + public void AsSharedAccessSignatureCredentialProducesTheExpectedCredentialForSharedAccessSignatures() { var resource = "amqps://some.hub.com/path"; var keyName = "sharedKey"; var keyValue = "keyValue"; var validSpan = TimeSpan.FromHours(4); var signature = new SharedAccessSignature(resource, keyName, keyValue, validSpan); - var keyCredential = new EventHubSharedKeyCredential(keyName, keyValue); + var keyCredential = new EventHubsSharedAccessKeyCredential(signature.Value); var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); @@ -97,7 +158,7 @@ public void AsSharedAccessSignatureCredentialProducesTheExpectedCredential() Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(signature.SharedAccessKeyName), "The shared access key name should match."); - Assert.That(credentialSignature.SharedAccessKey, Is.EqualTo(signature.SharedAccessKey), "The shared access key should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.Null, "The shared access key should not be populated."); Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); } @@ -106,7 +167,7 @@ public void AsSharedAccessSignatureCredentialProducesTheExpectedCredential() /// /// [Test] - public void AsSharedAccessSignatureCredentialShouldRefreshTokenValidity() + public void AsSharedAccessSignatureCredentialShouldNotRefreshTokenValidityForSharedAccessSignatures() { var beforeResource = "amqps://before/path"; var afterResource = "amqps://after/path"; @@ -115,14 +176,13 @@ public void AsSharedAccessSignatureCredentialShouldRefreshTokenValidity() var keyName = "keyName"; var keyValue = "keyValue"; var expectedSignature = new SharedAccessSignature(beforeResource, keyName, keyValue, beforeSpan); - var keyCredential = new EventHubSharedKeyCredential(keyName, keyValue); + var keyCredential = new EventHubsSharedAccessKeyCredential(expectedSignature.Value); SharedAccessSignatureCredential sasCredential = keyCredential.AsSharedAccessSignatureCredential(beforeResource, beforeSpan); SharedAccessSignature beforeSignature = GetSharedAccessSignature(sasCredential); Assert.That(beforeSignature.SignatureExpiration, Is.EqualTo(expectedSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); - expectedSignature = new SharedAccessSignature(afterResource, keyName, keyValue, afterSpan); sasCredential = keyCredential.AsSharedAccessSignatureCredential(afterResource, afterSpan); SharedAccessSignature afterSignature = GetSharedAccessSignature(sasCredential); @@ -141,7 +201,7 @@ public void EventHubSharedKeyCredentialShouldHoldAReferenceToASharedAccessKey() var span = TimeSpan.FromHours(4); var keyName = "keyName"; var keyValue = "keyValue"; - var keyCredential = new EventHubSharedKeyCredential(keyName, keyValue); + var keyCredential = new EventHubsSharedAccessKeyCredential(keyName, keyValue); SharedAccessSignatureCredential sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, span); SharedAccessSignatureCredential wrappedCredential = GetSharedAccessSignatureCredential(keyCredential); @@ -154,7 +214,7 @@ public void EventHubSharedKeyCredentialShouldHoldAReferenceToASharedAccessKey() /// /// [Test] - public void UpdateSharedAccessKeyShouldAllowToRefreshASharedAccessSignature() + public void UpdateSharedAccessKeyShouldAllowRefreshOfTheSharedAccessSignature() { var resource = "amqps://before/path"; var beforeKeyName = "beforeKeyName"; @@ -163,7 +223,7 @@ public void UpdateSharedAccessKeyShouldAllowToRefreshASharedAccessSignature() var afterKeyValue = "afterKeyValue"; var validSpan = TimeSpan.FromHours(4); var signature = new SharedAccessSignature(resource, beforeKeyName, beforeKeyValue, validSpan); - var keyCredential = new EventHubSharedKeyCredential(beforeKeyName, beforeKeyValue); + var keyCredential = new EventHubsSharedAccessKeyCredential(beforeKeyName, beforeKeyValue); // Needed to instantiate a SharedAccessSignatureCredential var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); @@ -181,13 +241,44 @@ public void UpdateSharedAccessKeyShouldAllowToRefreshASharedAccessSignature() Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(signature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void UpdateSharedAccessSignatureShouldUpdateTheSharedAccessSignature() + { + var resource = "amqps://before/path"; + var beforeKeyName = "beforeKeyName"; + var afterKeyName = "afterKeyName"; + var beforeKeyValue = "beforeKeyValue"; + var afterKeyValue = "afterKeyValue"; + var validSpan = TimeSpan.FromHours(4); + var signature = new SharedAccessSignature(resource, beforeKeyName, beforeKeyValue, validSpan.Add(TimeSpan.FromHours(2))); + var keyCredential = new EventHubsSharedAccessKeyCredential(signature.Value); + var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); + + // Updates + var newSignature = new SharedAccessSignature(resource, afterKeyName, afterKeyValue, validSpan); + keyCredential.UpdateSharedAccessSignature(newSignature.Value); + + Assert.That(sasCredential, Is.Not.Null, "A shared access signature credential should have been created."); + + var credentialSignature = GetSharedAccessSignature(sasCredential); + Assert.That(credentialSignature, Is.Not.Null, "The SAS credential should contain a shared access signature."); + Assert.That(credentialSignature.Resource, Is.EqualTo(signature.Resource), "The resource should match."); + Assert.That(credentialSignature.SharedAccessKeyName, Is.EqualTo(afterKeyName), "The shared access key name should match."); + Assert.That(credentialSignature.SharedAccessKey, Is.Null, "The shared access key should not have been set."); + Assert.That(credentialSignature.SignatureExpiration, Is.EqualTo(newSignature.SignatureExpiration).Within(TimeSpan.FromSeconds(5)), "The expiration should match."); + } + /// /// A call to UpdateSharedAccessKey should change properties of the SharedAccessSignature /// that it wraps like the SharedAccessKeyName or the SharedAccessKey. /// /// [Test] - public void UpdateSharedAccessKeyShouldAlwaysRefreshEventHubSharedKeyCredentialNameAndKey() + public void UpdateSharedAccessKeyShoulRefreshEventHubSharedKeyCredentialNameAndKey() { var resource = "amqps://before/path"; var validSpan = TimeSpan.FromHours(4); @@ -195,14 +286,13 @@ public void UpdateSharedAccessKeyShouldAlwaysRefreshEventHubSharedKeyCredentialN var afterKeyName = "afterKeyName"; var beforeKeyValue = "beforeKeyValue"; var afterKeyValue = "afterKeyValue"; - var keyCredential = new EventHubSharedKeyCredential(beforeKeyName, beforeKeyValue); + var keyCredential = new EventHubsSharedAccessKeyCredential(beforeKeyName, beforeKeyValue); keyCredential.UpdateSharedAccessKey(afterKeyName, afterKeyValue); - string keyName = GetSharedAccessKeyName(keyCredential); - string key = GetSharedAccessKey(keyCredential); + var keyName = keyCredential.SharedAccessKeyName; + var key = keyCredential.SharedAccessKey; - // Needed to instantiate a SharedAccessSignatureCredential var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); var credentialSignature = GetSharedAccessSignature(sasCredential); @@ -218,7 +308,7 @@ public void UpdateSharedAccessKeyShouldAlwaysRefreshEventHubSharedKeyCredentialN /// /// [Test] - public void UpdateSharedAccessKeyShouldNotChangeOtherPropertiesOfASharedAccessSignature() + public void UpdateSharedAccessKeyShouldNotChangeOtherPropertiesForTheSharedAccessSignature() { var resource = "amqps://before/path"; var validSpan = TimeSpan.FromHours(4); @@ -226,7 +316,7 @@ public void UpdateSharedAccessKeyShouldNotChangeOtherPropertiesOfASharedAccessSi var afterKeyName = "afterKeyName"; var beforeKeyValue = "beforeKeyValue"; var afterKeyValue = "afterKeyValue"; - var keyCredential = new EventHubSharedKeyCredential(beforeKeyName, beforeKeyValue); + var keyCredential = new EventHubsSharedAccessKeyCredential(beforeKeyName, beforeKeyValue); // Needed to instantiate a SharedAccessTokenCredential var sasCredential = keyCredential.AsSharedAccessSignatureCredential(resource, validSpan); @@ -240,34 +330,6 @@ public void UpdateSharedAccessKeyShouldNotChangeOtherPropertiesOfASharedAccessSi Assert.That(credentialSignature.Resource, Is.EqualTo(resource), "The resource of a signature should not change when the credentials are rolled."); } - /// - /// Retrieves the shared access key from the credential using its private accessor. - /// - /// - /// The instance to retrieve the key from. - /// - /// The shared access key. - /// - private static string GetSharedAccessKey(EventHubSharedKeyCredential instance) => - (string) - typeof(EventHubSharedKeyCredential) - .GetProperty("SharedAccessKey", BindingFlags.Instance | BindingFlags.NonPublic) - .GetValue(instance, null); - - /// - /// Retrieves the shared access key from the credential using its private accessor. - /// - /// - /// The instance to retrieve the key from. - /// - /// The shared access key. - /// - private static string GetSharedAccessKeyName(EventHubSharedKeyCredential instance) => - (string) - typeof(EventHubSharedKeyCredential) - .GetProperty("SharedAccessKeyName", BindingFlags.Instance | BindingFlags.NonPublic) - .GetValue(instance, null); - /// /// Retrieves the shared access signature from the credential using its private accessor. /// @@ -290,9 +352,9 @@ private static SharedAccessSignature GetSharedAccessSignature(SharedAccessSignat /// /// The shared access key. /// - private static SharedAccessSignatureCredential GetSharedAccessSignatureCredential(EventHubSharedKeyCredential instance) => + private static SharedAccessSignatureCredential GetSharedAccessSignatureCredential(EventHubsSharedAccessKeyCredential instance) => (SharedAccessSignatureCredential) - typeof(EventHubSharedKeyCredential) + typeof(EventHubsSharedAccessKeyCredential) .GetProperty("SharedAccessSignatureCredential", BindingFlags.Instance | BindingFlags.NonPublic) .GetValue(instance, null); } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs old mode 100755 new mode 100644 index 43b41702177c..d36f56756b3e --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionLiveTests.cs @@ -100,7 +100,7 @@ public async Task ConnectionCanConnectToEventHubsUsingSharedKeyCredential() { await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) { - var credential = new EventHubSharedKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); + var credential = new EventHubsSharedAccessKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); await using (var connection = new TestConnectionWithTransport(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) { @@ -369,6 +369,13 @@ public TestConnectionWithTransport(string fullyQualifiedNamespace, { } + public TestConnectionWithTransport(string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubConnectionOptions connectionOptions = default) : base(fullyQualifiedNamespace, eventHubName, credential, connectionOptions) + { + } + public Task GetPropertiesAsync(CancellationToken cancellationToken = default) => base.GetPropertiesAsync(RetryPolicy, cancellationToken); public Task GetPartitionIdsAsync(CancellationToken cancellationToken = default) => base.GetPartitionIdsAsync(RetryPolicy, cancellationToken); public Task GetPartitionPropertiesAsync(string partitionId, CancellationToken cancellationToken = default) => base.GetPartitionPropertiesAsync(partitionId, RetryPolicy, cancellationToken); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs index 9aeb7e103c16..a826e70e1da4 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Connection/EventHubConnectionTests.cs @@ -29,7 +29,7 @@ public class EventHubConnectionTests /// Provides the invalid test cases for the constructor tests. /// /// - public static IEnumerable ConstructorExpandedArgumentInvalidCases() + public static IEnumerable ConstructorTokenCredentialInvalidCases() { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); @@ -41,6 +41,22 @@ public static IEnumerable ConstructorExpandedArgumentInvalidCases() yield return new object[] { "sb://fakenamspace.com", "FakePath", credential.Object }; } + /// + /// Provides the invalid test cases for the constructor tests. + /// + /// + public static IEnumerable ConstructorSharedKeyCredentialInvalidCases() + { + var credential = new EventHubsSharedAccessKeyCredential("keyName", "keyValue"); + + yield return new object[] { null, "fakePath", credential }; + yield return new object[] { "", "fakePath", credential }; + yield return new object[] { "FakeNamespace", null, credential }; + yield return new object[] { "FakNamespace", "", credential }; + yield return new object[] { "FakeNamespace", "FakePath", null }; + yield return new object[] { "sb://fakenamspace.com", "FakePath", credential }; + } + /// /// Provides test cases for the constructor tests. /// @@ -53,6 +69,7 @@ public static IEnumerable ConstructorCreatesDefaultOptionsCases() yield return new object[] { new ReadableOptionsMock(fakeConnection), "simple connection string" }; yield return new object[] { new ReadableOptionsMock(fakeConnection), "connection string with null options" }; yield return new object[] { new ReadableOptionsMock("fullyQualifiedNamespace", "path", credential.Object), "expanded argument" }; + yield return new object[] { new ReadableOptionsMock("fullyQualifiedNamespace", "path", new EventHubsSharedAccessKeyCredential("key", "value")), "expanded argument" }; } /// @@ -72,6 +89,7 @@ public static IEnumerable ConstructorClonesOptionsCases() yield return new object[] { new ReadableOptionsMock(fakeConnection, options), options, "connection string" }; yield return new object[] { new ReadableOptionsMock("fullyQualifiedNamespace", "path", credential.Object, options), options, "expanded argument" }; + yield return new object[] { new ReadableOptionsMock("fullyQualifiedNamespace", "path", new EventHubsSharedAccessKeyCredential("key", "value"), options), options, "expanded argument" }; } /// @@ -193,10 +211,24 @@ public void ConstructorAllowsTheEventHubToBePassedTwiceIfEqual() /// /// [Test] - [TestCaseSource(nameof(ConstructorExpandedArgumentInvalidCases))] - public void ConstructorValidatesExpandedArguments(string fullyQualifiedNamespace, - string eventHubName, - TokenCredential credential) + [TestCaseSource(nameof(ConstructorTokenCredentialInvalidCases))] + public void ConstructorValidatesExpandedArgumentsForTokenCredential(string fullyQualifiedNamespace, + string eventHubName, + TokenCredential credential) + { + Assert.That(() => new EventHubConnection(fullyQualifiedNamespace, eventHubName, credential), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + [TestCaseSource(nameof(ConstructorSharedKeyCredentialInvalidCases))] + public void ConstructorValidatesExpandedArgumentsForSharedKeyCredential(string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential) { Assert.That(() => new EventHubConnection(fullyQualifiedNamespace, eventHubName, credential), Throws.InstanceOf()); } @@ -208,11 +240,11 @@ public void ConstructorValidatesExpandedArguments(string fullyQualifiedNamespace /// [Test] [TestCaseSource(nameof(ConstructorCreatesDefaultOptionsCases))] - public void ConstructorCreatesDefaultOptions(ReadableOptionsMock client, + public void ConstructorCreatesDefaultOptions(ReadableOptionsMock connection, string constructorDescription) { var defaultOptions = new EventHubConnectionOptions(); - EventHubConnectionOptions options = client.Options; + EventHubConnectionOptions options = connection.Options; Assert.That(options, Is.Not.Null, $"The { constructorDescription } constructor should have set default options."); Assert.That(options, Is.Not.SameAs(defaultOptions), $"The { constructorDescription } constructor should not have the same options instance."); @@ -227,11 +259,11 @@ public void ConstructorCreatesDefaultOptions(ReadableOptionsMock client, /// [Test] [TestCaseSource(nameof(ConstructorClonesOptionsCases))] - public void ConstructorClonesOptions(ReadableOptionsMock client, + public void ConstructorClonesOptions(ReadableOptionsMock connection, EventHubConnectionOptions constructorOptions, string constructorDescription) { - EventHubConnectionOptions options = client.Options; + EventHubConnectionOptions options = connection.Options; Assert.That(options, Is.Not.Null, $"The { constructorDescription } constructor should have set the options."); Assert.That(options, Is.Not.SameAs(constructorOptions), $"The { constructorDescription } constructor should have cloned the options."); @@ -249,9 +281,9 @@ public void ConstructorWithFullConnectionStringInitializesProperties() { var entityPath = "somePath"; var fakeConnection = $"Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath={ entityPath }"; - var client = new EventHubConnection(fakeConnection); + var connection = new EventHubConnection(fakeConnection); - Assert.That(client.EventHubName, Is.EqualTo(entityPath)); + Assert.That(connection.EventHubName, Is.EqualTo(entityPath)); } /// @@ -264,9 +296,9 @@ public void ConstructorWithConnectionStringAndEventHubInitializesProperties() { var entityPath = "somePath"; var fakeConnection = $"Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]"; - var client = new EventHubConnection(fakeConnection, entityPath); + var connection = new EventHubConnection(fakeConnection, entityPath); - Assert.That(client.EventHubName, Is.EqualTo(entityPath)); + Assert.That(connection.EventHubName, Is.EqualTo(entityPath)); } /// @@ -275,14 +307,30 @@ public void ConstructorWithConnectionStringAndEventHubInitializesProperties() /// /// [Test] - public void ConstructorWithExpandedArgumentsInitializesProperties() + public void ConstructorWithTokenCredentialInitializesProperties() { var fullyQualifiedNamespace = "host.windows.servicebus.net"; var entityPath = "somePath"; var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); - var client = new EventHubConnection(fullyQualifiedNamespace, entityPath, credential.Object); + var connection = new EventHubConnection(fullyQualifiedNamespace, entityPath, credential.Object); + + Assert.That(connection.EventHubName, Is.EqualTo(entityPath)); + } + + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + public void ConstructorWithSharedKeyCredentialInitializesProperties() + { + var fullyQualifiedNamespace = "host.windows.servicebus.net"; + var entityPath = "somePath"; + var credential = new EventHubsSharedAccessKeyCredential("key", "value"); + var connection = new EventHubConnection(fullyQualifiedNamespace, entityPath, credential); - Assert.That(client.EventHubName, Is.EqualTo(entityPath)); + Assert.That(connection.EventHubName, Is.EqualTo(entityPath)); } /// @@ -320,8 +368,8 @@ public void ConstructorWithExpandedArgumentsValidatesOptions() [Test] public void ContructorWithConnectionStringCreatesTheTransportClient() { - var client = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); - Assert.That(GetTransportClient(client), Is.Not.Null); + var connection = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); + Assert.That(GetTransportClient(connection), Is.Not.Null); } /// @@ -333,10 +381,10 @@ public void ContructorWithConnectionStringCreatesTheTransportClient() public void ContructorWithConnectionStringUsingSharedAccessSignatureCreatesTheCorrectTransportCredential() { var sasToken = new SharedAccessSignature("hub", "root", "abc1234").Value; - var client = new InjectableTransportClientMock(Mock.Of(), $"Endpoint=sb://not-real.servicebus.windows.net/;EntityPath=fake;SharedAccessSignature={ sasToken }"); + var connection = new InjectableTransportClientMock(Mock.Of(), $"Endpoint=sb://not-real.servicebus.windows.net/;EntityPath=fake;SharedAccessSignature={ sasToken }"); - Assert.That(client.TransportClientCredential, Is.Not.Null, "The transport client should have been given a credential."); - Assert.That(client.TransportClientCredential.GetToken(default, default).Token, Is.EqualTo(sasToken), "The transport client credential should use the provided SAS token."); + Assert.That(connection.TransportClientCredential, Is.Not.Null, "The transport client should have been given a credential."); + Assert.That(connection.TransportClientCredential.GetToken(default, default).Token, Is.EqualTo(sasToken), "The transport client credential should use the provided SAS token."); } /// @@ -345,7 +393,7 @@ public void ContructorWithConnectionStringUsingSharedAccessSignatureCreatesTheCo /// /// [Test] - public void ContructorWithExpandedArgumentsCreatesTheTransportClient() + public void ContructorWithTokenCredentailCreatesTheTransportClient() { var fullyQualifiedNamespace = "my.eventhubs.com"; var path = "some-hub"; @@ -354,9 +402,28 @@ public void ContructorWithExpandedArgumentsCreatesTheTransportClient() var resource = $"amqps://{ fullyQualifiedNamespace }/{ path }"; var options = new EventHubConnectionOptions { TransportType = EventHubsTransportType.AmqpTcp }; var signature = new SharedAccessSignature(resource, keyName, key); - var client = new EventHubConnection(fullyQualifiedNamespace, path, new SharedAccessSignatureCredential(signature), options); + var connection = new EventHubConnection(fullyQualifiedNamespace, path, new SharedAccessSignatureCredential(signature), options); + + Assert.That(GetTransportClient(connection), Is.Not.Null); + } + + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + public void ContructorWithSharedKeyCredentailCreatesTheTransportClient() + { + var fullyQualifiedNamespace = "my.eventhubs.com"; + var path = "some-hub"; + var keyName = "aWonderfulKey"; + var key = "ABC4223"; + var options = new EventHubConnectionOptions { TransportType = EventHubsTransportType.AmqpTcp }; + var credential = new EventHubsSharedAccessKeyCredential(keyName, key); + var connection = new EventHubConnection(fullyQualifiedNamespace, path, credential, options); - Assert.That(GetTransportClient(client), Is.Not.Null); + Assert.That(GetTransportClient(connection), Is.Not.Null); } /// @@ -366,11 +433,11 @@ public void ContructorWithExpandedArgumentsCreatesTheTransportClient() /// [Test] [TestCaseSource(nameof(ConstructorCreatesDefaultOptionsCases))] - public void TransportClientReceivesDefaultOptions(ReadableOptionsMock client, + public void TransportClientReceivesDefaultOptions(ReadableOptionsMock connection, string constructorDescription) { var defaultOptions = new EventHubConnectionOptions(); - EventHubConnectionOptions options = client.TransportClientOptions; + EventHubConnectionOptions options = connection.TransportClientOptions; Assert.That(options, Is.Not.Null, $"The { constructorDescription } constructor should have set default options."); Assert.That(options, Is.Not.SameAs(defaultOptions), $"The { constructorDescription } constructor should not have the same options instance."); @@ -385,11 +452,11 @@ public void TransportClientReceivesDefaultOptions(ReadableOptionsMock client, /// [Test] [TestCaseSource(nameof(ConstructorClonesOptionsCases))] - public void TransportClientReceivesClonedOptions(ReadableOptionsMock client, + public void TransportClientReceivesClonedOptions(ReadableOptionsMock connection, EventHubConnectionOptions constructorOptions, string constructorDescription) { - EventHubConnectionOptions options = client.TransportClientOptions; + EventHubConnectionOptions options = connection.TransportClientOptions; Assert.That(options, Is.Not.Null, $"The { constructorDescription } constructor should have set the options."); Assert.That(options, Is.Not.SameAs(constructorOptions), $"The { constructorDescription } constructor should have cloned the options."); @@ -415,9 +482,9 @@ public void BuildTransportClientAllowsLegalConnectionTypes(EventHubsTransportTyp var signature = new SharedAccessSignature(resource, keyName, key); var credential = new SharedAccessSignatureCredential(signature); var eventHubCredential = new EventHubTokenCredential(credential, resource); - var client = new EventHubConnection(fullyQualifiedNamespace, path, credential); + var connection = new EventHubConnection(fullyQualifiedNamespace, path, credential); - Assert.That(() => client.CreateTransportClient(fullyQualifiedNamespace, path, eventHubCredential, options), Throws.Nothing); + Assert.That(() => connection.CreateTransportClient(fullyQualifiedNamespace, path, eventHubCredential, options), Throws.Nothing); } /// @@ -438,9 +505,9 @@ public void BuildTransportClientRejectsInvalidConnectionTypes() var signature = new SharedAccessSignature(resource, keyName, key); var credential = new SharedAccessSignatureCredential(signature); var eventHubCredential = new EventHubTokenCredential(credential, resource); - var client = new EventHubConnection(fullyQualifiedNamespace, path, credential); + var connection = new EventHubConnection(fullyQualifiedNamespace, path, credential); - Assert.That(() => client.CreateTransportClient(fullyQualifiedNamespace, path, eventHubCredential, options), Throws.InstanceOf()); + Assert.That(() => connection.CreateTransportClient(fullyQualifiedNamespace, path, eventHubCredential, options), Throws.InstanceOf()); } /// @@ -453,8 +520,8 @@ public void BuildTransportClientRejectsInvalidConnectionTypes() [TestCase("")] public void CreateConsumerRequiresConsumerGroup(string consumerGroup) { - var client = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); - Assert.That(() => client.CreateTransportConsumer(consumerGroup, "partition1", EventPosition.Earliest, Mock.Of()), Throws.InstanceOf()); + var connection = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); + Assert.That(() => connection.CreateTransportConsumer(consumerGroup, "partition1", EventPosition.Earliest, Mock.Of()), Throws.InstanceOf()); } /// @@ -467,8 +534,8 @@ public void CreateConsumerRequiresConsumerGroup(string consumerGroup) [TestCase("")] public void CreateConsumerRequiresPartition(string partition) { - var client = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); - Assert.That(() => client.CreateTransportConsumer("someGroup", partition, EventPosition.Earliest, Mock.Of()), Throws.InstanceOf()); + var connection = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); + Assert.That(() => connection.CreateTransportConsumer("someGroup", partition, EventPosition.Earliest, Mock.Of()), Throws.InstanceOf()); } /// @@ -479,8 +546,8 @@ public void CreateConsumerRequiresPartition(string partition) [Test] public void CreateConsumerRequiresRetryPolicy() { - var client = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); - Assert.That(() => client.CreateTransportConsumer("someGroup", "0", EventPosition.Earliest, null), Throws.InstanceOf()); + var connection = new EventHubConnection("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]", "fake", new EventHubConnectionOptions()); + Assert.That(() => connection.CreateTransportConsumer("someGroup", "0", EventPosition.Earliest, null), Throws.InstanceOf()); } /// @@ -512,21 +579,21 @@ public async Task GetPartitionIdsAsyncDelegatesToGetProperties() var date = DateTimeOffset.Parse("2015-10-27T12:00:00Z"); var partitionIds = new[] { "first", "second", "third" }; var properties = new EventHubProperties("dummy", date, partitionIds); - var mockClient = new Mock { CallBase = true }; + var mockConnection = new Mock { CallBase = true }; - mockClient - .Setup(client => client.GetPropertiesAsync( + mockConnection + .Setup(connection => connection.GetPropertiesAsync( It.IsAny(), It.IsAny())) .Returns(Task.FromResult(properties)) .Verifiable("GetPropertiesAcync should have been delegated to."); - var actual = await mockClient.Object.GetPartitionIdsAsync(Mock.Of(), CancellationToken.None); + var actual = await mockConnection.Object.GetPartitionIdsAsync(Mock.Of(), CancellationToken.None); Assert.That(actual, Is.Not.Null); Assert.That(actual, Is.EqualTo(partitionIds)); - mockClient.VerifyAll(); + mockConnection.VerifyAll(); } /// @@ -538,9 +605,9 @@ public async Task GetPartitionIdsAsyncDelegatesToGetProperties() public async Task GetPropertiesAsyncInvokesTheTransportClient() { var transportClient = new ObservableTransportClientMock(); - var client = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); + var connection = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); - await client.GetPropertiesAsync(Mock.Of(), CancellationToken.None); + await connection.GetPropertiesAsync(Mock.Of(), CancellationToken.None); Assert.That(transportClient.WasGetPropertiesCalled, Is.True); } @@ -554,10 +621,10 @@ public async Task GetPropertiesAsyncInvokesTheTransportClient() public async Task GetPartitionPropertiesAsyncInvokesTheTransportClient() { var transportClient = new ObservableTransportClientMock(); - var client = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); + var connection = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); var expectedId = "BB33"; - await client.GetPartitionPropertiesAsync(expectedId, Mock.Of()); + await connection.GetPartitionPropertiesAsync(expectedId, Mock.Of()); Assert.That(transportClient.GetPartitionPropertiesCalledForId, Is.EqualTo(expectedId)); } @@ -571,13 +638,13 @@ public async Task GetPartitionPropertiesAsyncInvokesTheTransportClient() public void CreateProducerInvokesTheTransportClient() { var transportClient = new ObservableTransportClientMock(); - var client = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); + var connection = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); var options = new EventHubProducerClientOptions { EnableIdempotentPartitions = true, RetryOptions = new EventHubsRetryOptions { MaximumRetries = 6, TryTimeout = TimeSpan.FromMinutes(4) } }; var expectedFeatures = options.CreateFeatureFlags(); var expectedPartitionOptions = new PartitionPublishingOptions { ProducerGroupId = 123 }; var expectedRetry = options.RetryOptions.ToRetryPolicy(); - client.CreateTransportProducer(null, expectedFeatures, expectedPartitionOptions, expectedRetry); + connection.CreateTransportProducer(null, expectedFeatures, expectedPartitionOptions, expectedRetry); Assert.That(transportClient.CreateProducerCalledWith, Is.Not.Null, "The producer options should have been set."); Assert.That(transportClient.CreateProducerCalledWith.PartitionId, Is.Null, "There should have been no partition specified."); @@ -597,7 +664,7 @@ public void CreateProducerInvokesTheTransportClient() public void CreateConsumerInvokesTheTransportClient() { var transportClient = new ObservableTransportClientMock(); - var client = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); + var connection = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); var expectedPosition = EventPosition.FromOffset(65); var expectedPartition = "2123"; var expectedConsumerGroup = EventHubConsumerClient.DefaultConsumerGroupName; @@ -606,7 +673,7 @@ public void CreateConsumerInvokesTheTransportClient() var expectedPrefetch = 99U; var expectedOwnerLevel = 123L; - client.CreateTransportConsumer(expectedConsumerGroup, expectedPartition, expectedPosition, expectedRetryPolicy, expectedTrackLastEnqueued, expectedOwnerLevel, expectedPrefetch); + connection.CreateTransportConsumer(expectedConsumerGroup, expectedPartition, expectedPosition, expectedRetryPolicy, expectedTrackLastEnqueued, expectedOwnerLevel, expectedPrefetch); (var actualConsumerGroup, var actualPartition, EventPosition actualPosition, var actualRetry, var actualTrackLastEnqueued, var actualOwnerLevel, var actualPrefetch) = transportClient.CreateConsumerCalledWith; Assert.That(actualPartition, Is.EqualTo(expectedPartition), "The partition should have been passed."); @@ -627,9 +694,9 @@ public void CreateConsumerInvokesTheTransportClient() public async Task CloseAsyncClosesTheTransportClient() { var transportClient = new ObservableTransportClientMock(); - var client = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); + var connection = new InjectableTransportClientMock(transportClient, "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=fake"); - await client.CloseAsync(); + await connection.CloseAsync(); Assert.That(transportClient.WasCloseCalled, Is.True); } @@ -687,7 +754,7 @@ public void BuildConnectionAudienceConstructsFromNamespaceAndPath() /// /// The client to retrieve the transport client of. /// - /// The transport client contained by the Event Hub client. + /// The transport client contained by the Event Hub connection. /// private TransportClient GetTransportClient(EventHubConnection client) => typeof(EventHubConnection) @@ -721,6 +788,13 @@ public ReadableOptionsMock(string fullyQualifiedNamespace, { } + public ReadableOptionsMock(string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubConnectionOptions clientOptions = default) : base(fullyQualifiedNamespace, eventHubName, credential, clientOptions) + { + } + internal override TransportClient CreateTransportClient(string fullyQualifiedNamespace, string eventHubName, EventHubTokenCredential credential, EventHubConnectionOptions options) { TransportClientOptions = options; @@ -749,6 +823,13 @@ public ObservableOperationsMock(string fullyQualifiedNamespace, { } + public ObservableOperationsMock(string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubConnectionOptions clientOptions = default) : base(fullyQualifiedNamespace, eventHubName, credential, clientOptions) + { + } + public override Task CloseAsync(CancellationToken cancellationToken = default) { WasCloseAsyncCalled = true; @@ -784,6 +865,16 @@ public InjectableTransportClientMock(TransportClient transportClient, SetTransportClient(transportClient); } + public InjectableTransportClientMock(TransportClient transportClient, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventHubConnectionOptions clientOptions = default) : base(fullyQualifiedNamespace, eventHubName, credential, clientOptions) + { + TransportClient = transportClient; + SetTransportClient(transportClient); + } + internal override TransportClient CreateTransportClient(string fullyQualifiedNamespace, string eventHubName, EventHubTokenCredential credential, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs index c1e04f49a1eb..86a436452860 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientLiveTests.cs @@ -484,6 +484,46 @@ public async Task ConsumerCanReadEventsUsingAnIdentityCredential() } } + /// + /// Verifies that the is able to + /// connect to the Event Hubs service and perform operations. + /// + /// + [Test] + public async Task ConsumerCanReadEventsUsingTheSharedKeyCredential() + { + await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) + { + using var cancellationSource = new CancellationTokenSource(); + cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + + var credential = new EventHubsSharedAccessKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); + var sourceEvents = EventGenerator.CreateEvents(50).ToList(); + + await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + { + var partition = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).First(); + var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); + + await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + // Read the events and validate the resulting state. + + var readState = await ReadEventsFromPartitionAsync(consumer, partition, sourceEvents.Count, cancellationSource.Token); + Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); + + foreach (var sourceEvent in sourceEvents) + { + var sourceId = sourceEvent.Properties[EventGenerator.IdPropertyName].ToString(); + Assert.That(readState.Events.TryGetValue(sourceId, out var readEvent), Is.True, $"The event with custom identifier [{ sourceId }] was not processed." ); + Assert.That(sourceEvent.IsEquivalentTo(readEvent.Data), $"The event with custom identifier [{ sourceId }] did not match the corresponding processed event."); + } + } + + cancellationSource.Cancel(); + } + } + /// /// Verifies that the is able to /// connect to the Event Hubs service and perform operations. @@ -1866,6 +1906,47 @@ public async Task ConsumerCanReadFromAllPartitionsUsingAnIdentityCredential() } } + /// + /// Verifies that the is able to + /// connect to the Event Hubs service and perform operations. + /// + /// + [Test] + public async Task ConsumerCanReadFromAllPartitionsUsingTheSharedKeyCredential() + { + await using (EventHubScope scope = await EventHubScope.CreateAsync(4)) + { + using var cancellationSource = new CancellationTokenSource(); + cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + + var credential = new EventHubsSharedAccessKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); + var sourceEvents = EventGenerator.CreateEvents(100).ToList(); + + await using (var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + { + var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); + var partitions = (await consumer.GetPartitionIdsAsync(cancellationSource.Token)).ToArray(); + + var sendCount = await SendEventsToAllPartitionsAsync(connectionString, sourceEvents, partitions, cancellationSource.Token); + Assert.That(sendCount, Is.EqualTo(sourceEvents.Count), "All of the events should have been sent."); + + // Read the events and validate the resulting state. + + var readState = await ReadEventsFromAllPartitionsAsync(consumer, sourceEvents.Count, cancellationSource.Token); + Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); + + foreach (var sourceEvent in sourceEvents) + { + var sourceId = sourceEvent.Properties[EventGenerator.IdPropertyName].ToString(); + Assert.That(readState.Events.TryGetValue(sourceId, out var readEvent), Is.True, $"The event with custom identifier [{ sourceId }] was not processed." ); + Assert.That(sourceEvent.IsEquivalentTo(readEvent.Data), $"The event with custom identifier [{ sourceId }] did not match the corresponding processed event."); + } + } + + cancellationSource.Cancel(); + } + } + /// /// Verifies that the is able to /// connect to the Event Hubs service and perform operations. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs index b4c04ecc392a..8dbda2a9be8b 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Consumer/EventHubConsumerClientTests.cs @@ -63,8 +63,9 @@ public static IEnumerable NonFatalRetriableExceptionTestCases() public void ConstructorValidatesTheConsumerGroup(string consumerGroup) { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); + Assert.That(() => new EventHubConsumerClient(consumerGroup, "dummyNamespace", "dummyEventHub", credential.Object, new EventHubConsumerClientOptions()), Throws.InstanceOf(), "The token credential constructor should validate the consumer group."); + Assert.That(() => new EventHubConsumerClient(consumerGroup, "dummyNamespace", "dummyEventHub", new EventHubsSharedAccessKeyCredential("key", "value"), new EventHubConsumerClientOptions()), Throws.InstanceOf(), "The shared key credential constructor should validate the consumer group."); Assert.That(() => new EventHubConsumerClient(consumerGroup, "dummyConnection", new EventHubConsumerClientOptions()), Throws.InstanceOf(), "The connection string constructor should validate the consumer group."); - Assert.That(() => new EventHubConsumerClient(consumerGroup, "dummyNamespace", "dummyEventHub", credential.Object, new EventHubConsumerClientOptions()), Throws.InstanceOf(), "The namespace constructor should validate the consumer group."); } /// @@ -136,7 +137,8 @@ public void ConstructorAllowsMultipleEventHubNamesFromTheConnectionStringIfEqual public void ConstructorValidatesTheNamespace(string constructorArgument) { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); - Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", credential.Object), Throws.InstanceOf()); + Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", credential.Object), Throws.InstanceOf(), "The token credential constructor should validate."); + Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should validate."); } /// @@ -149,7 +151,8 @@ public void ConstructorValidatesTheNamespace(string constructorArgument) public void ConstructorValidatesTheEventHub(string constructorArgument) { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); - Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, credential.Object), Throws.InstanceOf()); + Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, credential.Object), Throws.InstanceOf(), "The token credential constructor should validate."); + Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should validate."); } /// @@ -159,7 +162,8 @@ public void ConstructorValidatesTheEventHub(string constructorArgument) [Test] public void ConstructorValidatesTheCredential() { - Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException); + Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException, "The token credential constructor should validate."); + Assert.That(() => new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(EventHubsSharedAccessKeyCredential)), Throws.ArgumentNullException, "The shared key credential constructor should validate."); } /// @@ -192,7 +196,7 @@ public void ConnectionStringConstructorSetsTheRetryPolicy() /// /// [Test] - public void ExpandedConstructorSetsTheRetryPolicy() + public void TokenCredentialConstructorSetsTheRetryPolicy() { var expected = Mock.Of(); var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); @@ -202,6 +206,21 @@ public void ExpandedConstructorSetsTheRetryPolicy() Assert.That(GetRetryPolicy(consumer), Is.SameAs(expected)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheRetryPolicy() + { + var expected = Mock.Of(); + var credential = new EventHubsSharedAccessKeyCredential("key", "value"); + var options = new EventHubConsumerClientOptions { RetryOptions = new EventHubsRetryOptions { CustomRetryPolicy = expected } }; + var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hub", credential, options); + + Assert.That(GetRetryPolicy(consumer), Is.SameAs(expected)); + } + /// /// Verifies functionality of the constructor. /// @@ -241,7 +260,7 @@ public void ConnectionStringConstructorCreatesDefaultOptions() /// /// [Test] - public void ExpandedConstructorCreatesDefaultOptions() + public void TokenCredentialConstructorCreatesDefaultOptions() { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); var expected = new EventHubConsumerClientOptions().RetryOptions; @@ -255,6 +274,25 @@ public void ExpandedConstructorCreatesDefaultOptions() Assert.That(actual.IsEquivalentTo(expected), Is.True, "The default retry policy should be based on the default retry options."); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorCreatesDefaultOptions() + { + var credential = new EventHubsSharedAccessKeyCredential("key", "value"); + var expected = new EventHubConsumerClientOptions().RetryOptions; + var consumer = new EventHubConsumerClient(EventHubConsumerClient.DefaultConsumerGroupName, "some-namespace", "hubName", credential); + + var policy = GetRetryPolicy(consumer); + Assert.That(policy, Is.Not.Null, "There should have been a retry policy set."); + Assert.That(policy, Is.InstanceOf(), "The default retry policy should be a basic policy."); + + var actual = ((BasicRetryPolicy)policy).Options; + Assert.That(actual.IsEquivalentTo(expected), Is.True, "The default retry policy should be based on the default retry options."); + } + /// /// Verifies functionality of the constructor. /// @@ -293,7 +331,7 @@ public void ConnectionStringConstructorSetsTheConsumerGroup() /// /// [Test] - public void ExpandedConstructorSetsTheConsumerGroup() + public void TokenCredentialConstructorSetsTheConsumerGroup() { var consumerGroup = "SomeGroup"; var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); @@ -302,6 +340,20 @@ public void ExpandedConstructorSetsTheConsumerGroup() Assert.That(consumer.ConsumerGroup, Is.EqualTo(consumerGroup)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheConsumerGroup() + { + var consumerGroup = "SomeGroup"; + var credential = new EventHubsSharedAccessKeyCredential("key", "value"); + var consumer = new EventHubConsumerClient(consumerGroup, "namespace", "eventHub", credential); + + Assert.That(consumer.ConsumerGroup, Is.EqualTo(consumerGroup)); + } + /// /// Verifies functionality of the constructor. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringParserTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Core/EventHubsConnectionStringPropertiesTests.cs similarity index 50% rename from sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringParserTests.cs rename to sdk/eventhub/Azure.Messaging.EventHubs/tests/Core/EventHubsConnectionStringPropertiesTests.cs index b9aab00eae68..abf2f81074b6 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Shared/tests/Core/ConnectionStringParserTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Core/EventHubsConnectionStringPropertiesTests.cs @@ -4,22 +4,22 @@ using System; using System.Collections.Generic; using System.Reflection; -using Azure.Messaging.EventHubs.Core; +using Azure.Messaging.EventHubs; using NUnit.Framework; using NUnit.Framework.Constraints; namespace Azure.Messaging.EventHubs.Tests { /// - /// The suite of tests for the + /// The suite of tests for the /// class. /// /// [TestFixture] - public class ConnectionStringParserTests + public class EventHubsConnectionStringPropertiesTests { /// - /// Provides the reordered token test cases for the tests. + /// Provides the reordered token test cases for the tests. /// /// public static IEnumerable ParseDoesNotforceTokenOrderingCases() @@ -40,10 +40,10 @@ public static IEnumerable ParseDoesNotforceTokenOrderingCases() } /// - /// Provides the reordered token test cases for the tests. + /// Provides the reordered token test cases for the tests. /// /// - public static IEnumerable ParseCorrectlyParsesPartialConnectionStrings() + public static IEnumerable ParseCorrectlyParsesPartialConnectionStringCases() { var endpoint = "test.endpoint.com"; var eventHub = "some-path"; @@ -62,7 +62,71 @@ public static IEnumerable ParseCorrectlyParsesPartialConnectionStrings } /// - /// Verifies functionality of the + /// Provides the invalid properties argument cases for the tests. + /// + /// + public static IEnumerable ToConnectionStringValidatesArgumentCases() + { + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = null, + EventHubName = "fake", + SharedAccessSignature = "fake" + }, + "missing endpoint" }; + + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(GetEventHubsEndpointScheme(), "someplace.hosname.ext")), + EventHubName = null, + SharedAccessSignature = "fake" + }, + "missing Event Hub name" }; + + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(GetEventHubsEndpointScheme(), "someplace.hosname.ext")), + EventHubName = "fake" + }, + "missing authorization" }; + + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(GetEventHubsEndpointScheme(), "someplace.hosname.ext")), + EventHubName = "fake", + SharedAccessSignature = "fake", + SharedAccessKey = "fake" + }, + "SAS and key specified" }; + + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(GetEventHubsEndpointScheme(), "someplace.hosname.ext")), + EventHubName = "fake", + SharedAccessSignature = "fake", + SharedAccessKeyName = "fake" + }, + "SAS and shared key name specified" }; + + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(GetEventHubsEndpointScheme(), "someplace.hosname.ext")), + EventHubName = "fake", + SharedAccessKeyName = "fake" + }, + "only shared key name specified" }; + + yield return new object[] { new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(GetEventHubsEndpointScheme(), "someplace.hosname.ext")), + EventHubName = "fake", + SharedAccessKey = "fake" + }, + "only shared key specified" }; + } + + /// + /// Verifies functionality of the /// method. /// /// @@ -73,11 +137,11 @@ public void ParseValidatesArguments(string connectionString) { ExactTypeConstraint typeConstraint = connectionString is null ? Throws.ArgumentNullException : Throws.ArgumentException; - Assert.That(() => ConnectionStringParser.Parse(connectionString), typeConstraint); + Assert.That(() => EventHubsConnectionStringProperties.Parse(connectionString), typeConstraint); } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -89,7 +153,7 @@ public void ParseCorrectlyParsesANamespaceConnectionString() var sasKeyName = "sasName"; var sharedAccessSignature = "fakeSAS"; var connectionString = $"Endpoint=sb://{ endpoint };SharedAccessKeyName={ sasKeyName };SharedAccessKey={ sasKey };SharedAccessSignature={ sharedAccessSignature }"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -99,7 +163,7 @@ public void ParseCorrectlyParsesANamespaceConnectionString() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -112,7 +176,7 @@ public void ParseCorrectlyParsesAnEventHubConnectionString() var sasKeyName = "sasName"; var sharedAccessSignature = "fakeSAS"; var connectionString = $"Endpoint=sb://{ endpoint };SharedAccessKeyName={ sasKeyName };SharedAccessKey={ sasKey };EntityPath={ eventHub };SharedAccessSignature={ sharedAccessSignature }"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -122,7 +186,7 @@ public void ParseCorrectlyParsesAnEventHubConnectionString() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -135,7 +199,7 @@ public void ParseCorrectlyParsesPartialConnectionStrings(string connectionString string sasKey, string sharedAccessSignature) { - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -145,7 +209,7 @@ public void ParseCorrectlyParsesPartialConnectionStrings(string connectionString } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -157,7 +221,7 @@ public void ParseToleratesLeadingDelimiters() var sasKey = "sasKey"; var sasKeyName = "sasName"; var connectionString = $";Endpoint=sb://{ endpoint };SharedAccessKeyName={ sasKeyName };SharedAccessKey={ sasKey };EntityPath={ eventHub }"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -166,7 +230,7 @@ public void ParseToleratesLeadingDelimiters() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -178,7 +242,7 @@ public void ParseToleratesTrailingDelimiters() var sasKey = "sasKey"; var sasKeyName = "sasName"; var connectionString = $"Endpoint=sb://{ endpoint };SharedAccessKeyName={ sasKeyName };SharedAccessKey={ sasKey };EntityPath={ eventHub };"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -187,7 +251,7 @@ public void ParseToleratesTrailingDelimiters() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -199,7 +263,7 @@ public void ParseToleratesSpacesBetweenPairs() var sasKey = "sasKey"; var sasKeyName = "sasName"; var connectionString = $"Endpoint=sb://{ endpoint }; SharedAccessKeyName={ sasKeyName }; SharedAccessKey={ sasKey }; EntityPath={ eventHub }"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -208,7 +272,7 @@ public void ParseToleratesSpacesBetweenPairs() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -220,7 +284,7 @@ public void ParseToleratesSpacesBetweenValues() var sasKey = "sasKey"; var sasKeyName = "sasName"; var connectionString = $"Endpoint = sb://{ endpoint };SharedAccessKeyName ={ sasKeyName };SharedAccessKey= { sasKey }; EntityPath = { eventHub }"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -229,7 +293,7 @@ public void ParseToleratesSpacesBetweenValues() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -242,7 +306,7 @@ public void ParseDoesNotForceTokenOrdering(string connectionString, string sasKey, string shardAccessSignature) { - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -252,7 +316,7 @@ public void ParseDoesNotForceTokenOrdering(string connectionString, } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -264,7 +328,7 @@ public void ParseIgnoresUnknownTokens() var sasKey = "sasKey"; var sasKeyName = "sasName"; var connectionString = $"Endpoint=sb://{ endpoint };SharedAccessKeyName={ sasKeyName };Unknown=INVALID;SharedAccessKey={ sasKey };EntityPath={ eventHub };Trailing=WHOAREYOU"; - ConnectionStringProperties parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); Assert.That(parsed.Endpoint?.Host, Is.EqualTo(endpoint).Using((IComparer)StringComparer.OrdinalIgnoreCase), "The endpoint host should match."); Assert.That(parsed.SharedAccessKeyName, Is.EqualTo(sasKeyName), "The SAS key name should match."); @@ -273,7 +337,7 @@ public void ParseIgnoresUnknownTokens() } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -287,7 +351,7 @@ public void ParseIgnoresUnknownTokens() public void ParseDoesAcceptsHostNamesAndUrisForTheEndpoint(string endpointValue) { var connectionString = $"Endpoint={ endpointValue };EntityPath=dummy"; - var parsed = ConnectionStringParser.Parse(connectionString); + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); if (!Uri.TryCreate(endpointValue, UriKind.Absolute, out var valueUri)) { @@ -303,7 +367,7 @@ public void ParseDoesAcceptsHostNamesAndUrisForTheEndpoint(string endpointValue) } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -313,11 +377,11 @@ public void ParseDoesAcceptsHostNamesAndUrisForTheEndpoint(string endpointValue) public void ParseDoesNotAllowAnInvalidEndpointFormat(string endpointValue) { var connectionString = $"Endpoint={endpointValue }"; - Assert.That(() => ConnectionStringParser.Parse(connectionString), Throws.InstanceOf()); + Assert.That(() => EventHubsConnectionStringProperties.Parse(connectionString), Throws.InstanceOf()); } /// - /// Verifies functionality of the + /// Verifies functionality of the /// method. /// /// @@ -330,11 +394,230 @@ public void ParseDoesNotAllowAnInvalidEndpointFormat(string endpointValue) [TestCase("Endpoint=;SharedAccessKeyName;SharedAccessKey;EntityPath=")] public void ParseConsidersMissingValuesAsMalformed(string connectionString) { - Assert.That(() => ConnectionStringParser.Parse(connectionString), Throws.InstanceOf()); + Assert.That(() => EventHubsConnectionStringProperties.Parse(connectionString), Throws.InstanceOf()); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + [TestCaseSource(nameof(ToConnectionStringValidatesArgumentCases))] + public void ToConnectionStringValidatesProperties(EventHubsConnectionStringProperties properties, + string testDescription) + { + Assert.That(() => properties.ToConnectionString(), Throws.InstanceOf(), $"The case for `{ testDescription }` failed."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void ToConnectionStringProducesTheConnectionStringForSharedAccessSignatures() + { + var properties = new EventHubsConnectionStringProperties + { + Endpoint = new Uri("sb://place.endpoint.ext"), + EventHubName = "HubName", + SharedAccessSignature = "FaKe#$1324@@" + }; + + var connectionString = properties.ToConnectionString(); + Assert.That(connectionString, Is.Not.Null, "The connection string should not be null."); + Assert.That(connectionString.Length, Is.GreaterThan(0), "The connection string should have content."); + + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); + Assert.That(parsed, Is.Not.Null, "The connection string should be parsable."); + Assert.That(PropertiesAreEquivalent(properties, parsed), Is.True, "The connection string should parse into the source properties."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void ToConnectionStringProducesTheConnectionStringForSharedKeys() + { + var properties = new EventHubsConnectionStringProperties + { + Endpoint = new Uri("sb://place.endpoint.ext"), + EventHubName = "HubName", + SharedAccessKey = "FaKe#$1324@@", + SharedAccessKeyName = "RootSharedAccessManagementKey" + }; + + var connectionString = properties.ToConnectionString(); + Assert.That(connectionString, Is.Not.Null, "The connection string should not be null."); + Assert.That(connectionString.Length, Is.GreaterThan(0), "The connection string should have content."); + + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); + Assert.That(parsed, Is.Not.Null, "The connection string should be parsable."); + Assert.That(PropertiesAreEquivalent(properties, parsed), Is.True, "The connection string should parse into the source properties."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + [TestCase("sb://")] + [TestCase("amqps://")] + [TestCase("amqp://")] + [TestCase("http://")] + [TestCase("https://")] + [TestCase("fake://")] + public void ToConnectionStringNormalizesTheEndpointScheme(string scheme) + { + var properties = new EventHubsConnectionStringProperties + { + Endpoint = new Uri(string.Concat(scheme, "myhub.servicebus.windows.net")), + EventHubName = "HubName", + SharedAccessKey = "FaKe#$1324@@", + SharedAccessKeyName = "RootSharedAccessManagementKey" + }; + + var connectionString = properties.ToConnectionString(); + Assert.That(connectionString, Is.Not.Null, "The connection string should not be null."); + Assert.That(connectionString.Length, Is.GreaterThan(0), "The connection string should have content."); + + var parsed = EventHubsConnectionStringProperties.Parse(connectionString); + Assert.That(parsed, Is.Not.Null, "The connection string should be parsable."); + Assert.That(parsed.Endpoint.Host, Is.EqualTo(properties.Endpoint.Host), "The host name of the endpoints should match."); + + var expectedScheme = new Uri(string.Concat(GetEventHubsEndpointScheme(), "fake.fake.com")).Scheme; + Assert.That(parsed.Endpoint.Scheme, Is.EqualTo(expectedScheme), "The endpoint scheme should have been overridden."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + [TestCase("SharedAccessKeyName=[value];SharedAccessKey=[value];EntityPath=[value]")] + [TestCase("Endpoint=sb://value.com;SharedAccessKey=[value];EntityPath=[value]")] + [TestCase("Endpoint=sb://value.com;SharedAccessKeyName=[value];EntityPath=[value]")] + [TestCase("Endpoint=sb://value.com;SharedAccessKeyName=[value];SharedAccessKey=[value]")] + [TestCase("HostName=value.azure-devices.net;SharedAccessKeyName=[value];SharedAccessKey=[value]")] + [TestCase("HostName=value.azure-devices.net;SharedAccessKeyName=[value];SharedAccessKey=[value];EntityPath=[value]")] + public void ValidateDetectsMissingConnectionStringInformation(string connectionString) + { + var properties = EventHubsConnectionStringProperties.Parse(connectionString); + Assert.That(() => properties.Validate(null, "Dummy"), Throws.ArgumentException.And.Message.StartsWith(Resources.MissingConnectionInformation)); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void ValidateDetectsMultipleEventHubNames() + { + var eventHubName = "myHub"; + var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=[unique_fake]"; + var properties = EventHubsConnectionStringProperties.Parse(fakeConnection); + + Assert.That(() => properties.Validate(eventHubName, "Dummy"), Throws.ArgumentException.And.Message.StartsWith(Resources.OnlyOneEventHubNameMayBeSpecified)); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void ValidateAllowsMultipleEventHubNamesIfEqual() + { + var eventHubName = "myHub"; + var fakeConnection = $"Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath={ eventHubName }"; + var properties = EventHubsConnectionStringProperties.Parse(fakeConnection); + + Assert.That(() => properties.Validate(eventHubName, "dummy"), Throws.Nothing, "Validation should accept the same Event Hub in multiple places."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + [TestCase("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real];EntityPath=[unique_fake];SharedAccessSignature=[not_real]")] + [TestCase("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;EntityPath=[unique_fake];SharedAccessSignature=[not_real]")] + [TestCase("Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKey=[not_real];EntityPath=[unique_fake];SharedAccessSignature=[not_real]")] + public void ValidateDetectsMultipleAuthorizationCredentials(string connectionString) + { + var properties = EventHubsConnectionStringProperties.Parse(connectionString); + Assert.That(() => properties.Validate(null, "Dummy"), Throws.ArgumentException.And.Message.StartsWith(Resources.OnlyOneSharedAccessAuthorizationMayBeSpecified)); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void ValidateAllowsSharedAccessKeyAuthorization() + { + var eventHubName = "myHub"; + var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessKeyName=DummyKey;SharedAccessKey=[not_real]"; + var properties = EventHubsConnectionStringProperties.Parse(fakeConnection); + + Assert.That(() => properties.Validate(eventHubName, "dummy"), Throws.Nothing, "Validation should accept the shared access key authorization."); + } + + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void ValidateAllowsSharedAccessSignatureAuthorization() + { + var eventHubName = "myHub"; + var fakeConnection = "Endpoint=sb://not-real.servicebus.windows.net/;SharedAccessSignature=[not_real]"; + var properties = EventHubsConnectionStringProperties.Parse(fakeConnection); + + Assert.That(() => properties.Validate(eventHubName, "dummy"), Throws.Nothing, "Validation should accept the shared access signature authorization."); + } + + /// + /// Compares two instances for + /// structural equality. + /// + /// + /// The first instance to consider. + /// The second instance to consider. + /// + /// true if the instances are equivalent; otherwise, false. + /// + private static bool PropertiesAreEquivalent(EventHubsConnectionStringProperties first, + EventHubsConnectionStringProperties second) + { + if (object.ReferenceEquals(first, second)) + { + return true; + } + + if ((first == null) || (second == null)) + { + return false; + } + + return string.Equals(first.Endpoint.AbsoluteUri, second.Endpoint.AbsoluteUri, StringComparison.OrdinalIgnoreCase) + && string.Equals(first.EventHubName, second.EventHubName, StringComparison.OrdinalIgnoreCase) + && string.Equals(first.SharedAccessSignature, second.SharedAccessSignature, StringComparison.OrdinalIgnoreCase) + && string.Equals(first.SharedAccessKeyName, second.SharedAccessKeyName, StringComparison.OrdinalIgnoreCase) + && string.Equals(first.SharedAccessKey, second.SharedAccessKey, StringComparison.OrdinalIgnoreCase); } /// - /// Gets the Event Hubs endpoint scheme used by the + /// Gets the Event Hubs endpoint scheme used by the /// using its private field. /// /// @@ -342,7 +625,7 @@ public void ParseConsidersMissingValuesAsMalformed(string connectionString) /// private static string GetEventHubsEndpointScheme() => (string) - typeof(ConnectionStringParser) + typeof(EventHubsConnectionStringProperties) .GetField("EventHubsEndpointScheme", BindingFlags.Static | BindingFlags.NonPublic) .GetValue(null); } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Constructor.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Constructor.cs index 729d984d09aa..cad94db00a7a 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Constructor.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Constructor.cs @@ -35,7 +35,8 @@ public static IEnumerable ConstructorCreatesDefaultOptionsCases() yield return new object[] { new MinimalProcessorMock(99, "consumerGroup", connectionString), "connection string with default options" }; yield return new object[] { new MinimalProcessorMock(99, "consumerGroup", connectionStringNoHub, "hub", default), "connection string with default options" }; - yield return new object[] { new MinimalProcessorMock(99, "consumerGroup", "namespace", "hub", credential, default(EventProcessorOptions)), "namespace with explicit null options" }; + yield return new object[] { new MinimalProcessorMock(99, "consumerGroup", "namespace", "hub", credential, default(EventProcessorOptions)), "token credential with explicit null options" }; + yield return new object[] { new MinimalProcessorMock(99, "consumerGroup", "namespace", "hub", new EventHubsSharedAccessKeyCredential("key", "value"), default(EventProcessorOptions)), "shared key credential with explicit null options" }; } /// @@ -51,7 +52,8 @@ public static IEnumerable ConstructorCreatesDefaultOptionsCases() public void ConstructorValidatesTheEventBatchMaximumCount(int constructorArgument) { Assert.That(() => new MinimalProcessorMock(constructorArgument, "dummyGroup", "dummyConnection", new EventProcessorOptions()), Throws.InstanceOf(), "The connection string constructor should validate the maximum batch size."); - Assert.That(() => new MinimalProcessorMock(constructorArgument, "dummyGroup", "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorOptions()), Throws.InstanceOf(), "The namespace constructor should validate the maximum batch size."); + Assert.That(() => new MinimalProcessorMock(constructorArgument, "dummyGroup", "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorOptions()), Throws.InstanceOf(), "The token credential constructor should validate the maximum batch size."); + Assert.That(() => new MinimalProcessorMock(constructorArgument, "dummyGroup", "dummyNamespace", "dummyEventHub", new EventHubsSharedAccessKeyCredential("key", "value"), new EventProcessorOptions()), Throws.InstanceOf(), "The shared key credential constructor should validate the maximum batch size."); } /// @@ -65,7 +67,8 @@ public void ConstructorValidatesTheEventBatchMaximumCount(int constructorArgumen public void ConstructorValidatesTheConsumerGroup(string constructorArgument) { Assert.That(() => new MinimalProcessorMock(1, constructorArgument, "dummyConnection", new EventProcessorOptions()), Throws.InstanceOf(), "The connection string constructor should validate the consumer group."); - Assert.That(() => new MinimalProcessorMock(1, constructorArgument, "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorOptions()), Throws.InstanceOf(), "The namespace constructor should validate the consumer group."); + Assert.That(() => new MinimalProcessorMock(1, constructorArgument, "dummyNamespace", "dummyEventHub", Mock.Of(), new EventProcessorOptions()), Throws.InstanceOf(), "The token credential constructor should validate the consumer group."); + Assert.That(() => new MinimalProcessorMock(1, constructorArgument, "dummyNamespace", "dummyEventHub", new EventHubsSharedAccessKeyCredential("key", "value"), new EventProcessorOptions()), Throws.InstanceOf(), "The shared key credential constructor should validate the consumer group."); } /// @@ -138,7 +141,8 @@ public void ConstructorAllowsMultipleEventHubNamesFromTheConnectionStringIfEqual [TestCase("sb://namespace.place.com")] public void ConstructorValidatesTheNamespace(string constructorArgument) { - Assert.That(() => new MinimalProcessorMock(1, EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", Mock.Of()), Throws.InstanceOf()); + Assert.That(() => new MinimalProcessorMock(1, EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", Mock.Of()), Throws.InstanceOf(), "The token credential constructor should validate."); + Assert.That(() => new MinimalProcessorMock(1, EventHubConsumerClient.DefaultConsumerGroupName, constructorArgument, "dummy", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should validate."); } /// @@ -151,7 +155,8 @@ public void ConstructorValidatesTheNamespace(string constructorArgument) [TestCase("")] public void ConstructorValidatesTheEventHub(string constructorArgument) { - Assert.That(() => new MinimalProcessorMock(100, EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, Mock.Of()), Throws.InstanceOf()); + Assert.That(() => new MinimalProcessorMock(100, EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, Mock.Of()), Throws.InstanceOf(), "The token credential constructor should validate."); + Assert.That(() => new MinimalProcessorMock(100, EventHubConsumerClient.DefaultConsumerGroupName, "namespace", constructorArgument, new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should validate."); } /// @@ -162,7 +167,8 @@ public void ConstructorValidatesTheEventHub(string constructorArgument) [Test] public void ConstructorValidatesTheCredential() { - Assert.That(() => new MinimalProcessorMock(5, EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException); + Assert.That(() => new MinimalProcessorMock(5, EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException, "The token credential constructor should validate."); + Assert.That(() => new MinimalProcessorMock(5, EventHubConsumerClient.DefaultConsumerGroupName, "namespace", "hubName", default(EventHubsSharedAccessKeyCredential)), Throws.ArgumentNullException, "The shared key credential constructor should validate."); } /// @@ -216,7 +222,7 @@ public void ConnectionStringConstructorClonesTheConnectionOptions() /// /// [Test] - public void NamespaceConstructorClonesTheConnectionOptions() + public void TokenCredentialConstructorClonesTheConnectionOptions() { var expectedTransportType = EventHubsTransportType.AmqpWebSockets; var otherTransportType = EventHubsTransportType.AmqpTcp; @@ -239,6 +245,35 @@ public void NamespaceConstructorClonesTheConnectionOptions() Assert.That(connectionOptions.TransportType, Is.EqualTo(expectedTransportType), $"The connection options should have been cloned."); } + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorClonesTheConnectionOptions() + { + var expectedTransportType = EventHubsTransportType.AmqpWebSockets; + var otherTransportType = EventHubsTransportType.AmqpTcp; + + var options = new EventProcessorOptions + { + ConnectionOptions = new EventHubConnectionOptions { TransportType = expectedTransportType } + }; + + var eventProcessor = new MinimalProcessorMock(11, "consumerGroup", "namespace", "hub", new EventHubsSharedAccessKeyCredential("key", "value"), options); + + // Simply retrieving the options from an inner connection won't be enough to prove the processor clones + // its connection options because the cloning step also happens in the EventHubConnection constructor. + // For this reason, we will change the transport type and verify that it won't affect the returned + // connection options. + + options.ConnectionOptions.TransportType = otherTransportType; + + var connectionOptions = GetConnectionOptions(eventProcessor); + Assert.That(connectionOptions.TransportType, Is.EqualTo(expectedTransportType), $"The connection options should have been cloned."); + } + /// /// Verifies functionality of the /// constructor. @@ -264,7 +299,7 @@ public void ConnectionStringConstructorSetsTheIdentifier() /// /// [Test] - public void NamespaceConstructorSetsTheIdentifier() + public void TokenCredentialConstructorSetsTheIdentifier() { var options = new EventProcessorOptions { @@ -277,6 +312,25 @@ public void NamespaceConstructorSetsTheIdentifier() Assert.That(eventProcessor.Identifier, Is.EqualTo(options.Identifier)); } + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheIdentifier() + { + var options = new EventProcessorOptions + { + Identifier = Guid.NewGuid().ToString() + }; + + var eventProcessor = new MinimalProcessorMock(65, "consumerGroup", "namespace", "hub", new EventHubsSharedAccessKeyCredential("key", "value"), options); + + Assert.That(eventProcessor.Identifier, Is.Not.Null); + Assert.That(eventProcessor.Identifier, Is.EqualTo(options.Identifier)); + } + /// /// Verifies functionality of the /// constructor. @@ -306,7 +360,7 @@ public void ConnectionStringConstructorCreatesTheIdentifierWhenNotSpecified(stri [Test] [TestCase(null)] [TestCase("")] - public void NamespaceConstructorCreatesTheIdentifierWhenNotSpecified(string identifier) + public void TokenCredentialConstructorCreatesTheIdentifierWhenNotSpecified(string identifier) { var options = new EventProcessorOptions { @@ -318,5 +372,26 @@ public void NamespaceConstructorCreatesTheIdentifierWhenNotSpecified(string iden Assert.That(eventProcessor.Identifier, Is.Not.Null); Assert.That(eventProcessor.Identifier, Is.Not.Empty); } + + /// + /// Verifies functionality of the + /// constructor. + /// + /// + [Test] + [TestCase(null)] + [TestCase("")] + public void SharedKeyCredentialConstructorCreatesTheIdentifierWhenNotSpecified(string identifier) + { + var options = new EventProcessorOptions + { + Identifier = identifier + }; + + var eventProcessor = new MinimalProcessorMock(665, "consumerGroup", "namespace", "hub", new EventHubsSharedAccessKeyCredential("key", "value"), options); + + Assert.That(eventProcessor.Identifier, Is.Not.Null); + Assert.That(eventProcessor.Identifier, Is.Not.Empty); + } } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Infrastructure.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Infrastructure.cs index d5b7b62541f4..f584ac2f24f1 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Infrastructure.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.Infrastructure.cs @@ -189,7 +189,7 @@ public async Task ProcessorStorageManagerDelegatesCalls() .Callback(() => claimOwnershipDelegated = true) .Returns(Task.FromResult(default(IEnumerable))); - var storageManager = mockProcessor.Object.CreateStorageManager(mockProcessor.Object); + var storageManager = EventProcessor.CreateStorageManager(mockProcessor.Object); Assert.That(storageManager, Is.Not.Null, "The storage manager should have been created."); await storageManager.ListCheckpointsAsync("na", "na", "na", CancellationToken.None); @@ -215,7 +215,7 @@ public void ProcessorStorageManagerDoesNotAllowCheckpointUpdate() var consumerGroup = "cg"; var mockProcessor = new Mock>(25, consumerGroup, fqNamespace, eventHub, Mock.Of(), default(EventProcessorOptions)) { CallBase = true }; - var storageManager = mockProcessor.Object.CreateStorageManager(mockProcessor.Object); + var storageManager = EventProcessor.CreateStorageManager(mockProcessor.Object); Assert.That(storageManager, Is.Not.Null, "The storage manager should have been created."); Assert.That(() => storageManager.UpdateCheckpointAsync(new EventProcessorCheckpoint(), new EventData(Array.Empty()), CancellationToken.None), Throws.InstanceOf(), "Calling to update checkpoints should not be implemented."); diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.cs index 8663238d222e..4bcd36917a3f 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/EventProcessorTests.cs @@ -123,6 +123,13 @@ public MinimalProcessorMock(int eventBatchMaximumCount, string eventHubName, EventProcessorOptions options = default) : base(eventBatchMaximumCount, consumerGroup, connectionString, eventHubName, options) { } + public MinimalProcessorMock(int eventBatchMaximumCount, + string consumerGroup, + string fullyQualifiedNamespace, + string eventHubName, + EventHubsSharedAccessKeyCredential credential, + EventProcessorOptions options = default) : base(eventBatchMaximumCount, consumerGroup, fullyQualifiedNamespace, eventHubName, credential, options) { } + public MinimalProcessorMock(int eventBatchMaximumCount, string consumerGroup, string fullyQualifiedNamespace, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs old mode 100755 new mode 100644 index 193e5524c6db..faeec6a5cd49 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverLiveTests.cs @@ -390,6 +390,43 @@ public async Task ReceiverCanReadEventsUsingAnIdentityCredential() } } + /// + /// Verifies that the is able to + /// connect to the Event Hubs service and perform operations. + /// + /// + [Test] + public async Task ReceiverCanReadEventsUsingTheSharedKeyCredential() + { + await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) + { + using var cancellationSource = new CancellationTokenSource(); + cancellationSource.CancelAfter(EventHubsTestEnvironment.Instance.TestExecutionTimeLimit); + + var credential = new EventHubsSharedAccessKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); + var sourceEvents = EventGenerator.CreateEvents(50).ToList(); + + var connectionString = EventHubsTestEnvironment.Instance.BuildConnectionStringForEventHub(scope.EventHubName); + var partition = (await QueryPartitionsAsync(connectionString, cancellationSource.Token)).First(); + await SendEventsAsync(connectionString, sourceEvents, new CreateBatchOptions { PartitionId = partition }, cancellationSource.Token); + + await using (var receiver = new PartitionReceiver(EventHubConsumerClient.DefaultConsumerGroupName, partition, EventPosition.Earliest, EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + { + var readState = await ReadEventsAsync(receiver, sourceEvents.Count, cancellationSource.Token); + Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled."); + + foreach (var sourceEvent in sourceEvents) + { + var sourceId = sourceEvent.Properties[EventGenerator.IdPropertyName].ToString(); + Assert.That(readState.Events.TryGetValue(sourceId, out var readEvent), Is.True, $"The event with custom identifier [{ sourceId }] was not processed."); + Assert.That(sourceEvent.IsEquivalentTo(readEvent), $"The event with custom identifier [{ sourceId }] did not match the corresponding processed event."); + } + } + + cancellationSource.Cancel(); + } + } + /// /// Verifies that the is able to /// connect to the Event Hubs service and perform operations. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverTests.cs index 96a05ff3dd5e..1b12a65b30c4 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Primitives/PartitionReceiverTests.cs @@ -35,7 +35,8 @@ public void ConstructorValidatesTheConsumerGroup(string consumerGroup) { Assert.That(() => new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "cs"), Throws.InstanceOf(), "The connection string constructor without event hub should perform validation."); Assert.That(() => new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "cs", "eh"), Throws.InstanceOf(), "The connection string constructor with event hub should perform validation."); - Assert.That(() => new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "fqns", "eh", Mock.Of()), Throws.InstanceOf(), "The namespace constructor should perform validation."); + Assert.That(() => new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "fqns", "eh", Mock.Of()), Throws.InstanceOf(), "The token credential constructor should perform validation."); + Assert.That(() => new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should perform validation."); Assert.That(() => new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, Mock.Of()), Throws.InstanceOf(), "The connection constructor should perform validation."); } @@ -50,7 +51,8 @@ public void ConstructorValidatesThePartitionId(string partitionId) { Assert.That(() => new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "cs"), Throws.InstanceOf(), "The connection string constructor without event hub should perform validation."); Assert.That(() => new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "cs", "eh"), Throws.InstanceOf(), "The connection string constructor with event hub should perform validation."); - Assert.That(() => new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "fqns", "eh", Mock.Of()), Throws.InstanceOf(), "The namespace constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "fqns", "eh", Mock.Of()), Throws.InstanceOf(), "The token credential constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should perform validation."); Assert.That(() => new PartitionReceiver("cg", partitionId, EventPosition.Earliest, Mock.Of()), Throws.InstanceOf(), "The connection constructor should perform validation."); } @@ -77,7 +79,8 @@ public void ConstructorValidatesTheConnectionString(string connectionString) [TestCase("amqps://namespace.windows.servicebus.net")] public void ConstructorValidatesTheFullyQualifiedNamespace(string fullyQualifiedNamespace) { - Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, fullyQualifiedNamespace, "eh", Mock.Of()), Throws.InstanceOf(), "The constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, fullyQualifiedNamespace, "eh", Mock.Of()), Throws.InstanceOf(), "The token credential constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, fullyQualifiedNamespace, "eh", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should perform validation."); } /// @@ -89,7 +92,8 @@ public void ConstructorValidatesTheFullyQualifiedNamespace(string fullyQualified [TestCase("")] public void ConstructorValidatesTheEventHubName(string eventHubName) { - Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", eventHubName, Mock.Of()), Throws.InstanceOf(), "The constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", eventHubName, Mock.Of()), Throws.InstanceOf(), "The token credential constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", eventHubName, new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should perform validation."); } /// @@ -99,7 +103,8 @@ public void ConstructorValidatesTheEventHubName(string eventHubName) [Test] public void ConstructorValidatesTheCredential() { - Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", "eh", default(TokenCredential)), Throws.InstanceOf(), "The constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", "eh", default(TokenCredential)), Throws.InstanceOf(), "The token credential constructor should perform validation."); + Assert.That(() => new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", "eh", default(EventHubsSharedAccessKeyCredential)), Throws.InstanceOf(), "The shared key credential constructor should perform validation."); } /// @@ -132,7 +137,7 @@ public void ConnectionStringConstructorSetsTheRetryPolicy() /// /// [Test] - public void ExpandedConstructorSetsTheRetryPolicy() + public void TokenCredentialConstructorSetsTheRetryPolicy() { var expected = Mock.Of(); var options = new PartitionReceiverOptions { RetryOptions = new EventHubsRetryOptions { CustomRetryPolicy = expected } }; @@ -141,6 +146,20 @@ public void ExpandedConstructorSetsTheRetryPolicy() Assert.That(GetRetryPolicy(receiver), Is.SameAs(expected)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheRetryPolicy() + { + var expected = Mock.Of(); + var options = new PartitionReceiverOptions { RetryOptions = new EventHubsRetryOptions { CustomRetryPolicy = expected } }; + var receiver = new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value"), options); + + Assert.That(GetRetryPolicy(receiver), Is.SameAs(expected)); + } + /// /// Verifies functionality of the constructor. /// @@ -175,7 +194,7 @@ public void ConnectionStringConstructorSetsTheDefaultMaximumWaitTime() /// /// [Test] - public void ExpandedConstructorSetsTheDefaultMaximumWaitTime() + public void TokenCredentialConstructorSetsTheDefaultMaximumWaitTime() { var expected = TimeSpan.FromMinutes(1); var options = new PartitionReceiverOptions { DefaultMaximumReceiveWaitTime = expected }; @@ -184,6 +203,20 @@ public void ExpandedConstructorSetsTheDefaultMaximumWaitTime() Assert.That(GetDefaultMaximumWaitTime(receiver), Is.EqualTo(expected)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheDefaultMaximumWaitTime() + { + var expected = TimeSpan.FromMinutes(1); + var options = new PartitionReceiverOptions { DefaultMaximumReceiveWaitTime = expected }; + var receiver = new PartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value"), options); + + Assert.That(GetDefaultMaximumWaitTime(receiver), Is.EqualTo(expected)); + } + /// /// Verifies functionality of the constructor. /// @@ -231,7 +264,7 @@ public void ConnectionStringConstructorCreatesTheTransportConsumer() /// /// [Test] - public void ExpandedConstructorCreatesTheTransportConsumer() + public void TokenCredentialConstructorCreatesTheTransportConsumer() { var expectedRetryPolicy = Mock.Of(); var expectedOptions = new PartitionReceiverOptions @@ -253,6 +286,33 @@ public void ExpandedConstructorCreatesTheTransportConsumer() Assert.That(receiver.TransportConsumerCreatedWithOptions.PrefetchCount, Is.EqualTo(expectedOptions.PrefetchCount), "The constructor should have used the correct prefetch count."); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorCreatesTheTransportConsumer() + { + var expectedRetryPolicy = Mock.Of(); + var expectedOptions = new PartitionReceiverOptions + { + RetryOptions = new EventHubsRetryOptions { CustomRetryPolicy = expectedRetryPolicy }, + OwnerLevel = 99, + PrefetchCount = 42, + TrackLastEnqueuedEventProperties = false + }; + var receiver = new ObservableConsumerPartitionReceiver("cg", "pid", EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value"), expectedOptions); + + Assert.That(receiver.TransportConsumerCreatedWithConsumerGroup, Is.EqualTo(receiver.ConsumerGroup), "The constructor should have used the correct consumer group."); + Assert.That(receiver.TransportConsumerCreatedWithPartitionId, Is.EqualTo(receiver.PartitionId), "The constructor should have used the correct partition id."); + Assert.That(receiver.TransportConsumerCreatedWithEventPosition, Is.EqualTo(receiver.InitialPosition), "The constructor should have used the correct initial position."); + Assert.That(receiver.TransportConsumerCreatedWithRetryPolicy, Is.SameAs(expectedRetryPolicy), "The constructor should have used the correct retry policy."); + Assert.That(receiver.TransportConsumerCreatedWithOptions, Is.Not.SameAs(expectedOptions), "The constructor should have cloned the options."); + Assert.That(receiver.TransportConsumerCreatedWithOptions.TrackLastEnqueuedEventProperties, Is.EqualTo(expectedOptions.TrackLastEnqueuedEventProperties), "The constructor should have used the correct track last enqueued event properties."); + Assert.That(receiver.TransportConsumerCreatedWithOptions.OwnerLevel, Is.EqualTo(expectedOptions.OwnerLevel), "The constructor should have used the correct owner level."); + Assert.That(receiver.TransportConsumerCreatedWithOptions.PrefetchCount, Is.EqualTo(expectedOptions.PrefetchCount), "The constructor should have used the correct prefetch count."); + } + /// /// Verifies functionality of the constructor. /// @@ -360,7 +420,7 @@ public void ConnectionStringConstructorSetsTheConsumerGroup() /// /// [Test] - public void ExpandedConstructorSetsTheConsumerGroup() + public void TokenCredentialConstructorSetsTheConsumerGroup() { var consumerGroup = "SomeGroup"; var receiver = new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "fqns", "eh", Mock.Of()); @@ -368,6 +428,19 @@ public void ExpandedConstructorSetsTheConsumerGroup() Assert.That(receiver.ConsumerGroup, Is.EqualTo(consumerGroup)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheConsumerGroup() + { + var consumerGroup = "SomeGroup"; + var receiver = new PartitionReceiver(consumerGroup, "pid", EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value")); + + Assert.That(receiver.ConsumerGroup, Is.EqualTo(consumerGroup)); + } + /// /// Verifies functionality of the constructor. /// @@ -400,7 +473,7 @@ public void ConnectionStringConstructorSetsThePartitionId() /// /// [Test] - public void ExpandedConstructorSetsThePartitionId() + public void TokenCredentialConstructorSetsThePartitionId() { var partitionId = "partitionId"; var receiver = new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "fqns", "eh", Mock.Of()); @@ -408,6 +481,19 @@ public void ExpandedConstructorSetsThePartitionId() Assert.That(receiver.PartitionId, Is.EqualTo(partitionId)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsThePartitionId() + { + var partitionId = "partitionId"; + var receiver = new PartitionReceiver("cg", partitionId, EventPosition.Earliest, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value")); + + Assert.That(receiver.PartitionId, Is.EqualTo(partitionId)); + } + /// /// Verifies functionality of the constructor. /// @@ -440,7 +526,7 @@ public void ConnectionStringConstructorSetsTheInitialPosition() /// /// [Test] - public void ExpandedConstructorSetsTheInitialPosition() + public void TokenCredentialConstructorSetsTheInitialPosition() { var expectedPosition = EventPosition.FromOffset(999); var receiver = new PartitionReceiver("cg", "pid", expectedPosition, "fqns", "eh", Mock.Of()); @@ -448,6 +534,19 @@ public void ExpandedConstructorSetsTheInitialPosition() Assert.That(receiver.InitialPosition, Is.EqualTo(expectedPosition)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheInitialPosition() + { + var expectedPosition = EventPosition.FromOffset(999); + var receiver = new PartitionReceiver("cg", "pid", expectedPosition, "fqns", "eh", new EventHubsSharedAccessKeyCredential("key", "value")); + + Assert.That(receiver.InitialPosition, Is.EqualTo(expectedPosition)); + } + /// /// Verifies functionality of the constructor. /// @@ -1292,7 +1391,8 @@ public ObservableConsumerPartitionReceiver(string consumerGroup, EventPosition eventPosition, string fullyQualifiedNamespace, string eventHubName, - TokenCredential credential) : base(consumerGroup, partitionId, eventPosition, fullyQualifiedNamespace, eventHubName, credential) + EventHubsSharedAccessKeyCredential credential, + PartitionReceiverOptions options = default) : base(consumerGroup, partitionId, eventPosition, fullyQualifiedNamespace, eventHubName, credential, options) { } @@ -1302,7 +1402,7 @@ public ObservableConsumerPartitionReceiver(string consumerGroup, string fullyQualifiedNamespace, string eventHubName, TokenCredential credential, - PartitionReceiverOptions options) : base(consumerGroup, partitionId, eventPosition, fullyQualifiedNamespace, eventHubName, credential, options) + PartitionReceiverOptions options = default) : base(consumerGroup, partitionId, eventPosition, fullyQualifiedNamespace, eventHubName, credential, options) { } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs old mode 100755 new mode 100644 index b468103bd8e2..b5c2c651f598 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientLiveTests.cs @@ -451,6 +451,34 @@ public async Task ProducerCanSendAnEventBatchUsingAnIdentityCredential() } } + /// + /// Verifies that the is able to + /// connect to the Event Hubs service and perform operations. + /// + /// + [Test] + public async Task ProducerCanSendAnEventBatchUsingTheSharedKeyCredential() + { + await using (EventHubScope scope = await EventHubScope.CreateAsync(1)) + { + var credential = new EventHubsSharedAccessKeyCredential(EventHubsTestEnvironment.Instance.SharedAccessKeyName, EventHubsTestEnvironment.Instance.SharedAccessKey); + + await using (var producer = new EventHubProducerClient(EventHubsTestEnvironment.Instance.FullyQualifiedNamespace, scope.EventHubName, credential)) + { + using EventDataBatch batch = await producer.CreateBatchAsync(); + + batch.TryAdd(new EventData(Encoding.UTF8.GetBytes("This is a message"))); + batch.TryAdd(new EventData(Encoding.UTF8.GetBytes("This is another message"))); + batch.TryAdd(new EventData(Encoding.UTF8.GetBytes("So many messages"))); + batch.TryAdd(new EventData(Encoding.UTF8.GetBytes("Event more messages"))); + batch.TryAdd(new EventData(Encoding.UTF8.GetBytes("Will it ever stop?"))); + + Assert.That(batch.Count, Is.EqualTo(5), "The batch should contain all 5 events."); + Assert.That(async () => await producer.SendAsync(batch), Throws.Nothing); + } + } + } + /// /// Verifies that the is able to /// connect to the Event Hubs service and perform operations. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs index 9274eabe5c4e..406f64638a7d 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/EventHubProducerClientTests.cs @@ -94,7 +94,8 @@ public void ConstructorAllowsMultipleEventHubNamesFromTheConnectionStringIfEqual public void ConstructorValidatesTheNamespace(string constructorArgument) { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); - Assert.That(() => new EventHubProducerClient(constructorArgument, "dummy", credential.Object), Throws.InstanceOf()); + Assert.That(() => new EventHubProducerClient(constructorArgument, "dummy", credential.Object), Throws.InstanceOf(), "The token credential constructor should validate."); + Assert.That(() => new EventHubProducerClient(constructorArgument, "dummy", new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should validate."); } /// @@ -107,7 +108,8 @@ public void ConstructorValidatesTheNamespace(string constructorArgument) public void ConstructorValidatesTheEventHub(string constructorArgument) { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); - Assert.That(() => new EventHubProducerClient("namespace", constructorArgument, credential.Object), Throws.InstanceOf()); + Assert.That(() => new EventHubProducerClient("namespace", constructorArgument, credential.Object), Throws.InstanceOf(), "The token credential constructor should validate."); + Assert.That(() => new EventHubProducerClient("namespace", constructorArgument, new EventHubsSharedAccessKeyCredential("key", "value")), Throws.InstanceOf(), "The shared key credential constructor should validate."); } /// @@ -117,7 +119,8 @@ public void ConstructorValidatesTheEventHub(string constructorArgument) [Test] public void ConstructorValidatesTheCredential() { - Assert.That(() => new EventHubProducerClient("namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException); + Assert.That(() => new EventHubProducerClient("namespace", "hubName", default(TokenCredential)), Throws.ArgumentNullException, "The token credential constructor should validate."); + Assert.That(() => new EventHubProducerClient("namespace", "hubName", default(EventHubsSharedAccessKeyCredential)), Throws.ArgumentNullException, "The sharedKey credential constructor should validate."); } /// @@ -150,7 +153,7 @@ public void ConnectionStringConstructorSetsTheRetryPolicy() /// /// [Test] - public void ExpandedConstructorSetsTheRetryPolicy() + public void TokenCredentialConstructorSetsTheRetryPolicy() { var expected = Mock.Of(); var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); @@ -160,6 +163,21 @@ public void ExpandedConstructorSetsTheRetryPolicy() Assert.That(GetRetryPolicy(producer), Is.SameAs(expected)); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentialConstructorSetsTheRetryPolicy() + { + var expected = Mock.Of(); + var credential = new EventHubsSharedAccessKeyCredential("key", "value"); + var options = new EventHubProducerClientOptions { RetryOptions = new EventHubsRetryOptions { CustomRetryPolicy = expected } }; + var producer = new EventHubProducerClient("namespace", "eventHub", credential, options); + + Assert.That(GetRetryPolicy(producer), Is.SameAs(expected)); + } + /// /// Verifies functionality of the constructor. /// @@ -199,7 +217,7 @@ public void ConnectionStringConstructorCreatesDefaultOptions() /// /// [Test] - public void ExpandedConstructorCreatesDefaultOptions() + public void TokenCredentailsConstructorCreatesDefaultOptions() { var credential = new Mock(Mock.Of(), "{namespace}.servicebus.windows.net"); var expected = new EventHubProducerClientOptions().RetryOptions; @@ -213,6 +231,25 @@ public void ExpandedConstructorCreatesDefaultOptions() Assert.That(actual.IsEquivalentTo(expected), Is.True, "The default retry policy should be based on the default retry options."); } + /// + /// Verifies functionality of the constructor. + /// + /// + [Test] + public void SharedKeyCredentailsConstructorCreatesDefaultOptions() + { + var credential = new EventHubsSharedAccessKeyCredential("key", "value"); + var expected = new EventHubProducerClientOptions().RetryOptions; + var producer = new EventHubProducerClient("namespace", "eventHub", credential); + + var policy = GetRetryPolicy(producer); + Assert.That(policy, Is.Not.Null, "There should have been a retry policy set."); + Assert.That(policy, Is.InstanceOf(), "The default retry policy should be a basic policy."); + + var actual = ((BasicRetryPolicy)policy).Options; + Assert.That(actual.IsEquivalentTo(expected), Is.True, "The default retry policy should be based on the default retry options."); + } + /// /// Verifies functionality of the constructor. /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs index de7d0d2e605f..faf133b69354 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Producer/IdempotentPublishingLiveTests.cs @@ -8,7 +8,7 @@ using Azure.Messaging.EventHubs.Producer; using NUnit.Framework; -namespace Azure.Messaging.EventHubs.Tests.Producer +namespace Azure.Messaging.EventHubs.Tests { /// /// The suite of live tests for the idempotent publishing feature of the From cfabd4dfb13cad57d9f5f15ed6685b9135370616 Mon Sep 17 00:00:00 2001 From: kinelski Date: Fri, 23 Oct 2020 11:12:22 -0700 Subject: [PATCH 09/28] [MetricsAdvisor] Apply renames for cross-language consistency (#16198) * Renamed MetricDimension to DataFeedDimension * Renamed DataAnomaly to DataPointAnomaly * Renamed IncidentStatus to AnomalyIncidentStatus * Renamed AlertingHook to NotificationHook * Renamed EmailHook to EmailNotificationHook * Renamed WebHook to WebNotificationHook * Renamed TimeMode to AlertQueryTimeMode --- .../Azure.AI.MetricsAdvisor/CHANGELOG.md | 5 + .../Azure.AI.MetricsAdvisor/README.md | 42 ++--- .../Azure.AI.MetricsAdvisor.netstandard2.0.cs | 164 +++++++++--------- ...etricsAdvisorRestAPIOpenAPIV2RestClient.cs | 18 +- .../Generated/Models/AlertQueryTimeMode.cs | 47 +++++ .../Generated/Models/AlertingResultQuery.cs | 4 +- .../Generated/Models/AnomalyIncidentStatus.cs | 52 ++++++ .../Models/AnomalyResultList.Serialization.cs | 6 +- .../src/Generated/Models/AnomalyResultList.cs | 6 +- ...plicationInsightsDataFeed.Serialization.cs | 6 +- .../AzureApplicationInsightsDataFeed.cs | 2 +- .../Models/AzureBlobDataFeed.Serialization.cs | 6 +- .../src/Generated/Models/AzureBlobDataFeed.cs | 2 +- .../AzureCosmosDBDataFeed.Serialization.cs | 6 +- .../Generated/Models/AzureCosmosDBDataFeed.cs | 2 +- ...AzureDataExplorerDataFeed.Serialization.cs | 6 +- .../Models/AzureDataExplorerDataFeed.cs | 2 +- ...taLakeStorageGen2DataFeed.Serialization.cs | 6 +- .../AzureDataLakeStorageGen2DataFeed.cs | 2 +- .../AzureTableDataFeed.Serialization.cs | 6 +- .../Generated/Models/AzureTableDataFeed.cs | 2 +- .../Models/DataFeedDetail.Serialization.cs | 6 +- ....cs => DataFeedDimension.Serialization.cs} | 6 +- ...etricDimension.cs => DataFeedDimension.cs} | 6 +- ...n.cs => DataPointAnomaly.Serialization.cs} | 6 +- .../{DataAnomaly.cs => DataPointAnomaly.cs} | 2 +- .../ElasticsearchDataFeed.Serialization.cs | 6 +- .../Generated/Models/ElasticsearchDataFeed.cs | 2 +- ...=> EmailNotificationHook.Serialization.cs} | 6 +- ...{EmailHook.cs => EmailNotificationHook.cs} | 2 +- .../Models/HookList.Serialization.cs | 6 +- .../src/Generated/Models/HookList.cs | 6 +- .../HttpRequestDataFeed.Serialization.cs | 6 +- .../Generated/Models/HttpRequestDataFeed.cs | 2 +- .../Models/IncidentProperty.Serialization.cs | 4 +- .../src/Generated/Models/IncidentProperty.cs | 4 +- .../src/Generated/Models/IncidentStatus.cs | 52 ------ .../Models/InfluxDBDataFeed.Serialization.cs | 6 +- .../src/Generated/Models/InfluxDBDataFeed.cs | 2 +- .../Models/MongoDBDataFeed.Serialization.cs | 6 +- .../src/Generated/Models/MongoDBDataFeed.cs | 2 +- .../Models/MySqlDataFeed.Serialization.cs | 6 +- .../src/Generated/Models/MySqlDataFeed.cs | 2 +- ...n.cs => NotificationHook.Serialization.cs} | 10 +- .../{AlertingHook.cs => NotificationHook.cs} | 6 +- .../PostgreSqlDataFeed.Serialization.cs | 6 +- .../Generated/Models/PostgreSqlDataFeed.cs | 2 +- .../Models/SQLServerDataFeed.Serialization.cs | 6 +- .../src/Generated/Models/SQLServerDataFeed.cs | 2 +- .../src/Generated/Models/TimeMode.cs | 47 ----- ...s => WebNotificationHook.Serialization.cs} | 6 +- .../{WebHook.cs => WebNotificationHook.cs} | 2 +- .../src/MetricsAdvisorAdministrationClient.cs | 104 +++++------ .../src/MetricsAdvisorClient.cs | 48 ++--- .../AnomalyAlert/AnomalyAlertConfiguration.cs | 4 +- .../Models/AnomalyAlert/GetAlertsOptions.cs | 4 +- .../{DataAnomaly.cs => DataPointAnomaly.cs} | 10 +- .../src/Models/AnomalyIncident.cs | 6 +- ...dentStatus.cs => AnomalyIncidentStatus.cs} | 6 +- .../{TimeMode.cs => AlertQueryTimeMode.cs} | 11 +- .../src/Models/CodeGen/AnomalyStatus.cs | 2 +- .../src/Models/CodeGen/DataFeedDetail.cs | 8 +- .../src/Models/DataFeed/DataFeedSchema.cs | 6 +- ...etricDimension.cs => DataFeedDimension.cs} | 8 +- ...{EmailHook.cs => EmailNotificationHook.cs} | 10 +- .../{AlertingHook.cs => NotificationHook.cs} | 10 +- .../{WebHook.cs => WebNotificationHook.cs} | 10 +- ...icsAdvisorAdministrationClientLiveTests.cs | 10 +- .../tests/MetricsAdvisorClientLiveTests.cs | 6 +- .../Sample01_DataFeedCrudOperations.cs | 8 +- .../Samples/Sample04_HookCrudOperations.cs | 20 +-- .../Samples/Sample06_QueryTriggeredAlerts.cs | 2 +- .../Sample07_QueryDetectedAnomalies.cs | 4 +- .../HookOperations.json | 162 ++++++++--------- .../HookOperationsAsync.json | 162 ++++++++--------- 75 files changed, 627 insertions(+), 619 deletions(-) create mode 100644 sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertQueryTimeMode.cs create mode 100644 sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyIncidentStatus.cs rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{MetricDimension.Serialization.cs => DataFeedDimension.Serialization.cs} (84%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{MetricDimension.cs => DataFeedDimension.cs} (71%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{DataAnomaly.Serialization.cs => DataPointAnomaly.Serialization.cs} (89%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{DataAnomaly.cs => DataPointAnomaly.cs} (87%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{EmailHook.Serialization.cs => EmailNotificationHook.Serialization.cs} (90%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{EmailHook.cs => EmailNotificationHook.cs} (81%) delete mode 100644 sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentStatus.cs rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{AlertingHook.Serialization.cs => NotificationHook.Serialization.cs} (86%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{AlertingHook.cs => NotificationHook.cs} (76%) delete mode 100644 sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/TimeMode.cs rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{WebHook.Serialization.cs => WebNotificationHook.Serialization.cs} (91%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/{WebHook.cs => WebNotificationHook.cs} (82%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/{DataAnomaly.cs => DataPointAnomaly.cs} (85%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/{IncidentStatus.cs => AnomalyIncidentStatus.cs} (68%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/{TimeMode.cs => AlertQueryTimeMode.cs} (64%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/{MetricDimension.cs => DataFeedDimension.cs} (79%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/{EmailHook.cs => EmailNotificationHook.cs} (76%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/{AlertingHook.cs => NotificationHook.cs} (73%) rename sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/{WebHook.cs => WebNotificationHook.cs} (87%) diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md index 11a94f57f098..111c8578c402 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md @@ -7,6 +7,11 @@ - In `MetricsAdvisorAdministrationClient`, changed return types of sync and async methods `GetAnomalyAlertConfigurations` and `GetMetricAnomalyDetectionConfigurations` to pageables. - In `MetricsAdvisorAdministrationClient`, renamed parameter `alertConfigurationId` to `detectionConfigurationId` in sync and async `GetAnomalyAlertConfigurations` methods. - In `MetricEnrichedSeriesData`, made elements of `ExpectedValues`, `Periods`, `IsAnomaly`, `LowerBoundaries` and `UpperBoundaries` nullables. +- Renamed `MetricDimension` to `DataFeedDimension`. +- Renamed `DataAnomaly` to `DataPointAnomaly`. +- Renamed `IncidentStatus` to `AnomalyIncidentStatus`. +- Renamed `AlertingHook`, `EmailHook`, and `WebHook` to `NotificationHook`, `EmailNotificationHook`, and `WebNotificationHook`, respectively. +- Renamed `TimeMode` to `AlertQueryTimeMode`. ## 1.0.0-beta.1 (2020-10-08) diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md index 3875ee81c37e..ccddf1943501 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md @@ -113,31 +113,31 @@ A `DataFeed` ingests data from your data source, such as CosmosDB or a SQL serve A `DataFeedMetric`, or simply "metric", is a quantifiable measure to be monitored by the Metrics Advisor service. It could be the cost of a product over the months, or even a daily measure of temperature. The service will monitor how this value varies over time in search of any anomalous behavior. A [data feed](#data-feed) can ingest multiple metrics from the same data source. -### Metric Dimension +### Data Feed Dimension -A `MetricDimension`, or simply "dimension", is a set of categorical values that characterize a [metric](#data-feed-metric). For instance, if a metric represents the cost of a product, the type of product (e.g., shoes, hats) and the city in which these values were measured (e.g., New York, Tokyo) could be used as a dimension. Possible dimension values would include: `(shoes, New York)`, `(shoes, Tokyo)`, `(hats, New York)`, and `(hats, Tokyo)`. +A `DataFeedDimension`, or simply "dimension", is a set of categorical values that characterize a [metric](#data-feed-metric). For instance, if a metric represents the cost of a product, the type of product (e.g., shoes, hats) and the city in which these values were measured (e.g., New York, Tokyo) could be used as a dimension. Possible dimension values would include: `(shoes, New York)`, `(shoes, Tokyo)`, `(hats, New York)`, and `(hats, Tokyo)`. ### Time Series A time series is a series of data points indexed in time order. These data points describe the variation of the value of a [metric](#data-feed-metric) over time. -Given a metric, the Metrics Advisor service creates one series for every possible [dimension](#metric-dimension) value, which means that multiple time series can be monitored for the same metric. +Given a metric, the Metrics Advisor service creates one series for every possible [dimension](#data-feed-dimension) value, which means that multiple time series can be monitored for the same metric. -### Data Anomaly +### Data Point Anomaly -A `DataAnomaly`, or simply "anomaly", occurs when a data point in a [time series](#time-series) behaves unexpectedly. It may occur when a data point value is too high or too low, or when its value changes abruptly between close points. You can specify the conditions a data point must satisfy to be considered an anomaly with an `AnomalyDetectionConfiguration`. See the sample [Create an anomaly detection configuration](#create-an-anomaly-detection-configuration) below for more information. +A `DataPointAnomaly`, or simply "anomaly", occurs when a data point in a [time series](#time-series) behaves unexpectedly. It may occur when a data point value is too high or too low, or when its value changes abruptly between close points. You can specify the conditions a data point must satisfy to be considered an anomaly with an `AnomalyDetectionConfiguration`. See the sample [Create an anomaly detection configuration](#create-an-anomaly-detection-configuration) below for more information. ### Anomaly Incident -Detected [anomalies](#data-anomaly) within the same [time series](#time-series) can be grouped into an `AnomalyIncident`, or simply "incident". The service looks for patterns across anomalies to determine which ones are likely to have the same cause, grouping them together. +Detected [anomalies](#data-point-anomaly) within the same [time series](#time-series) can be grouped into an `AnomalyIncident`, or simply "incident". The service looks for patterns across anomalies to determine which ones are likely to have the same cause, grouping them together. ### Anomaly Alert -An `AnomalyAlert`, or simply "alert", is triggered when a detected [anomaly](#data-anomaly) meets a specified criteria. For instance, an alert could be triggered every time an anomaly with high severity is detected. You can specify the conditions an anomaly must satisfy to trigger an alert with an `AnomalyAlertConfiguration`, which make use of [hooks](#alerting-hook) to send notifications to the concerned parties every time an alert is triggered. These configurations are not set by default, so you need to create one in order to start triggering and receiving alerts. See the sample [Create an anomaly alert configuration](#create-an-anomaly-alert-configuration) below for more information. +An `AnomalyAlert`, or simply "alert", is triggered when a detected [anomaly](#data-point-anomaly) meets a specified criteria. For instance, an alert could be triggered every time an anomaly with high severity is detected. You can specify the conditions an anomaly must satisfy to trigger an alert with an `AnomalyAlertConfiguration`, which make use of [hooks](#notification-hook) to send notifications to the concerned parties every time an alert is triggered. These configurations are not set by default, so you need to create one in order to start triggering and receiving alerts. See the sample [Create an anomaly alert configuration](#create-an-anomaly-alert-configuration) below for more information. -### Alerting Hook +### Notification Hook -An `AlertingHook`, or simply "hook", is a means of subscribing to [alerts](#anomaly-alert) notifications. You can pass a hook to an `AnomalyAlertConfiguration` and start getting notifications for every alert it creates. See the sample [Create a hook for receiving anomaly alerts](#create-a-hook-for-receiving-anomaly-alerts) below for more information. +A `NotificationHook`, or simply "hook", is a means of subscribing to [alerts](#anomaly-alert) notifications. You can pass a hook to an `AnomalyAlertConfiguration` and start getting notifications for every alert it creates. See the sample [Create a hook for receiving anomaly alerts](#create-a-hook-for-receiving-anomaly-alerts) below for more information. ## Examples @@ -167,10 +167,10 @@ var dataFeedMetrics = new List() new DataFeedMetric("cost"), new DataFeedMetric("revenue") }; -var dataFeedDimensions = new List() +var dataFeedDimensions = new List() { - new MetricDimension("category"), - new MetricDimension("city") + new DataFeedDimension("category"), + new DataFeedDimension("city") }; var dataFeedSchema = new DataFeedSchema(dataFeedMetrics) { @@ -188,7 +188,7 @@ DataFeed dataFeed = response.Value; Console.WriteLine($"Data feed ID: {dataFeed.Id}"); ``` -Note that only the ID of the data feed is known at this point. You can performa another service call to `GetDataFeedAsync` or `GetDataFeed` to get more information, such as status, created time, the list of administrators, or the metric IDs. +Note that only the ID of the data feed is known at this point. You can perform another service call to `GetDataFeedAsync` or `GetDataFeed` to get more information, such as status, created time, the list of administrators, or the metric IDs. ```C# Snippet:GetDataFeedAsync string dataFeedId = ""; @@ -249,7 +249,7 @@ await foreach (DataFeedIngestionStatus ingestionStatus in adminClient.GetDataFee ### Create an anomaly detection configuration -Create an [`AnomalyDetectionConfiguration`](#data-anomaly) to tell the service which data points should be considered anomalies. +Create an [`AnomalyDetectionConfiguration`](#data-point-anomaly) to tell the service which data points should be considered anomalies. ```C# Snippet:CreateAnomalyDetectionConfigurationAsync string metricId = ""; @@ -282,7 +282,7 @@ Console.WriteLine($"Anomaly detection configuration ID: {detectionConfiguration. ### Create a hook for receiving anomaly alerts -Metrics Advisor supports the [`EmailHook` and `WebHook`](#alerting-hook) classes as means of subscribing to [alerts](#anomaly-alert) notifications. In this example we'll illustrate how to create an `EmailHook`. Note that you need to pass the hook to an anomaly alert configuration to start getting notifications. See the sample [Create an anomaly alert configuration](#create-an-anomaly-alert-configuration) below for more information. +Metrics Advisor supports the [`EmailNotificationHook`](#notification-hook) and the [`WebNotificationHook`](#notification-hook) classes as means of subscribing to [alerts](#anomaly-alert) notifications. In this example we'll illustrate how to create an `EmailNotificationHook`. Note that you need to pass the hook to an anomaly alert configuration to start getting notifications. See the sample [Create an anomaly alert configuration](#create-an-anomaly-alert-configuration) below for more information. ```C# Snippet:CreateHookAsync string hookName = "Sample hook"; @@ -292,11 +292,11 @@ var emailsToAlert = new List() "email2@sample.com" }; -var emailHook = new EmailHook(hookName, emailsToAlert); +var emailHook = new EmailNotificationHook(hookName, emailsToAlert); -Response response = await adminClient.CreateHookAsync(emailHook); +Response response = await adminClient.CreateHookAsync(emailHook); -AlertingHook hook = response.Value; +NotificationHook hook = response.Value; Console.WriteLine($"Hook ID: {hook.Id}"); ``` @@ -336,7 +336,7 @@ string anomalyAlertConfigurationId = ""; var startTime = DateTimeOffset.Parse("2020-01-01T00:00:00Z"); var endTime = DateTimeOffset.UtcNow; -var options = new GetAlertsOptions(startTime, endTime, TimeMode.AnomalyTime) +var options = new GetAlertsOptions(startTime, endTime, AlertQueryTimeMode.AnomalyTime) { TopCount = 5 }; @@ -358,7 +358,7 @@ await foreach (AnomalyAlert alert in client.GetAlertsAsync(anomalyAlertConfigura } ``` -Once you know an alert's ID, list the [anomalies](#data-anomaly) that triggered this alert. +Once you know an alert's ID, list the [anomalies](#data-point-anomaly) that triggered this alert. ```C# Snippet:GetAnomaliesForAlertAsync string alertConfigurationId = ""; @@ -368,7 +368,7 @@ var options = new GetAnomaliesForAlertOptions() { TopCount = 3 }; int anomalyCount = 0; -await foreach (DataAnomaly anomaly in client.GetAnomaliesForAlertAsync(alertConfigurationId, alertId, options)) +await foreach (DataPointAnomaly anomaly in client.GetAnomaliesForAlertAsync(alertConfigurationId, alertId, options)) { Console.WriteLine($"Anomaly detection configuration ID: {anomaly.AnomalyDetectionConfigurationId}"); Console.WriteLine($"Metric ID: {anomaly.MetricId}"); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs index 6b40a2abde7d..cce150947897 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs @@ -9,10 +9,10 @@ public MetricsAdvisorClient(System.Uri endpoint, Azure.AI.MetricsAdvisor.Metrics public virtual System.Threading.Tasks.Task> CreateMetricFeedbackAsync(Azure.AI.MetricsAdvisor.Models.MetricFeedback feedback, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAlerts(string alertConfigurationId, Azure.AI.MetricsAdvisor.Models.GetAlertsOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAlertsAsync(string alertConfigurationId, Azure.AI.MetricsAdvisor.Models.GetAlertsOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAnomaliesForAlert(string alertConfigurationId, string alertId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForAlertOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAnomaliesForAlertAsync(string alertConfigurationId, string alertId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForAlertOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAnomaliesForDetectionConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForDetectionConfigurationOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAnomaliesForDetectionConfigurationAsync(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForDetectionConfigurationOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAnomaliesForAlert(string alertConfigurationId, string alertId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForAlertOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAnomaliesForAlertAsync(string alertConfigurationId, string alertId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForAlertOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAnomaliesForDetectionConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForDetectionConfigurationOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAnomaliesForDetectionConfigurationAsync(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.GetAnomaliesForDetectionConfigurationOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetIncidentRootCauses(string detectionConfigurationId, string incidentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetIncidentRootCausesAsync(string detectionConfigurationId, string incidentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetIncidentsForAlert(string alertConfigurationId, string alertId, Azure.AI.MetricsAdvisor.Models.GetIncidentsForAlertOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -63,8 +63,8 @@ public MetricsAdvisorAdministrationClient(System.Uri endpoint, Azure.AI.MetricsA public virtual System.Threading.Tasks.Task> CreateAnomalyAlertConfigurationAsync(Azure.AI.MetricsAdvisor.Models.AnomalyAlertConfiguration alertConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateDataFeed(string dataFeedName, Azure.AI.MetricsAdvisor.Models.DataFeedSource dataSource, Azure.AI.MetricsAdvisor.Models.DataFeedGranularity dataFeedGranularity, Azure.AI.MetricsAdvisor.Models.DataFeedSchema dataFeedSchema, Azure.AI.MetricsAdvisor.Models.DataFeedIngestionSettings dataFeedIngestionSettings, Azure.AI.MetricsAdvisor.Models.DataFeedOptions dataFeedOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateDataFeedAsync(string dataFeedName, Azure.AI.MetricsAdvisor.Models.DataFeedSource dataSource, Azure.AI.MetricsAdvisor.Models.DataFeedGranularity dataFeedGranularity, Azure.AI.MetricsAdvisor.Models.DataFeedSchema dataFeedSchema, Azure.AI.MetricsAdvisor.Models.DataFeedIngestionSettings dataFeedIngestionSettings, Azure.AI.MetricsAdvisor.Models.DataFeedOptions dataFeedOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateHook(Azure.AI.MetricsAdvisor.Models.AlertingHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateHookAsync(Azure.AI.MetricsAdvisor.Models.AlertingHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateHook(Azure.AI.MetricsAdvisor.Models.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateHookAsync(Azure.AI.MetricsAdvisor.Models.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateMetricAnomalyDetectionConfiguration(Azure.AI.MetricsAdvisor.Models.AnomalyDetectionConfiguration detectionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateMetricAnomalyDetectionConfigurationAsync(Azure.AI.MetricsAdvisor.Models.AnomalyDetectionConfiguration detectionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteAnomalyAlertConfiguration(string alertConfigurationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -87,10 +87,10 @@ public MetricsAdvisorAdministrationClient(System.Uri endpoint, Azure.AI.MetricsA public virtual Azure.AsyncPageable GetDataFeedIngestionStatusesAsync(string dataFeedId, Azure.AI.MetricsAdvisor.Models.GetDataFeedIngestionStatusesOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDataFeeds(Azure.AI.MetricsAdvisor.Models.GetDataFeedsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDataFeedsAsync(Azure.AI.MetricsAdvisor.Models.GetDataFeedsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetHook(string hookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHookAsync(string hookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetHooks(Azure.AI.MetricsAdvisor.Models.GetHooksOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetHooksAsync(Azure.AI.MetricsAdvisor.Models.GetHooksOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetHook(string hookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHookAsync(string hookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetHooks(Azure.AI.MetricsAdvisor.Models.GetHooksOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetHooksAsync(Azure.AI.MetricsAdvisor.Models.GetHooksOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetMetricAnomalyDetectionConfiguration(string detectionConfigurationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMetricAnomalyDetectionConfigurationAsync(string detectionConfigurationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetMetricAnomalyDetectionConfigurations(string metricId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -101,8 +101,8 @@ public MetricsAdvisorAdministrationClient(System.Uri endpoint, Azure.AI.MetricsA public virtual System.Threading.Tasks.Task UpdateAnomalyAlertConfigurationAsync(string alertConfigurationId, Azure.AI.MetricsAdvisor.Models.AnomalyAlertConfiguration alertConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateDataFeed(string dataFeedId, Azure.AI.MetricsAdvisor.Models.DataFeed dataFeed, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateDataFeedAsync(string dataFeedId, Azure.AI.MetricsAdvisor.Models.DataFeed dataFeed, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateHook(string hookId, Azure.AI.MetricsAdvisor.Models.AlertingHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateHookAsync(string hookId, Azure.AI.MetricsAdvisor.Models.AlertingHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateHook(string hookId, Azure.AI.MetricsAdvisor.Models.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdateHookAsync(string hookId, Azure.AI.MetricsAdvisor.Models.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateMetricAnomalyDetectionConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.AnomalyDetectionConfiguration detectionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateMetricAnomalyDetectionConfigurationAsync(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.AnomalyDetectionConfiguration detectionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -118,14 +118,24 @@ public enum ServiceVersion } namespace Azure.AI.MetricsAdvisor.Models { - public partial class AlertingHook + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AlertQueryTimeMode : System.IEquatable { - internal AlertingHook() { } - public System.Collections.Generic.IReadOnlyList Administrators { get { throw null; } } - public string Description { get { throw null; } set { } } - public string ExternalLink { get { throw null; } set { } } - public string Id { get { throw null; } } - public string Name { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AlertQueryTimeMode(string value) { throw null; } + public static Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode AnomalyTime { get { throw null; } } + public static Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode CreatedTime { get { throw null; } } + public static Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode ModifiedTime { get { throw null; } } + public bool Equals(Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode left, Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode right) { throw null; } + public static implicit operator Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode (string value) { throw null; } + public static bool operator !=(Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode left, Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode right) { throw null; } + public override string ToString() { throw null; } } public partial class AnomalyAlert { @@ -185,7 +195,25 @@ internal AnomalyIncident() { } public string MetricId { get { throw null; } } public Azure.AI.MetricsAdvisor.Models.AnomalySeverity Severity { get { throw null; } } public System.DateTimeOffset StartTime { get { throw null; } } - public Azure.AI.MetricsAdvisor.Models.IncidentStatus? Status { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus? Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AnomalyIncidentStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AnomalyIncidentStatus(string value) { throw null; } + public static Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus Active { get { throw null; } } + public static Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus Resolved { get { throw null; } } + public bool Equals(Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus left, Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus right) { throw null; } + public static implicit operator Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus left, Azure.AI.MetricsAdvisor.Models.AnomalyIncidentStatus right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AnomalySeverity : System.IEquatable @@ -314,18 +342,6 @@ public ChangeThresholdCondition(double changePercentage, int shiftPoint, bool is public int ShiftPoint { get { throw null; } } public Azure.AI.MetricsAdvisor.Models.SuppressCondition SuppressCondition { get { throw null; } } } - public partial class DataAnomaly - { - internal DataAnomaly() { } - public string AnomalyDetectionConfigurationId { get { throw null; } } - public System.DateTimeOffset? CreatedTime { get { throw null; } } - public string MetricId { get { throw null; } } - public System.DateTimeOffset? ModifiedTime { get { throw null; } } - public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesKey { get { throw null; } } - public Azure.AI.MetricsAdvisor.Models.AnomalySeverity Severity { get { throw null; } } - public Azure.AI.MetricsAdvisor.Models.AnomalyStatus? Status { get { throw null; } } - public System.DateTimeOffset Timestamp { get { throw null; } } - } public partial class DataFeed { internal DataFeed() { } @@ -382,6 +398,12 @@ internal DataFeed() { } public static bool operator !=(Azure.AI.MetricsAdvisor.Models.DataFeedAutoRollupMethod left, Azure.AI.MetricsAdvisor.Models.DataFeedAutoRollupMethod right) { throw null; } public override string ToString() { throw null; } } + public partial class DataFeedDimension + { + public DataFeedDimension(string dimensionName) { } + public string DimensionDisplayName { get { throw null; } set { } } + public string DimensionName { get { throw null; } } + } public partial class DataFeedGranularity { public DataFeedGranularity(Azure.AI.MetricsAdvisor.Models.DataFeedGranularityType granularityType) { } @@ -509,7 +531,7 @@ public DataFeedRollupSettings() { } public partial class DataFeedSchema { public DataFeedSchema(System.Collections.Generic.IList metricColumns) { } - public System.Collections.Generic.IList DimensionColumns { get { throw null; } set { } } + public System.Collections.Generic.IList DimensionColumns { get { throw null; } set { } } public System.Collections.Generic.IList MetricColumns { get { throw null; } } public string TimestampColumn { get { throw null; } set { } } } @@ -564,6 +586,18 @@ internal DataFeedSource() { } public static bool operator !=(Azure.AI.MetricsAdvisor.Models.DataFeedStatus left, Azure.AI.MetricsAdvisor.Models.DataFeedStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class DataPointAnomaly + { + internal DataPointAnomaly() { } + public string AnomalyDetectionConfigurationId { get { throw null; } } + public System.DateTimeOffset? CreatedTime { get { throw null; } } + public string MetricId { get { throw null; } } + public System.DateTimeOffset? ModifiedTime { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesKey { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.AnomalySeverity Severity { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.AnomalyStatus? Status { get { throw null; } } + public System.DateTimeOffset Timestamp { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DetectionConditionsOperator : System.IEquatable { @@ -600,9 +634,9 @@ public partial class ElasticsearchDataFeedSource : Azure.AI.MetricsAdvisor.Model { public ElasticsearchDataFeedSource(string host, string port, string authHeader, string query) { } } - public partial class EmailHook : Azure.AI.MetricsAdvisor.Models.AlertingHook + public partial class EmailNotificationHook : Azure.AI.MetricsAdvisor.Models.NotificationHook { - public EmailHook(string name, System.Collections.Generic.IList emailsToAlert) { } + public EmailNotificationHook(string name, System.Collections.Generic.IList emailsToAlert) { } public System.Collections.Generic.IList EmailsToAlert { get { throw null; } } } public partial class EnrichmentStatus @@ -657,11 +691,11 @@ public FeedbackDimensionFilter(Azure.AI.MetricsAdvisor.Models.DimensionKey dimen } public partial class GetAlertsOptions { - public GetAlertsOptions(System.DateTimeOffset startTime, System.DateTimeOffset endTime, Azure.AI.MetricsAdvisor.Models.TimeMode timeMode) { } + public GetAlertsOptions(System.DateTimeOffset startTime, System.DateTimeOffset endTime, Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode timeMode) { } public System.DateTimeOffset EndTime { get { throw null; } } public int? SkipCount { get { throw null; } set { } } public System.DateTimeOffset StartTime { get { throw null; } } - public Azure.AI.MetricsAdvisor.Models.TimeMode TimeMode { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.AlertQueryTimeMode TimeMode { get { throw null; } } public int? TopCount { get { throw null; } set { } } } public partial class GetAnomaliesForAlertOptions @@ -802,24 +836,6 @@ internal IncidentRootCause() { } public System.Collections.Generic.IReadOnlyList Paths { get { throw null; } } public double Score { get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IncidentStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IncidentStatus(string value) { throw null; } - public static Azure.AI.MetricsAdvisor.Models.IncidentStatus Active { get { throw null; } } - public static Azure.AI.MetricsAdvisor.Models.IncidentStatus Resolved { get { throw null; } } - public bool Equals(Azure.AI.MetricsAdvisor.Models.IncidentStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.MetricsAdvisor.Models.IncidentStatus left, Azure.AI.MetricsAdvisor.Models.IncidentStatus right) { throw null; } - public static implicit operator Azure.AI.MetricsAdvisor.Models.IncidentStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.MetricsAdvisor.Models.IncidentStatus left, Azure.AI.MetricsAdvisor.Models.IncidentStatus right) { throw null; } - public override string ToString() { throw null; } - } public partial class InfluxDbDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { public InfluxDbDataFeedSource(string connectionString, string database, string username, string password, string query) { } @@ -950,12 +966,6 @@ public MetricCommentFeedback(string metricId, Azure.AI.MetricsAdvisor.Models.Fee public System.DateTimeOffset? EndTime { get { throw null; } set { } } public System.DateTimeOffset? StartTime { get { throw null; } set { } } } - public partial class MetricDimension - { - public MetricDimension(string dimensionName) { } - public string DimensionDisplayName { get { throw null; } set { } } - public string DimensionName { get { throw null; } } - } public partial class MetricEnrichedSeriesData { internal MetricEnrichedSeriesData() { } @@ -1023,6 +1033,15 @@ public partial class MySqlDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFe { public MySqlDataFeedSource(string connectionString, string query) { } } + public partial class NotificationHook + { + internal NotificationHook() { } + public System.Collections.Generic.IReadOnlyList Administrators { get { throw null; } } + public string Description { get { throw null; } set { } } + public string ExternalLink { get { throw null; } set { } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PeriodType : System.IEquatable { @@ -1086,25 +1105,6 @@ public SuppressCondition(int minimumNumber, double minimumRatio) { } public int MinimumNumber { get { throw null; } } public double MinimumRatio { get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TimeMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TimeMode(string value) { throw null; } - public static Azure.AI.MetricsAdvisor.Models.TimeMode AnomalyTime { get { throw null; } } - public static Azure.AI.MetricsAdvisor.Models.TimeMode CreatedTime { get { throw null; } } - public static Azure.AI.MetricsAdvisor.Models.TimeMode ModifiedTime { get { throw null; } } - public bool Equals(Azure.AI.MetricsAdvisor.Models.TimeMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.MetricsAdvisor.Models.TimeMode left, Azure.AI.MetricsAdvisor.Models.TimeMode right) { throw null; } - public static implicit operator Azure.AI.MetricsAdvisor.Models.TimeMode (string value) { throw null; } - public static bool operator !=(Azure.AI.MetricsAdvisor.Models.TimeMode left, Azure.AI.MetricsAdvisor.Models.TimeMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class TopNGroupScope { public TopNGroupScope(int top, int period, int minimumTopCount) { } @@ -1112,9 +1112,9 @@ public TopNGroupScope(int top, int period, int minimumTopCount) { } public int Period { get { throw null; } } public int Top { get { throw null; } } } - public partial class WebHook : Azure.AI.MetricsAdvisor.Models.AlertingHook + public partial class WebNotificationHook : Azure.AI.MetricsAdvisor.Models.NotificationHook { - public WebHook(string name, string endpoint) { } + public WebNotificationHook(string name, string endpoint) { } public string CertificateKey { get { throw null; } set { } } public string CertificatePassword { get { throw null; } set { } } public string Endpoint { get { throw null; } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2RestClient.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2RestClient.cs index 62216bde1dcb..424f4ea64480 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2RestClient.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2RestClient.cs @@ -1961,7 +1961,7 @@ public Response ListHooks(string hookName = null, int? skip = null, in } } - internal HttpMessage CreateCreateHookRequest(AlertingHook body) + internal HttpMessage CreateCreateHookRequest(NotificationHook body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1983,7 +1983,7 @@ internal HttpMessage CreateCreateHookRequest(AlertingHook body) /// Create hook request. /// The cancellation token to use. /// is null. - public async Task> CreateHookAsync(AlertingHook body, CancellationToken cancellationToken = default) + public async Task> CreateHookAsync(NotificationHook body, CancellationToken cancellationToken = default) { if (body == null) { @@ -2006,7 +2006,7 @@ public async Task Create hook request. /// The cancellation token to use. /// is null. - public ResponseWithHeaders CreateHook(AlertingHook body, CancellationToken cancellationToken = default) + public ResponseWithHeaders CreateHook(NotificationHook body, CancellationToken cancellationToken = default) { if (body == null) { @@ -2043,7 +2043,7 @@ internal HttpMessage CreateGetHookRequest(Guid hookId) /// Get a hook by its id. /// Hook unique ID. /// The cancellation token to use. - public async Task> GetHookAsync(Guid hookId, CancellationToken cancellationToken = default) + public async Task> GetHookAsync(Guid hookId, CancellationToken cancellationToken = default) { using var message = CreateGetHookRequest(hookId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -2051,9 +2051,9 @@ public async Task> GetHookAsync(Guid hookId, Cancellation { case 200: { - AlertingHook value = default; + NotificationHook value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AlertingHook.DeserializeAlertingHook(document.RootElement); + value = NotificationHook.DeserializeNotificationHook(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2064,7 +2064,7 @@ public async Task> GetHookAsync(Guid hookId, Cancellation /// Get a hook by its id. /// Hook unique ID. /// The cancellation token to use. - public Response GetHook(Guid hookId, CancellationToken cancellationToken = default) + public Response GetHook(Guid hookId, CancellationToken cancellationToken = default) { using var message = CreateGetHookRequest(hookId); _pipeline.Send(message, cancellationToken); @@ -2072,9 +2072,9 @@ public Response GetHook(Guid hookId, CancellationToken cancellatio { case 200: { - AlertingHook value = default; + NotificationHook value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AlertingHook.DeserializeAlertingHook(document.RootElement); + value = NotificationHook.DeserializeNotificationHook(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertQueryTimeMode.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertQueryTimeMode.cs new file mode 100644 index 000000000000..0b0f2e23623b --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertQueryTimeMode.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.MetricsAdvisor.Models +{ + /// time mode. + public readonly partial struct AlertQueryTimeMode : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public AlertQueryTimeMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnomalyTimeValue = "AnomalyTime"; + private const string CreatedTimeValue = "CreatedTime"; + private const string ModifiedTimeValue = "ModifiedTime"; + /// Determines if two values are the same. + public static bool operator ==(AlertQueryTimeMode left, AlertQueryTimeMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AlertQueryTimeMode left, AlertQueryTimeMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AlertQueryTimeMode(string value) => new AlertQueryTimeMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AlertQueryTimeMode other && Equals(other); + /// + public bool Equals(AlertQueryTimeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingResultQuery.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingResultQuery.cs index aa3ea340f738..adfca8036b47 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingResultQuery.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingResultQuery.cs @@ -16,7 +16,7 @@ internal partial class AlertingResultQuery /// start time. /// end time. /// time mode. - public AlertingResultQuery(DateTimeOffset startTime, DateTimeOffset endTime, TimeMode timeMode) + public AlertingResultQuery(DateTimeOffset startTime, DateTimeOffset endTime, AlertQueryTimeMode timeMode) { StartTime = startTime; EndTime = endTime; @@ -28,6 +28,6 @@ public AlertingResultQuery(DateTimeOffset startTime, DateTimeOffset endTime, Tim /// end time. public DateTimeOffset EndTime { get; } /// time mode. - public TimeMode TimeMode { get; } + public AlertQueryTimeMode TimeMode { get; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyIncidentStatus.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyIncidentStatus.cs new file mode 100644 index 000000000000..2631227c3102 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyIncidentStatus.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.MetricsAdvisor.Models +{ + /// + /// incident status + /// + /// + /// + /// only return for alerting incident result. + /// + public readonly partial struct AnomalyIncidentStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public AnomalyIncidentStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ResolvedValue = "Resolved"; + /// Determines if two values are the same. + public static bool operator ==(AnomalyIncidentStatus left, AnomalyIncidentStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnomalyIncidentStatus left, AnomalyIncidentStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AnomalyIncidentStatus(string value) => new AnomalyIncidentStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnomalyIncidentStatus other && Equals(other); + /// + public bool Equals(AnomalyIncidentStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.Serialization.cs index 6d61cdb90794..e965a419a625 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.Serialization.cs @@ -16,7 +16,7 @@ internal partial class AnomalyResultList internal static AnomalyResultList DeserializeAnomalyResultList(JsonElement element) { string nextLink = default; - IReadOnlyList value = default; + IReadOnlyList value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("@nextLink")) @@ -26,10 +26,10 @@ internal static AnomalyResultList DeserializeAnomalyResultList(JsonElement eleme } if (property.NameEquals("value")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DataAnomaly.DeserializeDataAnomaly(item)); + array.Add(DataPointAnomaly.DeserializeDataPointAnomaly(item)); } value = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.cs index 20573aa5adaa..8a8ef85147a2 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyResultList.cs @@ -18,7 +18,7 @@ internal partial class AnomalyResultList /// . /// . /// or is null. - internal AnomalyResultList(string nextLink, IEnumerable value) + internal AnomalyResultList(string nextLink, IEnumerable value) { if (nextLink == null) { @@ -36,13 +36,13 @@ internal AnomalyResultList(string nextLink, IEnumerable value) /// Initializes a new instance of AnomalyResultList. /// . /// . - internal AnomalyResultList(string nextLink, IReadOnlyList value) + internal AnomalyResultList(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } public string NextLink { get; } - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.Serialization.cs index b8a0b713cd71..17eae0dcc09f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static AzureApplicationInsightsDataFeed DeserializeAzureApplicationInsi DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static AzureApplicationInsightsDataFeed DeserializeAzureApplicationInsi property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.cs index 51a9c274bcfa..3d4be3f4c4f5 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureApplicationInsightsDataFeed.cs @@ -69,7 +69,7 @@ public AzureApplicationInsightsDataFeed(string dataFeedName, DataFeedGranularity /// data feed created time. /// action link for alert. /// . - internal AzureApplicationInsightsDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureApplicationInsightsParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal AzureApplicationInsightsDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureApplicationInsightsParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.Serialization.cs index 590a8666bff4..a2598dfa831b 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static AzureBlobDataFeed DeserializeAzureBlobDataFeed(JsonElement eleme DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static AzureBlobDataFeed DeserializeAzureBlobDataFeed(JsonElement eleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.cs index 035d0811b55a..d6ef3552edc0 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureBlobDataFeed.cs @@ -69,7 +69,7 @@ public AzureBlobDataFeed(string dataFeedName, DataFeedGranularityType granularit /// data feed created time. /// action link for alert. /// . - internal AzureBlobDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureBlobParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal AzureBlobDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureBlobParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.Serialization.cs index 2da801dd96eb..a307adadee82 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static AzureCosmosDBDataFeed DeserializeAzureCosmosDBDataFeed(JsonEleme DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static AzureCosmosDBDataFeed DeserializeAzureCosmosDBDataFeed(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.cs index c52f883281ed..ba098cd1d621 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureCosmosDBDataFeed.cs @@ -69,7 +69,7 @@ public AzureCosmosDBDataFeed(string dataFeedName, DataFeedGranularityType granul /// data feed created time. /// action link for alert. /// . - internal AzureCosmosDBDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureCosmosDBParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal AzureCosmosDBDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureCosmosDBParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.Serialization.cs index d46c0d42dea8..3a6c629d5975 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static AzureDataExplorerDataFeed DeserializeAzureDataExplorerDataFeed(J DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static AzureDataExplorerDataFeed DeserializeAzureDataExplorerDataFeed(J property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.cs index 48b23b6622e6..3b087d7e73d4 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataExplorerDataFeed.cs @@ -69,7 +69,7 @@ public AzureDataExplorerDataFeed(string dataFeedName, DataFeedGranularityType gr /// data feed created time. /// action link for alert. /// . - internal AzureDataExplorerDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal AzureDataExplorerDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.Serialization.cs index 05c2d9ab8652..b007bedefb58 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static AzureDataLakeStorageGen2DataFeed DeserializeAzureDataLakeStorage DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static AzureDataLakeStorageGen2DataFeed DeserializeAzureDataLakeStorage property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.cs index c4a65357b0a0..b58bb8761986 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureDataLakeStorageGen2DataFeed.cs @@ -69,7 +69,7 @@ public AzureDataLakeStorageGen2DataFeed(string dataFeedName, DataFeedGranularity /// data feed created time. /// action link for alert. /// . - internal AzureDataLakeStorageGen2DataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureDataLakeStorageGen2Parameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal AzureDataLakeStorageGen2DataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureDataLakeStorageGen2Parameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.Serialization.cs index 8aae02efc2b9..c5bc22778414 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static AzureTableDataFeed DeserializeAzureTableDataFeed(JsonElement ele DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static AzureTableDataFeed DeserializeAzureTableDataFeed(JsonElement ele property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.cs index 495cf810d2d1..499434b1dd0d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AzureTableDataFeed.cs @@ -69,7 +69,7 @@ public AzureTableDataFeed(string dataFeedName, DataFeedGranularityType granulari /// data feed created time. /// action link for alert. /// . - internal AzureTableDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureTableParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal AzureTableDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, AzureTableParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDetail.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDetail.Serialization.cs index 073d10c01643..7e95033de081 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDetail.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDetail.Serialization.cs @@ -180,7 +180,7 @@ internal static DataFeedDetail DeserializeDataFeedDetail(JsonElement element) DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -255,10 +255,10 @@ internal static DataFeedDetail DeserializeDataFeedDetail(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricDimension.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDimension.Serialization.cs similarity index 84% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricDimension.Serialization.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDimension.Serialization.cs index b7fa6778d289..a13d8467a81e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricDimension.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDimension.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.AI.MetricsAdvisor.Models { - public partial class MetricDimension : IUtf8JsonSerializable + public partial class DataFeedDimension : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static MetricDimension DeserializeMetricDimension(JsonElement element) + internal static DataFeedDimension DeserializeDataFeedDimension(JsonElement element) { string dimensionName = default; Optional dimensionDisplayName = default; @@ -42,7 +42,7 @@ internal static MetricDimension DeserializeMetricDimension(JsonElement element) continue; } } - return new MetricDimension(dimensionName, dimensionDisplayName.Value); + return new DataFeedDimension(dimensionName, dimensionDisplayName.Value); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricDimension.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDimension.cs similarity index 71% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricDimension.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDimension.cs index 3bc8940a2ff4..6279b03d0e9a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricDimension.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataFeedDimension.cs @@ -10,13 +10,13 @@ namespace Azure.AI.MetricsAdvisor.Models { /// The Dimension. - public partial class MetricDimension + public partial class DataFeedDimension { - /// Initializes a new instance of MetricDimension. + /// Initializes a new instance of DataFeedDimension. /// dimension name. /// dimension display name. - internal MetricDimension(string dimensionName, string dimensionDisplayName) + internal DataFeedDimension(string dimensionName, string dimensionDisplayName) { DimensionName = dimensionName; DimensionDisplayName = dimensionDisplayName; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataAnomaly.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataPointAnomaly.Serialization.cs similarity index 89% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataAnomaly.Serialization.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataPointAnomaly.Serialization.cs index ad58cdfda855..e01eccb6d551 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataAnomaly.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataPointAnomaly.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.AI.MetricsAdvisor.Models { - public partial class DataAnomaly + public partial class DataPointAnomaly { - internal static DataAnomaly DeserializeDataAnomaly(JsonElement element) + internal static DataPointAnomaly DeserializeDataPointAnomaly(JsonElement element) { Optional metricId = default; Optional anomalyDetectionConfigurationId = default; @@ -76,7 +76,7 @@ internal static DataAnomaly DeserializeDataAnomaly(JsonElement element) continue; } } - return new DataAnomaly(metricId.Value, anomalyDetectionConfigurationId.Value, timestamp, Optional.ToNullable(createdTime), Optional.ToNullable(modifiedTime), dimension, property); + return new DataPointAnomaly(metricId.Value, anomalyDetectionConfigurationId.Value, timestamp, Optional.ToNullable(createdTime), Optional.ToNullable(modifiedTime), dimension, property); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataAnomaly.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataPointAnomaly.cs similarity index 87% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataAnomaly.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataPointAnomaly.cs index a33f104bb38d..2d5c4912706d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataAnomaly.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/DataPointAnomaly.cs @@ -11,7 +11,7 @@ namespace Azure.AI.MetricsAdvisor.Models { /// The AnomalyResult. - public partial class DataAnomaly + public partial class DataPointAnomaly { } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.Serialization.cs index 1871add85d4f..b9f3b01bdd45 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static ElasticsearchDataFeed DeserializeElasticsearchDataFeed(JsonEleme DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static ElasticsearchDataFeed DeserializeElasticsearchDataFeed(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.cs index 7e79d73f9782..94715d05213c 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/ElasticsearchDataFeed.cs @@ -69,7 +69,7 @@ public ElasticsearchDataFeed(string dataFeedName, DataFeedGranularityType granul /// data feed created time. /// action link for alert. /// . - internal ElasticsearchDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, ElasticsearchParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal ElasticsearchDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, ElasticsearchParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailHook.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailNotificationHook.Serialization.cs similarity index 90% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailHook.Serialization.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailNotificationHook.Serialization.cs index 28629eb336b2..605e154f55f1 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailHook.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailNotificationHook.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.AI.MetricsAdvisor.Models { - public partial class EmailHook : IUtf8JsonSerializable + public partial class EmailNotificationHook : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -35,7 +35,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static EmailHook DeserializeEmailHook(JsonElement element) + internal static EmailNotificationHook DeserializeEmailNotificationHook(JsonElement element) { EmailHookParameter hookParameter = default; HookType hookType = default; @@ -92,7 +92,7 @@ internal static EmailHook DeserializeEmailHook(JsonElement element) continue; } } - return new EmailHook(hookType, hookId.Value, hookName, description.Value, externalLink.Value, Optional.ToList(admins), hookParameter); + return new EmailNotificationHook(hookType, hookId.Value, hookName, description.Value, externalLink.Value, Optional.ToList(admins), hookParameter); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailHook.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailNotificationHook.cs similarity index 81% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailHook.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailNotificationHook.cs index 44c0353538fe..567c54937acb 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailHook.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/EmailNotificationHook.cs @@ -11,7 +11,7 @@ namespace Azure.AI.MetricsAdvisor.Models { /// The EmailHookInfo. - public partial class EmailHook : AlertingHook + public partial class EmailNotificationHook : NotificationHook { } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.Serialization.cs index f6e46ee471bb..83a911e451bc 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.Serialization.cs @@ -16,7 +16,7 @@ internal partial class HookList internal static HookList DeserializeHookList(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("@nextLink")) @@ -31,10 +31,10 @@ internal static HookList DeserializeHookList(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AlertingHook.DeserializeAlertingHook(item)); + array.Add(NotificationHook.DeserializeNotificationHook(item)); } value = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.cs index 1fe3175cf0b9..e54529264f31 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HookList.cs @@ -16,19 +16,19 @@ internal partial class HookList /// Initializes a new instance of HookList. internal HookList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of HookList. /// . /// . - internal HookList(string nextLink, IReadOnlyList value) + internal HookList(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } public string NextLink { get; } - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.Serialization.cs index 9cc2f5052acd..b75238f88eb1 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static HttpRequestDataFeed DeserializeHttpRequestDataFeed(JsonElement e DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static HttpRequestDataFeed DeserializeHttpRequestDataFeed(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.cs index ecd948e79ae9..90d9e2c000ec 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/HttpRequestDataFeed.cs @@ -69,7 +69,7 @@ public HttpRequestDataFeed(string dataFeedName, DataFeedGranularityType granular /// data feed created time. /// action link for alert. /// . - internal HttpRequestDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, HttpRequestParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal HttpRequestDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, HttpRequestParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.Serialization.cs index a7099badf351..e04b2c20c91e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.Serialization.cs @@ -15,7 +15,7 @@ internal partial class IncidentProperty internal static IncidentProperty DeserializeIncidentProperty(JsonElement element) { AnomalySeverity maxSeverity = default; - Optional incidentStatus = default; + Optional incidentStatus = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("maxSeverity")) @@ -30,7 +30,7 @@ internal static IncidentProperty DeserializeIncidentProperty(JsonElement element property.ThrowNonNullablePropertyIsNull(); continue; } - incidentStatus = new IncidentStatus(property.Value.GetString()); + incidentStatus = new AnomalyIncidentStatus(property.Value.GetString()); continue; } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.cs index ec09c5258a04..128a43271e1d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentProperty.cs @@ -26,7 +26,7 @@ internal IncidentProperty(AnomalySeverity maxSeverity) /// /// only return for alerting incident result. /// - internal IncidentProperty(AnomalySeverity maxSeverity, IncidentStatus? incidentStatus) + internal IncidentProperty(AnomalySeverity maxSeverity, AnomalyIncidentStatus? incidentStatus) { MaxSeverity = maxSeverity; IncidentStatus = incidentStatus; @@ -41,6 +41,6 @@ internal IncidentProperty(AnomalySeverity maxSeverity, IncidentStatus? incidentS /// /// only return for alerting incident result. /// - public IncidentStatus? IncidentStatus { get; } + public AnomalyIncidentStatus? IncidentStatus { get; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentStatus.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentStatus.cs deleted file mode 100644 index d0f56f92d1aa..000000000000 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/IncidentStatus.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.MetricsAdvisor.Models -{ - /// - /// incident status - /// - /// - /// - /// only return for alerting incident result. - /// - public readonly partial struct IncidentStatus : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public IncidentStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveValue = "Active"; - private const string ResolvedValue = "Resolved"; - /// Determines if two values are the same. - public static bool operator ==(IncidentStatus left, IncidentStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IncidentStatus left, IncidentStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IncidentStatus(string value) => new IncidentStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IncidentStatus other && Equals(other); - /// - public bool Equals(IncidentStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.Serialization.cs index 631de0750f63..5a8ec323e266 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static InfluxDBDataFeed DeserializeInfluxDBDataFeed(JsonElement element DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static InfluxDBDataFeed DeserializeInfluxDBDataFeed(JsonElement element property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.cs index 98c91a235f10..73b1edad8fc7 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/InfluxDBDataFeed.cs @@ -69,7 +69,7 @@ public InfluxDBDataFeed(string dataFeedName, DataFeedGranularityType granularity /// data feed created time. /// action link for alert. /// . - internal InfluxDBDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, InfluxDBParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal InfluxDBDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, InfluxDBParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.Serialization.cs index 49756dff08ec..5ce5bf1039ea 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static MongoDBDataFeed DeserializeMongoDBDataFeed(JsonElement element) DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static MongoDBDataFeed DeserializeMongoDBDataFeed(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.cs index 29434ebba295..a7fc0ea1ea8e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MongoDBDataFeed.cs @@ -69,7 +69,7 @@ public MongoDBDataFeed(string dataFeedName, DataFeedGranularityType granularityN /// data feed created time. /// action link for alert. /// . - internal MongoDBDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, MongoDBParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal MongoDBDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, MongoDBParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.Serialization.cs index 20643e53d899..45528d631c02 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static MySqlDataFeed DeserializeMySqlDataFeed(JsonElement element) DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static MySqlDataFeed DeserializeMySqlDataFeed(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.cs index ae784424237d..8b611571c6b1 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MySqlDataFeed.cs @@ -69,7 +69,7 @@ public MySqlDataFeed(string dataFeedName, DataFeedGranularityType granularityNam /// data feed created time. /// action link for alert. /// . - internal MySqlDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal MySqlDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingHook.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/NotificationHook.Serialization.cs similarity index 86% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingHook.Serialization.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/NotificationHook.Serialization.cs index 0eac57bab136..e8163a64867f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingHook.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/NotificationHook.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.AI.MetricsAdvisor.Models { - public partial class AlertingHook : IUtf8JsonSerializable + public partial class NotificationHook : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -33,14 +33,14 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AlertingHook DeserializeAlertingHook(JsonElement element) + internal static NotificationHook DeserializeNotificationHook(JsonElement element) { if (element.TryGetProperty("hookType", out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "Email": return EmailHook.DeserializeEmailHook(element); - case "Webhook": return WebHook.DeserializeWebHook(element); + case "Email": return EmailNotificationHook.DeserializeEmailNotificationHook(element); + case "Webhook": return WebNotificationHook.DeserializeWebNotificationHook(element); } } HookType hookType = default; @@ -92,7 +92,7 @@ internal static AlertingHook DeserializeAlertingHook(JsonElement element) continue; } } - return new AlertingHook(hookType, hookId.Value, hookName, description.Value, externalLink.Value, Optional.ToList(admins)); + return new NotificationHook(hookType, hookId.Value, hookName, description.Value, externalLink.Value, Optional.ToList(admins)); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingHook.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/NotificationHook.cs similarity index 76% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingHook.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/NotificationHook.cs index a386a5227c87..403883d3294a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AlertingHook.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/NotificationHook.cs @@ -12,17 +12,17 @@ namespace Azure.AI.MetricsAdvisor.Models { /// The HookInfo. - public partial class AlertingHook + public partial class NotificationHook { - /// Initializes a new instance of AlertingHook. + /// Initializes a new instance of NotificationHook. /// hook type. /// Hook unique id. /// hook unique name. /// hook description. /// hook external link. /// hook administrators. - internal AlertingHook(HookType hookType, string id, string name, string description, string externalLink, IReadOnlyList administrators) + internal NotificationHook(HookType hookType, string id, string name, string description, string externalLink, IReadOnlyList administrators) { HookType = hookType; Id = id; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.Serialization.cs index 873b093344cc..211ef6312d24 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static PostgreSqlDataFeed DeserializePostgreSqlDataFeed(JsonElement ele DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static PostgreSqlDataFeed DeserializePostgreSqlDataFeed(JsonElement ele property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.cs index dc41e04261c7..b17b6ce4c628 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/PostgreSqlDataFeed.cs @@ -69,7 +69,7 @@ public PostgreSqlDataFeed(string dataFeedName, DataFeedGranularityType granulari /// data feed created time. /// action link for alert. /// . - internal PostgreSqlDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal PostgreSqlDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.Serialization.cs index ac077fefadbf..e6aac7e929c8 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.Serialization.cs @@ -164,7 +164,7 @@ internal static SQLServerDataFeed DeserializeSQLServerDataFeed(JsonElement eleme DataFeedGranularityType granularityName = default; Optional granularityAmount = default; IList metrics = default; - Optional> dimension = default; + Optional> dimension = default; Optional timestampColumn = default; DateTimeOffset dataStartFrom = default; Optional startOffsetInSeconds = default; @@ -244,10 +244,10 @@ internal static SQLServerDataFeed DeserializeSQLServerDataFeed(JsonElement eleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricDimension.DeserializeMetricDimension(item)); + array.Add(DataFeedDimension.DeserializeDataFeedDimension(item)); } dimension = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.cs index 865d2f8b0eaa..d90fb7903d9a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/SQLServerDataFeed.cs @@ -69,7 +69,7 @@ public SQLServerDataFeed(string dataFeedName, DataFeedGranularityType granularit /// data feed created time. /// action link for alert. /// . - internal SQLServerDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) + internal SQLServerDataFeed(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate, SqlSourceParameter dataSourceParameter) : base(dataSourceType, dataFeedId, dataFeedName, dataFeedDescription, granularityName, granularityAmount, metrics, dimension, timestampColumn, dataStartFrom, startOffsetInSeconds, maxConcurrency, minRetryIntervalInSeconds, stopRetryAfterInSeconds, needRollup, rollUpMethod, rollUpColumns, allUpIdentification, fillMissingPointType, fillMissingPointValue, viewMode, admins, viewers, isAdmin, creator, status, createdTime, actionLinkTemplate) { DataSourceParameter = dataSourceParameter; DataSourceType = dataSourceType; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/TimeMode.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/TimeMode.cs deleted file mode 100644 index 043d30c5c88c..000000000000 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/TimeMode.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.MetricsAdvisor.Models -{ - /// time mode. - public readonly partial struct TimeMode : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public TimeMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnomalyTimeValue = "AnomalyTime"; - private const string CreatedTimeValue = "CreatedTime"; - private const string ModifiedTimeValue = "ModifiedTime"; - /// Determines if two values are the same. - public static bool operator ==(TimeMode left, TimeMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TimeMode left, TimeMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TimeMode(string value) => new TimeMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TimeMode other && Equals(other); - /// - public bool Equals(TimeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebHook.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebNotificationHook.Serialization.cs similarity index 91% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebHook.Serialization.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebNotificationHook.Serialization.cs index 52a319c49d98..1e7113da1bdf 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebHook.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebNotificationHook.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.AI.MetricsAdvisor.Models { - public partial class WebHook : IUtf8JsonSerializable + public partial class WebNotificationHook : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -35,7 +35,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static WebHook DeserializeWebHook(JsonElement element) + internal static WebNotificationHook DeserializeWebNotificationHook(JsonElement element) { WebhookHookParameter hookParameter = default; HookType hookType = default; @@ -92,7 +92,7 @@ internal static WebHook DeserializeWebHook(JsonElement element) continue; } } - return new WebHook(hookType, hookId.Value, hookName, description.Value, externalLink.Value, Optional.ToList(admins), hookParameter); + return new WebNotificationHook(hookType, hookId.Value, hookName, description.Value, externalLink.Value, Optional.ToList(admins), hookParameter); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebHook.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebNotificationHook.cs similarity index 82% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebHook.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebNotificationHook.cs index 97c3fe142dd9..cb18abffca21 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebHook.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/WebNotificationHook.cs @@ -11,7 +11,7 @@ namespace Azure.AI.MetricsAdvisor.Models { /// The WebhookHookInfo. - public partial class WebHook : AlertingHook + public partial class WebNotificationHook : NotificationHook { } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorAdministrationClient.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorAdministrationClient.cs index 6b1a0f8232b3..0402130e857e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorAdministrationClient.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorAdministrationClient.cs @@ -1341,23 +1341,23 @@ public virtual Response DeleteAnomalyAlertConfiguration(string alertConfiguratio #region Hook /// - /// Creates an and assigns it a unique ID. + /// Creates a and assigns it a unique ID. /// - /// Specifies how the created should be configured. + /// Specifies how the created should be configured. /// A controlling the request lifetime. /// - /// A containing the result of the operation. The result is an instance + /// A containing the result of the operation. The result is a instance /// containing the ID of the newly created hook. /// - /// is null; or is an and .EmailsToAlert is null. - /// is an and .EmailsToAlert is empty. - public virtual async Task> CreateHookAsync(AlertingHook hook, CancellationToken cancellationToken = default) + /// is null; or is an and .EmailsToAlert is null. + /// is an and .EmailsToAlert is empty. + public virtual async Task> CreateHookAsync(NotificationHook hook, CancellationToken cancellationToken = default) { Argument.AssertNotNull(hook, nameof(hook)); - if (hook is EmailHook emailHook) + if (hook is EmailNotificationHook emailHook) { - Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailHook.EmailsToAlert)); + Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailNotificationHook.EmailsToAlert)); } using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(CreateHook)}"); @@ -1378,23 +1378,23 @@ public virtual async Task> CreateHookAsync(AlertingHook h } /// - /// Creates an and assigns it a unique ID. + /// Creates a and assigns it a unique ID. /// - /// Specifies how the created should be configured. + /// Specifies how the created should be configured. /// A controlling the request lifetime. /// - /// A containing the result of the operation. The result is an instance + /// A containing the result of the operation. The result is a instance /// containing the ID of the newly created hook. /// - /// is null; or is an and .EmailsToAlert is null. - /// is an and .EmailsToAlert is empty. - public virtual Response CreateHook(AlertingHook hook, CancellationToken cancellationToken = default) + /// is null; or is an and .EmailsToAlert is null. + /// is an and .EmailsToAlert is empty. + public virtual Response CreateHook(NotificationHook hook, CancellationToken cancellationToken = default) { Argument.AssertNotNull(hook, nameof(hook)); - if (hook is EmailHook emailHook) + if (hook is EmailNotificationHook emailHook) { - Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailHook.EmailsToAlert)); + Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailNotificationHook.EmailsToAlert)); } using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(CreateHook)}"); @@ -1415,24 +1415,24 @@ public virtual Response CreateHook(AlertingHook hook, Cancellation } /// - /// Updates an existing . + /// Updates an existing . /// - /// The ID of the existing to update. - /// The model containing the updates to be applied. + /// The ID of the existing to update. + /// The model containing the updates to be applied. /// A controlling the request lifetime. /// /// A containing the result of the operation. /// /// or is null. /// is empty or not a valid GUID. - public virtual async Task UpdateHookAsync(string hookId, AlertingHook hook, CancellationToken cancellationToken = default) + public virtual async Task UpdateHookAsync(string hookId, NotificationHook hook, CancellationToken cancellationToken = default) { Guid hookGuid = ClientCommon.ValidateGuid(hookId, nameof(hookId)); Argument.AssertNotNull(hook, nameof(hook)); - if (hook is EmailHook emailHook) + if (hook is EmailNotificationHook emailHook) { - Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailHook.EmailsToAlert)); + Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailNotificationHook.EmailsToAlert)); } using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(UpdateHook)}"); @@ -1440,7 +1440,7 @@ public virtual async Task UpdateHookAsync(string hookId, AlertingHook try { - HookInfoPatch patch = AlertingHook.GetPatchModel(hook); + HookInfoPatch patch = NotificationHook.GetPatchModel(hook); return await _serviceRestClient.UpdateHookAsync(hookGuid, patch, cancellationToken).ConfigureAwait(false); } @@ -1452,24 +1452,24 @@ public virtual async Task UpdateHookAsync(string hookId, AlertingHook } /// - /// Updates an existing . + /// Updates an existing . /// - /// The ID of the existing to update. - /// The model containing the updates to be applied. + /// The ID of the existing to update. + /// The model containing the updates to be applied. /// A controlling the request lifetime. /// /// A containing the result of the operation. /// /// or is null. /// is empty or not a valid GUID. - public virtual Response UpdateHook(string hookId, AlertingHook hook, CancellationToken cancellationToken = default) + public virtual Response UpdateHook(string hookId, NotificationHook hook, CancellationToken cancellationToken = default) { Guid hookGuid = ClientCommon.ValidateGuid(hookId, nameof(hookId)); Argument.AssertNotNull(hook, nameof(hook)); - if (hook is EmailHook emailHook) + if (hook is EmailNotificationHook emailHook) { - Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailHook.EmailsToAlert)); + Argument.AssertNotNullOrEmpty(emailHook.EmailsToAlert, nameof(EmailNotificationHook.EmailsToAlert)); } using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(UpdateHook)}"); @@ -1477,7 +1477,7 @@ public virtual Response UpdateHook(string hookId, AlertingHook hook, Cancellatio try { - HookInfoPatch patch = AlertingHook.GetPatchModel(hook); + HookInfoPatch patch = NotificationHook.GetPatchModel(hook); return _serviceRestClient.UpdateHook(hookGuid, patch, cancellationToken); } @@ -1489,17 +1489,17 @@ public virtual Response UpdateHook(string hookId, AlertingHook hook, Cancellatio } /// - /// Gets an existing . + /// Gets an existing . /// - /// The unique identifier of the . + /// The unique identifier of the . /// A controlling the request lifetime. /// - /// A containing the result of the operation. The result is an + /// A containing the result of the operation. The result is a /// instance containing the requested information. /// /// is null. /// is empty or not a valid GUID. - public virtual async Task> GetHookAsync(string hookId, CancellationToken cancellationToken = default) + public virtual async Task> GetHookAsync(string hookId, CancellationToken cancellationToken = default) { Guid hookGuid = ClientCommon.ValidateGuid(hookId, nameof(hookId)); @@ -1518,17 +1518,17 @@ public virtual async Task> GetHookAsync(string hookId, Ca } /// - /// Gets an existing . + /// Gets an existing . /// - /// The unique identifier of the . + /// The unique identifier of the . /// A controlling the request lifetime. /// - /// A containing the result of the operation. The result is an + /// A containing the result of the operation. The result is a /// instance containing the requested information. /// /// is null. /// is empty or not a valid GUID. - public virtual Response GetHook(string hookId, CancellationToken cancellationToken = default) + public virtual Response GetHook(string hookId, CancellationToken cancellationToken = default) { Guid hookGuid = ClientCommon.ValidateGuid(hookId, nameof(hookId)); @@ -1547,9 +1547,9 @@ public virtual Response GetHook(string hookId, CancellationToken c } /// - /// Deletes an existing . + /// Deletes an existing . /// - /// The unique identifier of the to be deleted. + /// The unique identifier of the to be deleted. /// A controlling the request lifetime. /// /// A containing the result of the operation. @@ -1575,9 +1575,9 @@ public virtual async Task DeleteHookAsync(string hookId, CancellationT } /// - /// Deletes an existing . + /// Deletes an existing . /// - /// The unique identifier of the to be deleted. + /// The unique identifier of the to be deleted. /// A controlling the request lifetime. /// /// A containing the result of the operation. @@ -1603,14 +1603,14 @@ public virtual Response DeleteHook(string hookId, CancellationToken cancellation } /// - /// Gets a collection of items describing the existing s in this resource. + /// Gets a collection of items describing the existing s in this resource. /// /// An optional set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// An containing the collection of s. - public virtual AsyncPageable GetHooksAsync(GetHooksOptions options = default, CancellationToken cancellationToken = default) + /// An containing the collection of s. + public virtual AsyncPageable GetHooksAsync(GetHooksOptions options = default, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(GetHooks)}"); scope.Start(); @@ -1627,7 +1627,7 @@ async Task> FirstPageFunc(int? pageSizeHint) } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(GetHooks)}"); scope.Start(); @@ -1648,14 +1648,14 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) } /// - /// Gets a collection of items describing the existing s in this resource. + /// Gets a collection of items describing the existing s in this resource. /// /// An optional set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// A containing the collection of s. - public virtual Pageable GetHooks(GetHooksOptions options = default, CancellationToken cancellationToken = default) + /// A containing the collection of s. + public virtual Pageable GetHooks(GetHooksOptions options = default, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(GetHooks)}"); scope.Start(); @@ -1672,7 +1672,7 @@ Page FirstPageFunc(int? pageSizeHint) } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorAdministrationClient)}.{nameof(GetHooks)}"); scope.Start(); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs index 7fffb59dfe70..e0919efb7fac 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs @@ -97,13 +97,13 @@ protected MetricsAdvisorClient() #region Metrics /// - /// Gets the possible values a can assume for a specified . + /// Gets the possible values a can assume for a specified . /// /// The unique identifier of the . - /// The name of the . + /// The name of the . /// An optional set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// An containing the collection of values the specified can assume. + /// An containing the collection of values the specified can assume. /// or is null. /// or is empty; or is not a valid GUID. public virtual AsyncPageable GetMetricDimensionValuesAsync(string metricId, string dimensionName, GetMetricDimensionValuesOptions options = default, CancellationToken cancellationToken = default) @@ -157,13 +157,13 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) } /// - /// Gets the possible values a can assume for a specified . + /// Gets the possible values a can assume for a specified . /// /// The unique identifier of the . - /// The name of the . + /// The name of the . /// An optional set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// A containing the collection of values the specified can assume. + /// A containing the collection of values the specified can assume. /// or is null. /// or is empty; or is not a valid GUID. public virtual Pageable GetMetricDimensionValues(string metricId, string dimensionName, GetMetricDimensionValuesOptions options = default, CancellationToken cancellationToken = default) @@ -793,10 +793,10 @@ public virtual Response GetMetricFeedback(string feedbackId, Can /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// An containing the collection of instances. + /// An containing the collection of instances. /// or is null. /// is empty or not a valid GUID. - public virtual AsyncPageable GetAnomaliesForDetectionConfigurationAsync(string detectionConfigurationId, GetAnomaliesForDetectionConfigurationOptions options, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAnomaliesForDetectionConfigurationAsync(string detectionConfigurationId, GetAnomaliesForDetectionConfigurationOptions options, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(detectionConfigurationId, nameof(detectionConfigurationId)); Argument.AssertNotNull(options, nameof(options)); @@ -809,7 +809,7 @@ public virtual AsyncPageable GetAnomaliesForDetectionConfigurationA int? skip = options.SkipCount; int? top = options.TopCount; - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForDetectionConfiguration)}"); scope.Start(); @@ -826,7 +826,7 @@ async Task> FirstPageFunc(int? pageSizeHint) } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForDetectionConfiguration)}"); scope.Start(); @@ -852,10 +852,10 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// A containing the collection of instances. + /// A containing the collection of instances. /// or is null. /// is empty or not a valid GUID. - public virtual Pageable GetAnomaliesForDetectionConfiguration(string detectionConfigurationId, GetAnomaliesForDetectionConfigurationOptions options, CancellationToken cancellationToken = default) + public virtual Pageable GetAnomaliesForDetectionConfiguration(string detectionConfigurationId, GetAnomaliesForDetectionConfigurationOptions options, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(detectionConfigurationId, nameof(detectionConfigurationId)); Argument.AssertNotNull(options, nameof(options)); @@ -868,7 +868,7 @@ public virtual Pageable GetAnomaliesForDetectionConfiguration(strin int? skip = options.SkipCount; int? top = options.TopCount; - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForDetectionConfiguration)}"); scope.Start(); @@ -885,7 +885,7 @@ Page FirstPageFunc(int? pageSizeHint) } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForDetectionConfiguration)}"); scope.Start(); @@ -911,7 +911,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// An containing the collection of instances. + /// An containing the collection of instances. /// or is null. /// is empty or not a valid GUID. public virtual AsyncPageable GetIncidentsForDetectionConfigurationAsync(string detectionConfigurationId, GetIncidentsForDetectionConfigurationOptions options, CancellationToken cancellationToken = default) @@ -970,7 +970,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// A containing the collection of instances. + /// A containing the collection of instances. /// or is null. /// is empty or not a valid GUID. public virtual Pageable GetIncidentsForDetectionConfiguration(string detectionConfigurationId, GetIncidentsForDetectionConfigurationOptions options, CancellationToken cancellationToken = default) @@ -1423,10 +1423,10 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The unique identifier of the alert. /// An optional set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// An containing the collection of instances. + /// An containing the collection of instances. /// or is null. /// or is empty; or is not a valid GUID. - public virtual AsyncPageable GetAnomaliesForAlertAsync(string alertConfigurationId, string alertId, GetAnomaliesForAlertOptions options = default, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAnomaliesForAlertAsync(string alertConfigurationId, string alertId, GetAnomaliesForAlertOptions options = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(alertConfigurationId, nameof(alertConfigurationId)); Argument.AssertNotNullOrEmpty(alertId, nameof(alertId)); @@ -1435,7 +1435,7 @@ public virtual AsyncPageable GetAnomaliesForAlertAsync(string alert int? skip = options?.SkipCount; int? top = options?.TopCount; - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForAlert)}"); scope.Start(); @@ -1452,7 +1452,7 @@ async Task> FirstPageFunc(int? pageSizeHint) } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForAlert)}"); scope.Start(); @@ -1480,10 +1480,10 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// The unique identifier of the alert. /// An optional set of options used to configure the request's behavior. /// A controlling the request lifetime. - /// A containing the collection of instances. + /// A containing the collection of instances. /// or is null. /// or is empty; or is not a valid GUID. - public virtual Pageable GetAnomaliesForAlert(string alertConfigurationId, string alertId, GetAnomaliesForAlertOptions options = default, CancellationToken cancellationToken = default) + public virtual Pageable GetAnomaliesForAlert(string alertConfigurationId, string alertId, GetAnomaliesForAlertOptions options = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(alertConfigurationId, nameof(alertConfigurationId)); Argument.AssertNotNullOrEmpty(alertId, nameof(alertId)); @@ -1492,7 +1492,7 @@ public virtual Pageable GetAnomaliesForAlert(string alertConfigurat int? skip = options?.SkipCount; int? top = options?.TopCount; - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForAlert)}"); scope.Start(); @@ -1509,7 +1509,7 @@ Page FirstPageFunc(int? pageSizeHint) } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(MetricsAdvisorClient)}.{nameof(GetAnomaliesForAlert)}"); scope.Start(); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/AnomalyAlertConfiguration.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/AnomalyAlertConfiguration.cs index 4722c15bbab9..69dd30dc2810 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/AnomalyAlertConfiguration.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/AnomalyAlertConfiguration.cs @@ -19,7 +19,7 @@ public partial class AnomalyAlertConfiguration /// Initializes a new instance of the class. /// /// A custom name for this to be displayed on fired alerts. - /// The unique identifiers of the s that must be notified when an alert is detected by this configuration. + /// The unique identifiers of the s that must be notified when an alert is detected by this configuration. /// The configurations that define which anomalies are eligible for triggering an alert. /// , , or is null. /// is empty. @@ -46,7 +46,7 @@ public AnomalyAlertConfiguration(string name, IList idsOfHooksToAlert, I public string Name { get; } /// - /// The unique identifiers of the s that must be notified when an alert is + /// The unique identifiers of the s that must be notified when an alert is /// detected by this configuration. /// [CodeGenMember("HookIds")] diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/GetAlertsOptions.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/GetAlertsOptions.cs index 6cc918bd33a1..86ff81ecbc60 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/GetAlertsOptions.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyAlert/GetAlertsOptions.cs @@ -17,7 +17,7 @@ public class GetAlertsOptions /// Filters the result. Only alerts triggered from this point in time, in UTC, will be returned. /// Filters the result. Only alerts triggered up to this point in time, in UTC, will be returned. /// Specifies to which time property of an the filters and will be applied. - public GetAlertsOptions(DateTimeOffset startTime, DateTimeOffset endTime, TimeMode timeMode) + public GetAlertsOptions(DateTimeOffset startTime, DateTimeOffset endTime, AlertQueryTimeMode timeMode) { StartTime = startTime; EndTime = endTime; @@ -38,7 +38,7 @@ public GetAlertsOptions(DateTimeOffset startTime, DateTimeOffset endTime, TimeMo /// Specifies to which time property of an the filters /// and will be applied. /// - public TimeMode TimeMode { get; } + public AlertQueryTimeMode TimeMode { get; } /// /// If set, skips the first set of items returned. This property specifies the amount of items to diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/DataAnomaly.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/DataPointAnomaly.cs similarity index 85% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/DataAnomaly.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/DataPointAnomaly.cs index 7d76ad4c2b41..f4181b4763e0 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/DataAnomaly.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/DataPointAnomaly.cs @@ -8,16 +8,16 @@ namespace Azure.AI.MetricsAdvisor.Models { /// - /// The properties of a detected . A is detected according to + /// The properties of a detected . A is detected according to /// the rules set by a . /// [CodeGenModel("AnomalyResult")] - [CodeGenSuppress(nameof(DataAnomaly), typeof(DateTimeOffset), typeof(IReadOnlyDictionary), typeof(AnomalyProperty))] + [CodeGenSuppress(nameof(DataPointAnomaly), typeof(DateTimeOffset), typeof(IReadOnlyDictionary), typeof(AnomalyProperty))] [CodeGenSuppress("Property")] [CodeGenSuppress("Dimension")] - public partial class DataAnomaly + public partial class DataPointAnomaly { - internal DataAnomaly(string metricId, string anomalyDetectionConfigurationId, DateTimeOffset timestamp, DateTimeOffset? createdTime, DateTimeOffset? modifiedTime, IReadOnlyDictionary dimension, AnomalyProperty property) + internal DataPointAnomaly(string metricId, string anomalyDetectionConfigurationId, DateTimeOffset timestamp, DateTimeOffset? createdTime, DateTimeOffset? modifiedTime, IReadOnlyDictionary dimension, AnomalyProperty property) { MetricId = metricId; AnomalyDetectionConfigurationId = anomalyDetectionConfigurationId; @@ -56,7 +56,7 @@ internal DataAnomaly(string metricId, string anomalyDetectionConfigurationId, Da public AnomalySeverity Severity { get; } /// - /// The status of the issue that caused this . This property is only populated + /// The status of the issue that caused this . This property is only populated /// when calling or /// . /// diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncident.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncident.cs index 2ccef60970dd..10bd5ecccee0 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncident.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncident.cs @@ -59,12 +59,12 @@ internal AnomalyIncident(string metricId, string detectionConfigurationId, strin public DimensionKey DimensionKey { get; } /// - /// Corresponds to the time, in UTC, when the first associated occurred. + /// Corresponds to the time, in UTC, when the first associated occurred. /// public DateTimeOffset StartTime { get; } /// - /// Corresponds to the time, in UTC, when the last associated occurred. + /// Corresponds to the time, in UTC, when the last associated occurred. /// public DateTimeOffset LastTime { get; } @@ -77,6 +77,6 @@ internal AnomalyIncident(string metricId, string detectionConfigurationId, strin /// The current status of this . /// [CodeGenMember("IncidentStatus")] - public IncidentStatus? Status { get; } + public AnomalyIncidentStatus? Status { get; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/IncidentStatus.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncidentStatus.cs similarity index 68% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/IncidentStatus.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncidentStatus.cs index b2add7068dd8..64305d6bd124 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/IncidentStatus.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyIncidentStatus.cs @@ -9,16 +9,16 @@ namespace Azure.AI.MetricsAdvisor.Models /// The current status of a detected . /// [CodeGenModel("IncidentPropertyIncidentStatus")] - public readonly partial struct IncidentStatus + public readonly partial struct AnomalyIncidentStatus { /// /// The detected is still active. /// - public static IncidentStatus Active { get; } = new IncidentStatus(ActiveValue); + public static AnomalyIncidentStatus Active { get; } = new AnomalyIncidentStatus(ActiveValue); /// /// The detected has been resolved. /// - public static IncidentStatus Resolved { get; } = new IncidentStatus(ResolvedValue); + public static AnomalyIncidentStatus Resolved { get; } = new AnomalyIncidentStatus(ResolvedValue); } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/TimeMode.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AlertQueryTimeMode.cs similarity index 64% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/TimeMode.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AlertQueryTimeMode.cs index aae309690f92..dd3df3192966 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/TimeMode.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AlertQueryTimeMode.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Azure.Core; + namespace Azure.AI.MetricsAdvisor.Models { /// @@ -8,21 +10,22 @@ namespace Azure.AI.MetricsAdvisor.Models /// in the and the /// operations. /// - public readonly partial struct TimeMode + [CodeGenModel("TimeMode")] + public readonly partial struct AlertQueryTimeMode { /// /// Filters alerts by . /// - public static TimeMode AnomalyTime { get; } = new TimeMode(AnomalyTimeValue); + public static AlertQueryTimeMode AnomalyTime { get; } = new AlertQueryTimeMode(AnomalyTimeValue); /// /// Filters alerts by . /// - public static TimeMode CreatedTime { get; } = new TimeMode(CreatedTimeValue); + public static AlertQueryTimeMode CreatedTime { get; } = new AlertQueryTimeMode(CreatedTimeValue); /// /// Filters alerts by . /// - public static TimeMode ModifiedTime { get; } = new TimeMode(ModifiedTimeValue); + public static AlertQueryTimeMode ModifiedTime { get; } = new AlertQueryTimeMode(ModifiedTimeValue); } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AnomalyStatus.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AnomalyStatus.cs index 589fef0634a4..0a93ae16594f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AnomalyStatus.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/AnomalyStatus.cs @@ -6,7 +6,7 @@ namespace Azure.AI.MetricsAdvisor.Models { /// - /// The current status of the issue that caused a . + /// The current status of the issue that caused a . /// [CodeGenModel("AnomalyPropertyAnomalyStatus")] public readonly partial struct AnomalyStatus diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/DataFeedDetail.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/DataFeedDetail.cs index 5d8e178dbe64..af2d8d2afefd 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/DataFeedDetail.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGen/DataFeedDetail.cs @@ -15,7 +15,7 @@ internal partial class DataFeedDetail public string DataFeedId { get; } /// dimension list. - public IList Dimension { get; } + public IList Dimension { get; } /// data feed administrator. public IList Admins { get; } @@ -40,7 +40,7 @@ public DataFeedDetail(string dataFeedName, DataFeedGranularityType granularityNa DataFeedName = dataFeedName; GranularityName = granularityName; Metrics = metrics.ToList(); - Dimension = new ChangeTrackingList(); + Dimension = new ChangeTrackingList(); DataStartFrom = dataStartFrom; RollUpColumns = new ChangeTrackingList(); Admins = new ChangeTrackingList(); @@ -77,7 +77,7 @@ public DataFeedDetail(string dataFeedName, DataFeedGranularityType granularityNa /// data feed created time. /// action link for alert. /// or is null. - internal DataFeedDetail(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate) + internal DataFeedDetail(DataFeedSourceType dataSourceType, string dataFeedId, string dataFeedName, string dataFeedDescription, DataFeedGranularityType granularityName, int? granularityAmount, IList metrics, IList dimension, string timestampColumn, DateTimeOffset dataStartFrom, long? startOffsetInSeconds, int? maxConcurrency, long? minRetryIntervalInSeconds, long? stopRetryAfterInSeconds, DataFeedRollupType? needRollup, DataFeedAutoRollupMethod? rollUpMethod, IList rollUpColumns, string allUpIdentification, DataFeedMissingDataPointFillType? fillMissingPointType, double? fillMissingPointValue, DataFeedAccessMode? viewMode, IList admins, IList viewers, bool? isAdmin, string creator, DataFeedStatus? status, DateTimeOffset? createdTime, string actionLinkTemplate) { Argument.AssertNotNullOrEmpty(dataFeedName, nameof(dataFeedName)); Argument.AssertNotNullOrEmpty(metrics, nameof(metrics)); @@ -89,7 +89,7 @@ internal DataFeedDetail(DataFeedSourceType dataSourceType, string dataFeedId, st GranularityName = granularityName; GranularityAmount = granularityAmount; Metrics = metrics; - Dimension = dimension ?? new ChangeTrackingList(); + Dimension = dimension ?? new ChangeTrackingList(); TimestampColumn = timestampColumn; DataStartFrom = dataStartFrom; StartOffsetInSeconds = startOffsetInSeconds; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSchema.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSchema.cs index afba378bc67b..47559b44e529 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSchema.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSchema.cs @@ -14,7 +14,7 @@ namespace Azure.AI.MetricsAdvisor.Models /// public class DataFeedSchema { - private IList _dimensionColumns; + private IList _dimensionColumns; /// /// Initializes a new instance of the class. @@ -26,7 +26,7 @@ public DataFeedSchema(IList metricColumns) Argument.AssertNotNull(metricColumns, nameof(metricColumns)); MetricColumns = metricColumns; - DimensionColumns = new ChangeTrackingList(); + DimensionColumns = new ChangeTrackingList(); } internal DataFeedSchema(DataFeedDetail dataFeedDetail) @@ -48,7 +48,7 @@ internal DataFeedSchema(DataFeedDetail dataFeedDetail) /// monitored in search of anomalies. /// /// is null. - public IList DimensionColumns + public IList DimensionColumns { get => _dimensionColumns; set diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricDimension.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeedDimension.cs similarity index 79% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricDimension.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeedDimension.cs index 8ec1551747b1..d545f55aab43 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricDimension.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeedDimension.cs @@ -7,19 +7,19 @@ namespace Azure.AI.MetricsAdvisor.Models { /// - /// A is one or more categorical values. The combination of those values identify a particular univariate time series. + /// A is one or more categorical values. The combination of those values identify a particular univariate time series. /// For example: country, language, tenant, and so on. /// [CodeGenModel("Dimension")] - public partial class MetricDimension + public partial class DataFeedDimension { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The name of the data source's column to be used as a dimension. Values of this dimension will be read only from the specified column. /// is null. /// is empty. - public MetricDimension(string dimensionName) + public DataFeedDimension(string dimensionName) { Argument.AssertNotNullOrEmpty(dimensionName, nameof(dimensionName)); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/EmailHook.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/EmailNotificationHook.cs similarity index 76% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/EmailHook.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/EmailNotificationHook.cs index 1a89ca61cbbd..33bdab8848c7 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/EmailHook.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/EmailNotificationHook.cs @@ -12,17 +12,17 @@ namespace Azure.AI.MetricsAdvisor.Models /// Two types of alert emails will be sent: Data feed not available alerts, and Incident reports which contain one or multiple anomalies. /// [CodeGenModel("EmailHookInfo")] - [CodeGenSuppress(nameof(EmailHook), typeof(string), typeof(EmailHookParameter))] - public partial class EmailHook : AlertingHook + [CodeGenSuppress(nameof(EmailNotificationHook), typeof(string), typeof(EmailHookParameter))] + public partial class EmailNotificationHook : NotificationHook { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The name to assign to the hook. /// The list of e-mail addresses to alert. /// or is null. /// is empty. /// - public EmailHook(string name, IList emailsToAlert) + public EmailNotificationHook(string name, IList emailsToAlert) : base(name) { Argument.AssertNotNull(emailsToAlert, nameof(emailsToAlert)); @@ -31,7 +31,7 @@ public EmailHook(string name, IList emailsToAlert) HookType = HookType.Email; } - internal EmailHook(HookType hookType, string id, string name, string description, string externalLink, IReadOnlyList administrators, EmailHookParameter hookParameter) + internal EmailNotificationHook(HookType hookType, string id, string name, string description, string externalLink, IReadOnlyList administrators, EmailHookParameter hookParameter) : base(hookType, id, name, description, externalLink, administrators) { HookParameter = hookParameter; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/AlertingHook.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/NotificationHook.cs similarity index 73% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/AlertingHook.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/NotificationHook.cs index 9d61206ac78f..89cf03ce0245 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/AlertingHook.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/NotificationHook.cs @@ -11,9 +11,9 @@ namespace Azure.AI.MetricsAdvisor.Models /// An alert notification to be triggered after an anomaly is detected by Metrics Advisor. /// [CodeGenModel("HookInfo")] - public partial class AlertingHook + public partial class NotificationHook { - internal AlertingHook(string name) + internal NotificationHook(string name) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -47,12 +47,12 @@ internal AlertingHook(string name) /// Optional field which enables a customized redirect, such as for troubleshooting notes. public string ExternalLink { get; set; } - internal static HookInfoPatch GetPatchModel(AlertingHook hook) + internal static HookInfoPatch GetPatchModel(NotificationHook hook) { return hook switch { - EmailHook h => new EmailHookInfoPatch() { HookName = h.Name, Description = h.Description, ExternalLink = h.ExternalLink, HookParameter = h.HookParameter, Admins = h.Administrators }, - WebHook h => new WebhookHookInfoPatch() { HookName = h.Name, Description = h.Description, ExternalLink = h.ExternalLink, HookParameter = h.HookParameter, Admins = h.Administrators }, + EmailNotificationHook h => new EmailHookInfoPatch() { HookName = h.Name, Description = h.Description, ExternalLink = h.ExternalLink, HookParameter = h.HookParameter, Admins = h.Administrators }, + WebNotificationHook h => new WebhookHookInfoPatch() { HookName = h.Name, Description = h.Description, ExternalLink = h.ExternalLink, HookParameter = h.HookParameter, Admins = h.Administrators }, _ => throw new InvalidOperationException("Unknown AlertingHook type.") }; } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/WebHook.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/WebNotificationHook.cs similarity index 87% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/WebHook.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/WebNotificationHook.cs index ee7c4522ba92..240a936264d5 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/WebHook.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/Hook/WebNotificationHook.cs @@ -12,17 +12,17 @@ namespace Azure.AI.MetricsAdvisor.Models /// All alerts can be sent through a web hook. /// [CodeGenModel("WebhookHookInfo")] - [CodeGenSuppress(nameof(WebHook), typeof(string), typeof(WebhookHookParameter))] - public partial class WebHook : AlertingHook + [CodeGenSuppress(nameof(WebNotificationHook), typeof(string), typeof(WebhookHookParameter))] + public partial class WebNotificationHook : NotificationHook { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The name to assign to the hook. /// The API address to be called when an alert is triggered. /// or is null. /// or is empty. /// - public WebHook(string name, string endpoint) + public WebNotificationHook(string name, string endpoint) : base(name) { Argument.AssertNotNullOrEmpty(endpoint, nameof(endpoint)); @@ -32,7 +32,7 @@ public WebHook(string name, string endpoint) HookType = HookType.Webhook; } - internal WebHook(HookType hookType, string id, string name, string description, string externalLink, IReadOnlyList administrators, WebhookHookParameter hookParameter) + internal WebNotificationHook(HookType hookType, string id, string name, string description, string externalLink, IReadOnlyList administrators, WebhookHookParameter hookParameter) : base(hookType, id, name, description, externalLink, administrators) { HookParameter = hookParameter; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClientLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClientLiveTests.cs index 57df76a865f0..2697638dbb22 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClientLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClientLiveTests.cs @@ -247,27 +247,27 @@ public async Task HookOperations() { var adminClient = GetMetricsAdvisorAdministrationClient(); - AlertingHook createdEmailHook = await adminClient.CreateHookAsync(new EmailHook(Recording.GenerateAlphaNumericId("test"), new List { "foo@contoso.com" }) { Description = $"{nameof(EmailHook)} description" }).ConfigureAwait(false); + NotificationHook createdEmailHook = await adminClient.CreateHookAsync(new EmailNotificationHook(Recording.GenerateAlphaNumericId("test"), new List { "foo@contoso.com" }) { Description = $"{nameof(EmailNotificationHook)} description" }).ConfigureAwait(false); - EmailHook getEmailHook = (await adminClient.GetHookAsync(createdEmailHook.Id).ConfigureAwait(false)).Value as EmailHook; + EmailNotificationHook getEmailHook = (await adminClient.GetHookAsync(createdEmailHook.Id).ConfigureAwait(false)).Value as EmailNotificationHook; getEmailHook.Description = "updated description"; getEmailHook.EmailsToAlert.Add($"{Recording.GenerateAlphaNumericId("user")}@contoso.com"); await adminClient.UpdateHookAsync(getEmailHook.Id, getEmailHook).ConfigureAwait(false); - AlertingHook createdWebHook = await adminClient.CreateHookAsync(new WebHook(Recording.GenerateAlphaNumericId("test"), "http://contoso.com") { Description = $"{nameof(WebHook)} description" }).ConfigureAwait(false); + NotificationHook createdWebHook = await adminClient.CreateHookAsync(new WebNotificationHook(Recording.GenerateAlphaNumericId("test"), "http://contoso.com") { Description = $"{nameof(WebNotificationHook)} description" }).ConfigureAwait(false); createdWebHook.Description = "updated description"; await adminClient.UpdateHookAsync(createdEmailHook.Id, createdEmailHook).ConfigureAwait(false); - WebHook getWebHook = (await adminClient.GetHookAsync(createdWebHook.Id).ConfigureAwait(false)).Value as WebHook; + WebNotificationHook getWebHook = (await adminClient.GetHookAsync(createdWebHook.Id).ConfigureAwait(false)).Value as WebNotificationHook; getWebHook.Description = "updated description"; getWebHook.CertificateKey = Recording.GenerateAlphaNumericId("key"); - List hooks = await adminClient.GetHooksAsync(new GetHooksOptions { HookNameFilter = getWebHook.Name }).ToEnumerableAsync().ConfigureAwait(false); + List hooks = await adminClient.GetHooksAsync(new GetHooksOptions { HookNameFilter = getWebHook.Name }).ToEnumerableAsync().ConfigureAwait(false); Assert.That(getEmailHook.Id, Is.EqualTo(createdEmailHook.Id)); Assert.That(getEmailHook.Name, Is.EqualTo(createdEmailHook.Name)); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClientLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClientLiveTests.cs index 8caa684859e7..038a748fc7f8 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClientLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClientLiveTests.cs @@ -56,7 +56,7 @@ public async Task GetMetricDimensionValues() foreach (var metricId in feed.MetricIds) { - foreach (MetricDimension dimension in feed.Schema.DimensionColumns) + foreach (DataFeedDimension dimension in feed.Schema.DimensionColumns) { await foreach (string value in client.GetMetricDimensionValuesAsync(metricId, dimension.DimensionName)) { @@ -97,7 +97,7 @@ public async Task GetAnomaliesForDetectionConfiguration() { var client = GetMetricsAdvisorClient(); - List anomalies = await client.GetAnomaliesForDetectionConfigurationAsync( + List anomalies = await client.GetAnomaliesForDetectionConfigurationAsync( DetectionConfigurationId, new GetAnomaliesForDetectionConfigurationOptions(Recording.UtcNow.AddYears(-5), Recording.UtcNow) ).ToEnumerableAsync().ConfigureAwait(false); @@ -178,7 +178,7 @@ public async Task GetAlerts() await foreach (var alert in client.GetAlertsAsync( AlertConfigurationId, - new GetAlertsOptions(Recording.UtcNow.AddYears(-5), Recording.UtcNow, TimeMode.CreatedTime) { TopCount = 1 })) + new GetAlertsOptions(Recording.UtcNow.AddYears(-5), Recording.UtcNow, AlertQueryTimeMode.CreatedTime) { TopCount = 1 })) { Assert.That(alert.Id, Is.Not.Null); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample01_DataFeedCrudOperations.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample01_DataFeedCrudOperations.cs index 34549756f73f..3f3daffbd90e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample01_DataFeedCrudOperations.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample01_DataFeedCrudOperations.cs @@ -41,10 +41,10 @@ public async Task CreateAndDeleteDataFeedAsync() new DataFeedMetric("cost"), new DataFeedMetric("revenue") }; - var dataFeedDimensions = new List() + var dataFeedDimensions = new List() { - new MetricDimension("category"), - new MetricDimension("city") + new DataFeedDimension("category"), + new DataFeedDimension("city") }; var dataFeedSchema = new DataFeedSchema(dataFeedMetrics) { @@ -108,7 +108,7 @@ public async Task GetDataFeedAsync() #endregion Console.WriteLine($"Dimension columns:"); - foreach (MetricDimension dimension in dataFeed.Schema.DimensionColumns) + foreach (DataFeedDimension dimension in dataFeed.Schema.DimensionColumns) { Console.WriteLine($" - {dimension.DimensionName}"); } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample04_HookCrudOperations.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample04_HookCrudOperations.cs index a4e5d6572a62..01d1a00a7ca3 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample04_HookCrudOperations.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample04_HookCrudOperations.cs @@ -31,11 +31,11 @@ public async Task CreateAndDeleteHookAsync() "email2@sample.com" }; - var emailHook = new EmailHook(hookName, emailsToAlert); + var emailHook = new EmailNotificationHook(hookName, emailsToAlert); - Response response = await adminClient.CreateHookAsync(emailHook); + Response response = await adminClient.CreateHookAsync(emailHook); - AlertingHook hook = response.Value; + NotificationHook hook = response.Value; Console.WriteLine($"Hook ID: {hook.Id}"); #endregion @@ -58,9 +58,9 @@ public async Task GetHookAsync() string hookId = HookId; - Response response = await adminClient.GetHookAsync(hookId); + Response response = await adminClient.GetHookAsync(hookId); - AlertingHook hook = response.Value; + NotificationHook hook = response.Value; Console.WriteLine($"Hook name: {hook.Name}"); Console.WriteLine($"Hook description: {hook.Description}"); @@ -73,7 +73,7 @@ public async Task GetHookAsync() if (hook.HookType == HookType.Email) { - EmailHook emailHook = hook as EmailHook; + EmailNotificationHook emailHook = hook as EmailNotificationHook; Console.WriteLine("Emails to alert:"); foreach (string email in emailHook.EmailsToAlert) @@ -83,7 +83,7 @@ public async Task GetHookAsync() } else if (hook.HookType == HookType.Webhook) { - WebHook webHook = hook as WebHook; + WebNotificationHook webHook = hook as WebNotificationHook; Console.WriteLine($"Username: {webHook.Username}"); } @@ -101,8 +101,8 @@ public async Task UpdateHookAsync() string hookId = HookId; - Response response = await adminClient.GetHookAsync(hookId); - AlertingHook hook = response.Value; + Response response = await adminClient.GetHookAsync(hookId); + NotificationHook hook = response.Value; string originalDescription = hook.Description; hook.Description = "This description was generated by a sample."; @@ -133,7 +133,7 @@ public async Task GetHooksAsync() int hookCount = 0; - await foreach (AlertingHook hook in adminClient.GetHooksAsync(options)) + await foreach (NotificationHook hook in adminClient.GetHooksAsync(options)) { Console.WriteLine($"Hook ID: {hook.Id}"); Console.WriteLine($"Name: {hook.Name}"); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample06_QueryTriggeredAlerts.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample06_QueryTriggeredAlerts.cs index 551da9fd035d..782b1c8965f5 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample06_QueryTriggeredAlerts.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample06_QueryTriggeredAlerts.cs @@ -28,7 +28,7 @@ public async Task GetAlertsAsync() var startTime = DateTimeOffset.Parse("2020-01-01T00:00:00Z"); var endTime = DateTimeOffset.UtcNow; - var options = new GetAlertsOptions(startTime, endTime, TimeMode.AnomalyTime) + var options = new GetAlertsOptions(startTime, endTime, AlertQueryTimeMode.AnomalyTime) { TopCount = 5 }; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs index 2ce3dacf3d8f..c417a2bb6bd1 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs @@ -33,7 +33,7 @@ public async Task GetAnomaliesForDetectionConfigurationAsync() int anomalyCount = 0; - await foreach (DataAnomaly anomaly in client.GetAnomaliesForDetectionConfigurationAsync(detectionConfigurationId, options)) + await foreach (DataPointAnomaly anomaly in client.GetAnomaliesForDetectionConfigurationAsync(detectionConfigurationId, options)) { Console.WriteLine($"Anomaly at timestamp: {anomaly.Timestamp}"); Console.WriteLine($"Severity: {anomaly.Severity}"); @@ -75,7 +75,7 @@ public async Task GetAnomaliesForAlertAsync() int anomalyCount = 0; - await foreach (DataAnomaly anomaly in client.GetAnomaliesForAlertAsync(alertConfigurationId, alertId, options)) + await foreach (DataPointAnomaly anomaly in client.GetAnomaliesForAlertAsync(alertConfigurationId, alertId, options)) { Console.WriteLine($"Anomaly detection configuration ID: {anomaly.AnomalyDetectionConfigurationId}"); Console.WriteLine($"Metric ID: {anomaly.MetricId}"); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperations.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperations.json index 1958c073eec4..4fa761dc3ad5 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperations.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperations.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "131", + "Content-Length": "143", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7e3a88912c9a064d942137939b2d0ca3-3db3c229a1042b46-00", + "traceparent": "00-5eff89f29a27e54cb88fa0cd3d8570e3-f2c0f3707913c341-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "a340424e0917a989295b16cb67c02334", @@ -25,31 +25,31 @@ }, "hookType": "Email", "hookName": "testcKKYKlQ4", - "description": "EmailHook description" + "description": "EmailNotificationHook description" }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "e4793c5c-b0e4-4db8-bbbc-0cff6a3e542a", + "apim-request-id": "1e4d926d-b91a-440f-afd7-ec0d0e91fc64", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:36 GMT", - "Location": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/d7e7b6e1-8512-4b00-890c-f1b0ee64f77e", + "Date": "Thu, 22 Oct 2020 23:36:43 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ba052a3c-c5ae-44c1-bbbb-078ce972435f", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "509", - "X-Request-ID": "e4793c5c-b0e4-4db8-bbbc-0cff6a3e542a" + "x-envoy-upstream-service-time": "438", + "X-Request-ID": "1e4d926d-b91a-440f-afd7-ec0d0e91fc64" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/d7e7b6e1-8512-4b00-890c-f1b0ee64f77e", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ba052a3c-c5ae-44c1-bbbb-078ce972435f", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7bb69a557f33004397c8c3d3d96d4b5c-6c4c029c4b7ff547-00", + "traceparent": "00-4a366aa89183774b9124f8f7ef27055f-389d61c1ebdb5f44-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "99f7765b5aa726051d7ecfad3b27388b", @@ -58,21 +58,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "386eade9-0451-4dc7-8a31-e0ea9aa9b5d9", - "Content-Length": "226", + "apim-request-id": "adcf3461-fc94-49e6-a6f7-39812be7e3ed", + "Content-Length": "238", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Oct 2020 15:27:36 GMT", + "Date": "Thu, 22 Oct 2020 23:36:43 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "136", - "X-Request-ID": "386eade9-0451-4dc7-8a31-e0ea9aa9b5d9" + "x-envoy-upstream-service-time": "128", + "X-Request-ID": "adcf3461-fc94-49e6-a6f7-39812be7e3ed" }, "ResponseBody": { - "hookId": "d7e7b6e1-8512-4b00-890c-f1b0ee64f77e", + "hookId": "ba052a3c-c5ae-44c1-bbbb-078ce972435f", "hookName": "testcKKYKlQ4", "hookType": "Email", "externalLink": "", - "description": "EmailHook description", + "description": "EmailNotificationHook description", "admins": [ "foo@contoso.com" ], @@ -84,17 +84,17 @@ } }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/d7e7b6e1-8512-4b00-890c-f1b0ee64f77e", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ba052a3c-c5ae-44c1-bbbb-078ce972435f", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Content-Length": "174", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7cf844f8ce07f94baff7f5d8d7053697-d391eb59606c2545-00", + "traceparent": "00-0699f3c3f2a6ba459ee63c7308483c62-90e42abb19207446-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "742460ad4c50fc857c7e359b50d78df4", @@ -114,28 +114,28 @@ }, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "4e3ad2a5-c78c-4eb0-8132-1b74029a14bd", + "apim-request-id": "d4746804-747b-40ed-89dd-be98da48e12f", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:37 GMT", + "Date": "Thu, 22 Oct 2020 23:36:44 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "422", - "X-Request-ID": "4e3ad2a5-c78c-4eb0-8132-1b74029a14bd" + "x-envoy-upstream-service-time": "459", + "X-Request-ID": "d4746804-747b-40ed-89dd-be98da48e12f" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "134", + "Content-Length": "146", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-dadc5d1812465c4e9a8575024ff64df7-93710fc41b5e054e-00", + "traceparent": "00-5e75dc3f0f81dd4ba9310f10e56e45b2-6dccb45baf936c45-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "24cb8b225b46ea602730eb463691d6d0", @@ -147,33 +147,33 @@ }, "hookType": "Webhook", "hookName": "testHBgz9Xpm", - "description": "WebHook description" + "description": "WebNotificationHook description" }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "2f460858-70a0-499c-b762-7177d0f535bf", + "apim-request-id": "e948b6e6-6cf4-4231-a9b2-3d63519763e3", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:38 GMT", - "Location": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/e27f5840-243f-47ca-b9ac-41ba4f5686e4", + "Date": "Thu, 22 Oct 2020 23:36:45 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/3b8c6cdc-18c7-4a18-9430-d243b2a3e85a", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "879", - "X-Request-ID": "2f460858-70a0-499c-b762-7177d0f535bf" + "x-envoy-upstream-service-time": "1114", + "X-Request-ID": "e948b6e6-6cf4-4231-a9b2-3d63519763e3" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/d7e7b6e1-8512-4b00-890c-f1b0ee64f77e", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ba052a3c-c5ae-44c1-bbbb-078ce972435f", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "131", + "Content-Length": "143", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e1deef7e5e851f4dbe3ba28c84003e4b-c793e40b3ed36c48-00", + "traceparent": "00-2a8a88334eaae94bb4b544cf1f078f86-f3afa6e430a2f841-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "bd31d3f89df1283ab5848bb9eab58dd1", @@ -187,30 +187,30 @@ }, "hookType": "Email", "hookName": "testcKKYKlQ4", - "description": "EmailHook description" + "description": "EmailNotificationHook description" }, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "32595517-93fb-4cb0-b1e5-0cc9f231eea7", + "apim-request-id": "d9d7a30f-a028-48e9-9a35-7ab937a10fb1", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:38 GMT", + "Date": "Thu, 22 Oct 2020 23:36:45 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "293", - "X-Request-ID": "32595517-93fb-4cb0-b1e5-0cc9f231eea7" + "x-envoy-upstream-service-time": "423", + "X-Request-ID": "d9d7a30f-a028-48e9-9a35-7ab937a10fb1" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/e27f5840-243f-47ca-b9ac-41ba4f5686e4", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/3b8c6cdc-18c7-4a18-9430-d243b2a3e85a", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-da69fbd9aa50fe498c3d32018a29b6ef-b5d160ee0df0834f-00", + "traceparent": "00-08aa4130dcbd1b4bb9f41540aaa03a7a-6c40432b417d4e40-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "c45122f2618121b51d4a7420eb47beac", @@ -219,21 +219,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "24ed3a53-9206-47c0-8242-37a0c0674058", - "Content-Length": "315", + "apim-request-id": "aacfff68-cacb-4589-9c2f-5e90f009b63b", + "Content-Length": "327", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Oct 2020 15:27:39 GMT", + "Date": "Thu, 22 Oct 2020 23:36:46 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "130", - "X-Request-ID": "24ed3a53-9206-47c0-8242-37a0c0674058" + "x-envoy-upstream-service-time": "142", + "X-Request-ID": "aacfff68-cacb-4589-9c2f-5e90f009b63b" }, "ResponseBody": { - "hookId": "e27f5840-243f-47ca-b9ac-41ba4f5686e4", + "hookId": "3b8c6cdc-18c7-4a18-9430-d243b2a3e85a", "hookName": "testHBgz9Xpm", "hookType": "Webhook", "externalLink": "", - "description": "WebHook description", + "description": "WebNotificationHook description", "admins": [ "foo@contoso.com" ], @@ -248,14 +248,14 @@ } }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks?hookName=testHBgz9Xpm", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks?hookName=testHBgz9Xpm", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "c16ea251a7d07100a21954133f124f96", @@ -264,23 +264,23 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "2f8a0676-5fe1-4db2-a4da-5ff053850500", - "Content-Length": "344", + "apim-request-id": "ef971303-43d4-48ef-9517-a67d6f490765", + "Content-Length": "356", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Oct 2020 15:27:39 GMT", + "Date": "Thu, 22 Oct 2020 23:36:46 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "101", - "X-Request-ID": "2f8a0676-5fe1-4db2-a4da-5ff053850500" + "x-envoy-upstream-service-time": "83", + "X-Request-ID": "ef971303-43d4-48ef-9517-a67d6f490765" }, "ResponseBody": { "value": [ { - "hookId": "e27f5840-243f-47ca-b9ac-41ba4f5686e4", + "hookId": "3b8c6cdc-18c7-4a18-9430-d243b2a3e85a", "hookName": "testHBgz9Xpm", "hookType": "Webhook", "externalLink": "", - "description": "WebHook description", + "description": "WebNotificationHook description", "admins": [ "foo@contoso.com" ], @@ -298,15 +298,15 @@ } }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/d7e7b6e1-8512-4b00-890c-f1b0ee64f77e", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ba052a3c-c5ae-44c1-bbbb-078ce972435f", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-6a25a44a68288e4ea0c83f928ecfa6c9-ae9adcda46ae5440-00", + "traceparent": "00-ba81e29939eec04bb83058fa53c98416-295127d4b373f64f-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "a79f0f1e19286e3dc6df763414272742", @@ -315,19 +315,19 @@ "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "0c084afe-7665-431a-8c1f-6faf9eccc573", + "apim-request-id": "99764a77-1743-46c8-b327-3cbb9976d27b", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:39 GMT", + "Date": "Thu, 22 Oct 2020 23:36:46 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "157", - "X-Request-ID": "0c084afe-7665-431a-8c1f-6faf9eccc573" + "x-envoy-upstream-service-time": "161", + "X-Request-ID": "99764a77-1743-46c8-b327-3cbb9976d27b" }, "ResponseBody": [] } ], "Variables": { - "METRICSADVISOR_ACCOUNT_NAME": "anuchan-cg-metric-advisor", + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperationsAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperationsAsync.json index b265c1fa51bb..2e6a45a2d7b2 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperationsAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/MetricsAdvisorAdministrationClientLiveTests/HookOperationsAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "131", + "Content-Length": "143", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e08ac6fb0a09904da31573f900a57411-b1eb0796aa2f284c-00", + "traceparent": "00-1cfea5a2f974bc4bb06bfbba17c83b75-53a6a976a059484d-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "a19da4a6989b3c33c58ef6cb6b3a8c71", @@ -25,31 +25,31 @@ }, "hookType": "Email", "hookName": "testYxXkO58o", - "description": "EmailHook description" + "description": "EmailNotificationHook description" }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "7c381ab1-d2ad-474b-924f-780c4d6d5fb5", + "apim-request-id": "7979510c-6d90-4127-b7a7-a3275f00b38b", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:40 GMT", - "Location": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/66b1ef8b-f8e4-41f7-9267-4999a597b76a", + "Date": "Thu, 22 Oct 2020 23:36:46 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/4e9a2dff-72c8-42f2-a916-cd0822cee8e5", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "246", - "X-Request-ID": "7c381ab1-d2ad-474b-924f-780c4d6d5fb5" + "x-envoy-upstream-service-time": "445", + "X-Request-ID": "7979510c-6d90-4127-b7a7-a3275f00b38b" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/66b1ef8b-f8e4-41f7-9267-4999a597b76a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/4e9a2dff-72c8-42f2-a916-cd0822cee8e5", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-beb6b349ec5d554795e7072a26955a2f-5fe1661e09fc3646-00", + "traceparent": "00-4c0a323f8b608b49ade4c3ec437b6db6-b9a3997d1ae9c14d-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "1900913e2e4bcdad0d07eb8884fc4807", @@ -58,21 +58,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "a42d9946-e0ba-43f4-accc-3b33e12851d3", - "Content-Length": "226", + "apim-request-id": "fa25d6bb-d317-47e5-95de-e37dad26756a", + "Content-Length": "238", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Oct 2020 15:27:40 GMT", + "Date": "Thu, 22 Oct 2020 23:36:47 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "144", - "X-Request-ID": "a42d9946-e0ba-43f4-accc-3b33e12851d3" + "x-envoy-upstream-service-time": "135", + "X-Request-ID": "fa25d6bb-d317-47e5-95de-e37dad26756a" }, "ResponseBody": { - "hookId": "66b1ef8b-f8e4-41f7-9267-4999a597b76a", + "hookId": "4e9a2dff-72c8-42f2-a916-cd0822cee8e5", "hookName": "testYxXkO58o", "hookType": "Email", "externalLink": "", - "description": "EmailHook description", + "description": "EmailNotificationHook description", "admins": [ "foo@contoso.com" ], @@ -84,17 +84,17 @@ } }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/66b1ef8b-f8e4-41f7-9267-4999a597b76a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/4e9a2dff-72c8-42f2-a916-cd0822cee8e5", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Content-Length": "174", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-8ed1251843bb9e48afb9ab408d9e6217-8a2fc04532939947-00", + "traceparent": "00-6ecc346037e6c545aee5b98a67ecc752-96ba161f0f2ef349-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "94f95ea61affe46378ea83f6ece06978", @@ -114,28 +114,28 @@ }, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "2529e5c5-b08c-4afc-bb31-44b9d4c5709e", + "apim-request-id": "be559aad-e8de-4619-80eb-fcd0130632f0", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:40 GMT", + "Date": "Thu, 22 Oct 2020 23:36:47 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "289", - "X-Request-ID": "2529e5c5-b08c-4afc-bb31-44b9d4c5709e" + "x-envoy-upstream-service-time": "416", + "X-Request-ID": "be559aad-e8de-4619-80eb-fcd0130632f0" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "134", + "Content-Length": "146", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-1a19c2b54db74e4699da4c6d0c48c887-23646334ea1d834c-00", + "traceparent": "00-9cf57ddeed0314419cf0110d2d37abc4-ab06053c64b20242-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "3538ef46df40982f6c8573ed3418cdf2", @@ -147,33 +147,33 @@ }, "hookType": "Webhook", "hookName": "testE6TA1bYH", - "description": "WebHook description" + "description": "WebNotificationHook description" }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "b0bd5b46-bfcb-4c03-bb91-6ebe951be9d2", + "apim-request-id": "6e2a3b78-d83e-45e4-af91-5ba62ef44272", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:41 GMT", - "Location": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ac19dda6-60f7-45c7-8401-0f9b1057bb84", + "Date": "Thu, 22 Oct 2020 23:36:48 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/2451b7f6-059d-4da5-9b9e-0d6d2b8b633f", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "574", - "X-Request-ID": "b0bd5b46-bfcb-4c03-bb91-6ebe951be9d2" + "x-envoy-upstream-service-time": "840", + "X-Request-ID": "6e2a3b78-d83e-45e4-af91-5ba62ef44272" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/66b1ef8b-f8e4-41f7-9267-4999a597b76a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/4e9a2dff-72c8-42f2-a916-cd0822cee8e5", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "131", + "Content-Length": "143", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-3a67c238bcdafb4a87d9bc5e2bf7cce7-19578c9765069347-00", + "traceparent": "00-0124195a80968a4fb5e2cfe097ea57fc-945991c2c62f744a-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "990f06a35179b21acc81b5721191cefb", @@ -187,30 +187,30 @@ }, "hookType": "Email", "hookName": "testYxXkO58o", - "description": "EmailHook description" + "description": "EmailNotificationHook description" }, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "7b389d04-458b-4b84-9af7-1e4b760f367c", + "apim-request-id": "c11cb892-cce0-43cd-8682-fac4cb7f763b", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:42 GMT", + "Date": "Thu, 22 Oct 2020 23:36:48 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "266", - "X-Request-ID": "7b389d04-458b-4b84-9af7-1e4b760f367c" + "x-envoy-upstream-service-time": "407", + "X-Request-ID": "c11cb892-cce0-43cd-8682-fac4cb7f763b" }, "ResponseBody": [] }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/ac19dda6-60f7-45c7-8401-0f9b1057bb84", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/2451b7f6-059d-4da5-9b9e-0d6d2b8b633f", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-6d7b30a68b1e5e4e88b35bd71e6c939c-4c5ac1cddd13724c-00", + "traceparent": "00-fdea620127390e43b410f3d697ac69be-bf18dbde923ae345-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "104e30a52de299a4bbea8a666d7b43de", @@ -219,21 +219,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "3dcbd897-4e0c-427c-a1e2-7b8effef573b", - "Content-Length": "315", + "apim-request-id": "dc0134e0-b9b9-4111-bf71-5e66386085de", + "Content-Length": "327", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Oct 2020 15:27:42 GMT", + "Date": "Thu, 22 Oct 2020 23:36:48 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "132", - "X-Request-ID": "3dcbd897-4e0c-427c-a1e2-7b8effef573b" + "x-envoy-upstream-service-time": "124", + "X-Request-ID": "dc0134e0-b9b9-4111-bf71-5e66386085de" }, "ResponseBody": { - "hookId": "ac19dda6-60f7-45c7-8401-0f9b1057bb84", + "hookId": "2451b7f6-059d-4da5-9b9e-0d6d2b8b633f", "hookName": "testE6TA1bYH", "hookType": "Webhook", "externalLink": "", - "description": "WebHook description", + "description": "WebNotificationHook description", "admins": [ "foo@contoso.com" ], @@ -248,14 +248,14 @@ } }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks?hookName=testE6TA1bYH", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks?hookName=testE6TA1bYH", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "bf6985d4bc29da87b7774704c9bd1075", @@ -264,23 +264,23 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "72463b7e-2dea-4a89-89a9-45f041c8f865", - "Content-Length": "344", + "apim-request-id": "7c6d56be-3ace-4039-b923-268f3e5794bc", + "Content-Length": "356", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Oct 2020 15:27:42 GMT", + "Date": "Thu, 22 Oct 2020 23:36:48 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "89", - "X-Request-ID": "72463b7e-2dea-4a89-89a9-45f041c8f865" + "x-envoy-upstream-service-time": "83", + "X-Request-ID": "7c6d56be-3ace-4039-b923-268f3e5794bc" }, "ResponseBody": { "value": [ { - "hookId": "ac19dda6-60f7-45c7-8401-0f9b1057bb84", + "hookId": "2451b7f6-059d-4da5-9b9e-0d6d2b8b633f", "hookName": "testE6TA1bYH", "hookType": "Webhook", "externalLink": "", - "description": "WebHook description", + "description": "WebNotificationHook description", "admins": [ "foo@contoso.com" ], @@ -298,15 +298,15 @@ } }, { - "RequestUri": "https://anuchan-cg-metric-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/66b1ef8b-f8e4-41f7-9267-4999a597b76a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/hooks/4e9a2dff-72c8-42f2-a916-cd0822cee8e5", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-135acd85a7d1b3418c2c98e2ba160c77-58f193c2d5b27949-00", + "traceparent": "00-9dc010767474eb4eaf66ed9bf45dd82b-df20721b323b054f-00", "User-Agent": [ - "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201005.1", - "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.18363 )" + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20201022.1", + "(.NET Core 4.6.29321.03; Microsoft Windows 10.0.19042 )" ], "x-api-key": "Sanitized", "x-ms-client-request-id": "8ede7662b4c650453ed7706fa0285f87", @@ -315,19 +315,19 @@ "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "1fa4b975-74cb-46dc-8417-45cfd55121fc", + "apim-request-id": "c7e5feec-2938-4eb6-856b-80bff81171fd", "Content-Length": "0", - "Date": "Mon, 05 Oct 2020 15:27:42 GMT", + "Date": "Thu, 22 Oct 2020 23:36:49 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "X-Content-Type-Options": "nosniff", - "x-envoy-upstream-service-time": "170", - "X-Request-ID": "1fa4b975-74cb-46dc-8417-45cfd55121fc" + "x-envoy-upstream-service-time": "162", + "X-Request-ID": "c7e5feec-2938-4eb6-856b-80bff81171fd" }, "ResponseBody": [] } ], "Variables": { - "METRICSADVISOR_ACCOUNT_NAME": "anuchan-cg-metric-advisor", + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", From ff90f2245e7249ad0328870db178918170519f42 Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 23 Oct 2020 14:18:45 -0400 Subject: [PATCH 10/28] [Event Hubs Client] Incorporate Feedback (#16220) The focus of these changes is to incorporate feedback that was inadvertently missed before merging #16044. --- .../src/EventProcessorClient.cs | 4 ++-- .../Azure.Messaging.EventHubs/src/EventHubConnection.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs index 3ad9d1f90e2b..470b2bf4403c 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/EventProcessorClient.cs @@ -418,7 +418,7 @@ public EventProcessorClient(BlobContainerClient checkpointStore, /// /// /// The container associated with the is expected to exist; the - /// does not assume the ability to manage the storage account and is safe to run without permission to manage the storage account. + /// does not assume the ability to manage the storage account and is safe to run with only read/write permission for blobs in the container. /// /// public EventProcessorClient(BlobContainerClient checkpointStore, @@ -445,7 +445,7 @@ public EventProcessorClient(BlobContainerClient checkpointStore, /// /// /// The container associated with the is expected to exist; the - /// does not assume the ability to manage the storage account and is safe to run without permission to manage the storage account. + /// does not assume the ability to manage the storage account and is safe to run with only read/write permission for blobs in the container. /// /// public EventProcessorClient(BlobContainerClient checkpointStore, diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs index 32d3490e9184..32011b64db13 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/EventHubConnection.cs @@ -509,7 +509,7 @@ internal static string BuildConnectionAudience(EventHubsTransportType transportT /// The name of the Event Hub being connected to. /// The type of transport being used for the connection. /// - /// The which the was translated into. + /// The which the was translated into, if the parameters were populated; otherwise, null. /// internal static SharedAccessSignatureCredential TranslateSharedKeyCredential(EventHubsSharedAccessKeyCredential credential, string fullyQualifiedNamespace, From 62858312575595364bb8471abb5c7f03cc20f5a2 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Fri, 23 Oct 2020 11:29:03 -0700 Subject: [PATCH 11/28] Add Azure.Core to digital twins project (#16223) We had a reference to its .csproj, but we didn't add it to our solution so that it would build properly --- .../Azure.DigitalTwins.Core/Azure.DigitalTwins.Core.sln | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/Azure.DigitalTwins.Core.sln b/sdk/digitaltwins/Azure.DigitalTwins.Core/Azure.DigitalTwins.Core.sln index 55edb7319efb..f5886c525886 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/Azure.DigitalTwins.Core.sln +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/Azure.DigitalTwins.Core.sln @@ -21,6 +21,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{1FC8A3EA-3C0D-4DDF-B710-A7091F2CEBB1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core", "..\..\core\Azure.Core\src\Azure.Core.csproj", "{861E603A-6ADF-41C2-9364-C39499C08F25}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,6 +45,10 @@ Global {1FC8A3EA-3C0D-4DDF-B710-A7091F2CEBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU {1FC8A3EA-3C0D-4DDF-B710-A7091F2CEBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU {1FC8A3EA-3C0D-4DDF-B710-A7091F2CEBB1}.Release|Any CPU.Build.0 = Release|Any CPU + {861E603A-6ADF-41C2-9364-C39499C08F25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {861E603A-6ADF-41C2-9364-C39499C08F25}.Debug|Any CPU.Build.0 = Debug|Any CPU + {861E603A-6ADF-41C2-9364-C39499C08F25}.Release|Any CPU.ActiveCfg = Release|Any CPU + {861E603A-6ADF-41C2-9364-C39499C08F25}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 9d72430e560bfa753558143a4eb022767da5436d Mon Sep 17 00:00:00 2001 From: "David R. Williamson" Date: Fri, 23 Oct 2020 12:14:14 -0700 Subject: [PATCH 12/28] ADT: Rename Model(s) to DtdlModel(s) (#16226) --- .../api/Azure.DigitalTwins.Core.netstandard2.0.cs | 6 +++--- .../Customized/Models/DigitalTwinsModelData.cs | 14 ++++++++------ .../src/DigitalTwinsClient.cs | 15 ++++++++------- .../src/Generated/Models/DigitalTwinsModelData.cs | 6 +++--- .../Azure.DigitalTwins.Core/tests/ModelsTests.cs | 2 +- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs index 1528a0af98e2..9fd05c6e8916 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs @@ -65,8 +65,8 @@ public DigitalTwinsClient(System.Uri endpoint, Azure.Core.TokenCredential creden public virtual Azure.Response CreateDigitalTwin(string digitalTwinId, T digitalTwin, Azure.DigitalTwins.Core.CreateDigitalTwinOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateEventRoute(string eventRouteId, Azure.DigitalTwins.Core.EventRoute eventRoute, Azure.DigitalTwins.Core.CreateEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateEventRouteAsync(string eventRouteId, Azure.DigitalTwins.Core.EventRoute eventRoute, Azure.DigitalTwins.Core.CreateEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateModels(System.Collections.Generic.IEnumerable models, Azure.DigitalTwins.Core.CreateModelsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateModelsAsync(System.Collections.Generic.IEnumerable models, Azure.DigitalTwins.Core.CreateModelsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateModels(System.Collections.Generic.IEnumerable dtdlModels, Azure.DigitalTwins.Core.CreateModelsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateModelsAsync(System.Collections.Generic.IEnumerable dtdlModels, Azure.DigitalTwins.Core.CreateModelsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateRelationshipAsync(string digitalTwinId, string relationshipId, T relationship, Azure.DigitalTwins.Core.CreateRelationshipOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateRelationship(string digitalTwinId, string relationshipId, T relationship, Azure.DigitalTwins.Core.CreateRelationshipOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DecommissionModel(string modelId, Azure.DigitalTwins.Core.DecomissionModelOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -126,8 +126,8 @@ internal DigitalTwinsModelData() { } public bool? Decommissioned { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Description { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary DisplayName { get { throw null; } } + public string DtdlModel { get { throw null; } } public string Id { get { throw null; } } - public string Model { get { throw null; } } public System.DateTimeOffset? UploadTime { get { throw null; } } } public partial class EventRoute diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs index d50c5b6f69b9..506f25517a36 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Collections.Generic; using Azure.Core; namespace Azure.DigitalTwins.Core @@ -10,14 +8,18 @@ namespace Azure.DigitalTwins.Core [CodeGenModel("DigitalTwinsModelData")] public partial class DigitalTwinsModelData { - // This class declaration makes the generated class of the same name declare Model as a **string** rather than an **object**. - // It also changes the namespace and renames the type from "ModelData" to "DigitalTwinsModelData" + // This class declaration: + // - Changes the namespace and renames the type from "ModelData" to "DigitalTwinsModelData" + // - Makes the generated class of the same name declare Model as a **string** rather than an **object**. + // - Renames Model to DtdlModel. // Do not remove. /// - /// The model definition. + /// The model definition that conforms to the Digital Twins Definition Language (DTDL). /// - public string Model { get; } + /// + [CodeGenMember("Model")] + public string DtdlModel { get; } #region null overrides diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs index 01d2a95e0435..42e4d78f8d86 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs @@ -1283,7 +1283,7 @@ public virtual Response DecommissionModel(string modelId, DecomissionModelOption /// /// Creates one or many models asynchronously. /// - /// The set of models to create. Each string corresponds to exactly one model. + /// The set of models conforming to the Digital Twins Definition Language (DTDL) to create. Each string corresponds to exactly one model. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. /// The created models and the http response . @@ -1301,22 +1301,23 @@ public virtual Response DecommissionModel(string modelId, DecomissionModelOption /// For more samples, see our repo samples. /// /// + /// /// /// /// await client.CreateModelsAsync(new[] { newComponentModelPayload, newModelPayload }); /// Console.WriteLine($"Created models '{componentModelId}' and '{sampleModelId}'."); /// /// - public virtual async Task> CreateModelsAsync(IEnumerable models, CreateModelsOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateModelsAsync(IEnumerable dtdlModels, CreateModelsOptions options = null, CancellationToken cancellationToken = default) { - Response> response = await _dtModelsRestClient.AddAsync(models, options, cancellationToken).ConfigureAwait(false); + Response> response = await _dtModelsRestClient.AddAsync(dtdlModels, options, cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value.ToArray(), response.GetRawResponse()); } /// /// Creates one or many models synchronously. /// - /// The set of models to create. Each string corresponds to exactly one model. + /// The set of models conforming to the Digital Twins Definition Language (DTDL) to create. Each string corresponds to exactly one model. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. /// The created models and the http response . @@ -1331,15 +1332,16 @@ public virtual async Task> CreateModelsAsync(I /// For more samples, see our repo samples. /// /// + /// /// /// The exception that captures the errors from the service. Check the and properties for more details. /// /// /// See the asynchronous version of this method for examples. /// - public virtual Response CreateModels(IEnumerable models, CreateModelsOptions options = null, CancellationToken cancellationToken = default) + public virtual Response CreateModels(IEnumerable dtdlModels, CreateModelsOptions options = null, CancellationToken cancellationToken = default) { - Response> response = _dtModelsRestClient.Add(models, options, cancellationToken); + Response> response = _dtModelsRestClient.Add(dtdlModels, options, cancellationToken); return Response.FromValue(response.Value.ToArray(), response.GetRawResponse()); } @@ -2038,7 +2040,6 @@ internal static async Task WriteToStream(T obj, ObjectSerialize if (async) { - await objectSerializer.SerializeAsync(memoryStream, obj, typeof(T), cancellationToken).ConfigureAwait(false); } else diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs index 28b3d0998468..0ea092ac02f5 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs @@ -21,15 +21,15 @@ public partial class DigitalTwinsModelData /// The id of the model as specified in the model definition. /// The time the model was uploaded to the service. /// Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins. - /// The model definition. - internal DigitalTwinsModelData(IReadOnlyDictionary displayName, IReadOnlyDictionary description, string id, DateTimeOffset? uploadTime, bool? decommissioned, string model) + /// The model definition. + internal DigitalTwinsModelData(IReadOnlyDictionary displayName, IReadOnlyDictionary description, string id, DateTimeOffset? uploadTime, bool? decommissioned, string dtdlModel) { DisplayName = displayName; Description = description; Id = id; UploadTime = uploadTime; Decommissioned = decommissioned; - Model = model; + DtdlModel = dtdlModel; } /// A language map that contains the localized display names as specified in the model definition. diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/ModelsTests.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/ModelsTests.cs index 9bf642321410..9de837b3d622 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/ModelsTests.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/ModelsTests.cs @@ -44,7 +44,7 @@ public async Task Models_Lifecycle() // GET one created model Response buildingModel = await client.GetModelAsync(buildingModelId).ConfigureAwait(false); - Console.WriteLine($"Got {buildingModelId} as {buildingModel.Value.Model}"); + Console.WriteLine($"Got {buildingModelId} as {buildingModel.Value.DtdlModel}"); // LIST all models AsyncPageable models = client.GetModelsAsync(); From af50cfc63ddb78555020fe6b22b8a794c4262794 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Fri, 23 Oct 2020 12:25:07 -0700 Subject: [PATCH 13/28] Azure Monitor Exporter: more renaming (#16224) --- sdk/core/Azure.Core/Azure.Core.All.sln | 122 ++++++++---------- ...t.Azure.Monitor.OpenTelemetry.Exporter.sln | 2 +- .../AzureMonitorConverterTests.cs | 0 .../AzureMonitorTraceExporterTests.cs | 0 .../ConnectionStringParserTests.cs | 0 .../ConnectionStringParser_BuildUriTests.cs | 0 .../ConnectionString/ConnectionStringTests.cs | 0 .../ExceptionExtensionsTests.cs | 0 .../HttpHelperTests.cs | 0 ...onitor.OpenTelemetry.Exporter.Tests.csproj | 0 .../NDJsonWriterTests.cs | 0 .../StubException.cs | 0 .../TagsExtensionTests.cs | 0 13 files changed, 54 insertions(+), 70 deletions(-) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/AzureMonitorConverterTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/AzureMonitorTraceExporterTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/ConnectionString/ConnectionStringParserTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/ConnectionString/ConnectionStringParser_BuildUriTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/ConnectionString/ConnectionStringTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/ExceptionExtensionsTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/HttpHelperTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/NDJsonWriterTests.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/StubException.cs (100%) rename sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/{Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest => Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests}/TagsExtensionTests.cs (100%) diff --git a/sdk/core/Azure.Core/Azure.Core.All.sln b/sdk/core/Azure.Core/Azure.Core.All.sln index 9499a9275c6e..6a764ea77e15 100644 --- a/sdk/core/Azure.Core/Azure.Core.All.sln +++ b/sdk/core/Azure.Core/Azure.Core.All.sln @@ -205,51 +205,51 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Storage.Internal.Avro EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IotHubClientSamples", "..\..\iot\Azure.Iot.Hub.Service\samples\IotHubClientSamples\IotHubClientSamples.csproj", "{E4EA7D47-B37F-45EE-8366-944A395859F2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.AnomalyDetector", "..\..\anomalydetector\Azure.AI.AnomalyDetector\src\Azure.AI.AnomalyDetector.csproj", "{12A6863D-EED3-49AA-819B-6A9E70CA1720}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.AnomalyDetector", "..\..\anomalydetector\Azure.AI.AnomalyDetector\src\Azure.AI.AnomalyDetector.csproj", "{12A6863D-EED3-49AA-819B-6A9E70CA1720}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.AnomalyDetector.Tests", "..\..\anomalydetector\Azure.AI.AnomalyDetector\tests\Azure.AI.AnomalyDetector.Tests.csproj", "{D0C0BE31-9F7C-48FD-8EBA-C0E139CF4ECF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.AnomalyDetector.Tests", "..\..\anomalydetector\Azure.AI.AnomalyDetector\tests\Azure.AI.AnomalyDetector.Tests.csproj", "{D0C0BE31-9F7C-48FD-8EBA-C0E139CF4ECF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.CosmosDB", "..\..\cosmosdb\Azure.ResourceManager.CosmosDB\src\Azure.ResourceManager.CosmosDB.csproj", "{6ED5EF9B-08E9-4287-BDF6-187477F56F5A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.CosmosDB", "..\..\cosmosdb\Azure.ResourceManager.CosmosDB\src\Azure.ResourceManager.CosmosDB.csproj", "{6ED5EF9B-08E9-4287-BDF6-187477F56F5A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.CosmosDB.Tests", "..\..\cosmosdb\Azure.ResourceManager.CosmosDB\tests\Azure.ResourceManager.CosmosDB.Tests.csproj", "{FCB67E1C-4324-4FF5-848B-4AA8B36DE74A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.CosmosDB.Tests", "..\..\cosmosdb\Azure.ResourceManager.CosmosDB\tests\Azure.ResourceManager.CosmosDB.Tests.csproj", "{FCB67E1C-4324-4FF5-848B-4AA8B36DE74A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Dns", "..\..\dns\Azure.ResourceManager.Dns\src\Azure.ResourceManager.Dns.csproj", "{83B381DE-8CA6-4C7C-B255-745CB717EA3B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Dns", "..\..\dns\Azure.ResourceManager.Dns\src\Azure.ResourceManager.Dns.csproj", "{83B381DE-8CA6-4C7C-B255-745CB717EA3B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Dns.Tests", "..\..\dns\Azure.ResourceManager.Dns\tests\Azure.ResourceManager.Dns.Tests.csproj", "{D4889902-E8BF-40EE-A2BB-71D9E8CB98B2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Dns.Tests", "..\..\dns\Azure.ResourceManager.Dns\tests\Azure.ResourceManager.Dns.Tests.csproj", "{D4889902-E8BF-40EE-A2BB-71D9E8CB98B2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Sql", "..\..\sqlmanagement\Azure.ResourceManager.Sql\src\Azure.ResourceManager.Sql.csproj", "{7F3E131C-5A52-4668-BDE7-88585B9BDE9A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Sql", "..\..\sqlmanagement\Azure.ResourceManager.Sql\src\Azure.ResourceManager.Sql.csproj", "{7F3E131C-5A52-4668-BDE7-88585B9BDE9A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Sql.Tests", "..\..\sqlmanagement\Azure.ResourceManager.Sql\tests\Azure.ResourceManager.Sql.Tests.csproj", "{7458E73F-7F1A-455B-96DC-2071BCB089F5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Sql.Tests", "..\..\sqlmanagement\Azure.ResourceManager.Sql\tests\Azure.ResourceManager.Sql.Tests.csproj", "{7458E73F-7F1A-455B-96DC-2071BCB089F5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Core.NewtonsoftJson", "..\Microsoft.Azure.Core.NewtonsoftJson\src\Microsoft.Azure.Core.NewtonsoftJson.csproj", "{B3E1B17C-73A7-4E2F-9A66-F29BDD68CD63}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Core.NewtonsoftJson", "..\Microsoft.Azure.Core.NewtonsoftJson\src\Microsoft.Azure.Core.NewtonsoftJson.csproj", "{B3E1B17C-73A7-4E2F-9A66-F29BDD68CD63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Core.NewtonsoftJson.Tests", "..\Microsoft.Azure.Core.NewtonsoftJson\tests\Microsoft.Azure.Core.NewtonsoftJson.Tests.csproj", "{9F432570-3808-4828-9EB8-66E291BA8EB2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Core.NewtonsoftJson.Tests", "..\Microsoft.Azure.Core.NewtonsoftJson\tests\Microsoft.Azure.Core.NewtonsoftJson.Tests.csproj", "{9F432570-3808-4828-9EB8-66E291BA8EB2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.Clients.Samples", "..\..\extensions\Microsoft.Azure.WebJobs.Extensions.Clients\samples\Microsoft.Azure.WebJobs.Extensions.Clients.Samples.csproj", "{08189C7A-5899-40F3-91BE-F0DF83DD34F2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.WebJobs.Extensions.Clients.Samples", "..\..\extensions\Microsoft.Azure.WebJobs.Extensions.Clients\samples\Microsoft.Azure.WebJobs.Extensions.Clients.Samples.csproj", "{08189C7A-5899-40F3-91BE-F0DF83DD34F2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.Clients.Tests", "..\..\extensions\Microsoft.Azure.WebJobs.Extensions.Clients\tests\Microsoft.Azure.WebJobs.Extensions.Clients.Tests.csproj", "{88D0ADB1-F9B6-48DB-BE18-CF0CE11E49B0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.WebJobs.Extensions.Clients.Tests", "..\..\extensions\Microsoft.Azure.WebJobs.Extensions.Clients\tests\Microsoft.Azure.WebJobs.Extensions.Clients.Tests.csproj", "{88D0ADB1-F9B6-48DB-BE18-CF0CE11E49B0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Extensions.Azure", "..\..\extensions\Microsoft.Extensions.Azure\src\Microsoft.Extensions.Azure.csproj", "{6F1BF1BB-EF86-45A7-A96F-5DA9AD748583}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Azure", "..\..\extensions\Microsoft.Extensions.Azure\src\Microsoft.Extensions.Azure.csproj", "{6F1BF1BB-EF86-45A7-A96F-5DA9AD748583}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Extensions.Azure.Samples", "..\..\extensions\Microsoft.Extensions.Azure\samples\Microsoft.Extensions.Azure.Samples.csproj", "{CA140CF8-B22E-44EB-A1AD-4727A1CCE51F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Azure.Samples", "..\..\extensions\Microsoft.Extensions.Azure\samples\Microsoft.Extensions.Azure.Samples.csproj", "{CA140CF8-B22E-44EB-A1AD-4727A1CCE51F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Extensions.Azure.Tests", "..\..\extensions\Microsoft.Extensions.Azure\tests\Microsoft.Extensions.Azure.Tests.csproj", "{B1752F71-5BDB-4E28-96BC-CDAFCEAAC255}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Azure.Tests", "..\..\extensions\Microsoft.Extensions.Azure\tests\Microsoft.Extensions.Azure.Tests.csproj", "{B1752F71-5BDB-4E28-96BC-CDAFCEAAC255}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.AzureMonitor", "..\..\monitor\OpenTelemetry.Exporter.AzureMonitor\src\OpenTelemetry.Exporter.AzureMonitor.csproj", "{9D8657F9-D1C0-4D45-9961-0037B78A9DDF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter", "..\..\monitor\Microsoft.Azure.Monitor.OpenTelemetry.Exporter\src\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.csproj", "{9D8657F9-D1C0-4D45-9961-0037B78A9DDF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing", "..\..\monitor\OpenTelemetry.Exporter.AzureMonitor\tests\OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing\OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj", "{36EE1A13-6B13-47FF-A6EA-E64E8567992A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing", "..\..\monitor\Microsoft.Azure.Monitor.OpenTelemetry.Exporter\tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj", "{36EE1A13-6B13-47FF-A6EA-E64E8567992A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.AzureMonitor.Tests", "..\..\monitor\OpenTelemetry.Exporter.AzureMonitor\tests\OpenTelemetry.Exporter.AzureMonitor.UnitTest\OpenTelemetry.Exporter.AzureMonitor.Tests.csproj", "{BD291E22-BE9A-4D9F-B32A-685DEE36EE1D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests", "..\..\monitor\Microsoft.Azure.Monitor.OpenTelemetry.Exporter\tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj", "{BD291E22-BE9A-4D9F-B32A-685DEE36EE1D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareLink", "..\..\keyvault\samples\sharelink\ShareLink.csproj", "{28B02839-0F22-40F2-9A80-C4384881A54F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShareLink", "..\..\keyvault\samples\sharelink\ShareLink.csproj", "{28B02839-0F22-40F2-9A80-C4384881A54F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Core.Spatial.NewtonsoftJson", "..\Microsoft.Azure.Core.Spatial.NewtonsoftJson\src\Microsoft.Azure.Core.Spatial.NewtonsoftJson.csproj", "{C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Core.Spatial.NewtonsoftJson.Tests", "..\Microsoft.Azure.Core.Spatial.NewtonsoftJson\tests\Microsoft.Azure.Core.Spatial.NewtonsoftJson.Tests.csproj", "{622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Core.Spatial", "..\Microsoft.Azure.Core.Spatial\src\Microsoft.Azure.Core.Spatial.csproj", "{25A7E209-D5D2-41F1-AFE9-E860D6294EF5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Core.Spatial", "..\Microsoft.Azure.Core.Spatial\src\Microsoft.Azure.Core.Spatial.csproj", "{25A7E209-D5D2-41F1-AFE9-E860D6294EF5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Core.Spatial.Tests", "..\Microsoft.Azure.Core.Spatial\tests\Microsoft.Azure.Core.Spatial.Tests.csproj", "{36FF59A9-D6C9-4226-A0FE-47C879F3EB94}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Core.Spatial.Tests", "..\Microsoft.Azure.Core.Spatial\tests\Microsoft.Azure.Core.Spatial.Tests.csproj", "{36FF59A9-D6C9-4226-A0FE-47C879F3EB94}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution @@ -1296,54 +1296,6 @@ Global {CE8663D2-B3C6-42B4-9A62-9A0BA4707464}.Release|x64.Build.0 = Release|Any CPU {CE8663D2-B3C6-42B4-9A62-9A0BA4707464}.Release|x86.ActiveCfg = Release|Any CPU {CE8663D2-B3C6-42B4-9A62-9A0BA4707464}.Release|x86.Build.0 = Release|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Debug|x64.ActiveCfg = Debug|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Debug|x64.Build.0 = Debug|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Debug|x86.ActiveCfg = Debug|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Debug|x86.Build.0 = Debug|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Release|Any CPU.Build.0 = Release|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Release|x64.ActiveCfg = Release|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Release|x64.Build.0 = Release|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Release|x86.ActiveCfg = Release|Any CPU - {E4CE8E6D-C0B6-4C99-8027-332BA51C6EEF}.Release|x86.Build.0 = Release|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Debug|x64.ActiveCfg = Debug|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Debug|x64.Build.0 = Debug|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Debug|x86.ActiveCfg = Debug|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Debug|x86.Build.0 = Debug|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Release|Any CPU.Build.0 = Release|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Release|x64.ActiveCfg = Release|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Release|x64.Build.0 = Release|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Release|x86.ActiveCfg = Release|Any CPU - {6C445CE2-1A18-48B5-96D1-5F1D288ABA58}.Release|x86.Build.0 = Release|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Debug|x64.ActiveCfg = Debug|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Debug|x64.Build.0 = Debug|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Debug|x86.ActiveCfg = Debug|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Debug|x86.Build.0 = Debug|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Release|Any CPU.Build.0 = Release|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Release|x64.ActiveCfg = Release|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Release|x64.Build.0 = Release|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Release|x86.ActiveCfg = Release|Any CPU - {1ACD56F7-1828-46ED-B98A-3FD2A37F55E9}.Release|x86.Build.0 = Release|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Debug|x64.ActiveCfg = Debug|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Debug|x64.Build.0 = Debug|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Debug|x86.ActiveCfg = Debug|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Debug|x86.Build.0 = Debug|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Release|Any CPU.Build.0 = Release|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Release|x64.ActiveCfg = Release|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Release|x64.Build.0 = Release|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Release|x86.ActiveCfg = Release|Any CPU - {85187149-00E3-4C3A-81D7-D42A61CB0381}.Release|x86.Build.0 = Release|Any CPU {4D647887-E161-4DB5-9C92-E5930EF9CEBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4D647887-E161-4DB5-9C92-E5930EF9CEBB}.Debug|Any CPU.Build.0 = Debug|Any CPU {4D647887-E161-4DB5-9C92-E5930EF9CEBB}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1766,20 +1718,52 @@ Global {28B02839-0F22-40F2-9A80-C4384881A54F}.Release|x86.Build.0 = Release|Any CPU {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Debug|x64.ActiveCfg = Debug|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Debug|x64.Build.0 = Debug|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Debug|x86.ActiveCfg = Debug|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Debug|x86.Build.0 = Debug|Any CPU {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Release|Any CPU.Build.0 = Release|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Release|x64.ActiveCfg = Release|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Release|x64.Build.0 = Release|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Release|x86.ActiveCfg = Release|Any CPU + {C2A3FECA-1696-4EDD-ABA1-30F1E3D6CE1D}.Release|x86.Build.0 = Release|Any CPU {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Debug|x64.ActiveCfg = Debug|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Debug|x64.Build.0 = Debug|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Debug|x86.ActiveCfg = Debug|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Debug|x86.Build.0 = Debug|Any CPU {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Release|Any CPU.Build.0 = Release|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Release|x64.ActiveCfg = Release|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Release|x64.Build.0 = Release|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Release|x86.ActiveCfg = Release|Any CPU + {622772C8-A2CB-4F8B-82EB-2A46BCC21DAE}.Release|x86.Build.0 = Release|Any CPU {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Debug|x64.ActiveCfg = Debug|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Debug|x64.Build.0 = Debug|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Debug|x86.ActiveCfg = Debug|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Debug|x86.Build.0 = Debug|Any CPU {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Release|Any CPU.Build.0 = Release|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Release|x64.ActiveCfg = Release|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Release|x64.Build.0 = Release|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Release|x86.ActiveCfg = Release|Any CPU + {25A7E209-D5D2-41F1-AFE9-E860D6294EF5}.Release|x86.Build.0 = Release|Any CPU {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Debug|x64.ActiveCfg = Debug|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Debug|x64.Build.0 = Debug|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Debug|x86.ActiveCfg = Debug|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Debug|x86.Build.0 = Debug|Any CPU {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Release|Any CPU.ActiveCfg = Release|Any CPU {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Release|Any CPU.Build.0 = Release|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Release|x64.ActiveCfg = Release|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Release|x64.Build.0 = Release|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Release|x86.ActiveCfg = Release|Any CPU + {36FF59A9-D6C9-4226-A0FE-47C879F3EB94}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln index d5856e41507f..84484b36b735 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.sln @@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.Ope EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj", "{966EFB72-64D7-46D8-B592-9C141C5703F9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj", "{14546496-6144-49A5-9431-09611F38D30E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj", "{14546496-6144-49A5-9431-09611F38D30E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Integration.Tests.AspNetCoreWebApp", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp\Integration.Tests.AspNetCoreWebApp.csproj", "{E00C15D6-96E5-4A3B-8701-AC24292301CE}" EndProject diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorConverterTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/AzureMonitorConverterTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorConverterTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/AzureMonitorConverterTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorTraceExporterTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/AzureMonitorTraceExporterTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/AzureMonitorTraceExporterTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/AzureMonitorTraceExporterTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParserTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ConnectionString/ConnectionStringParserTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParserTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ConnectionString/ConnectionStringParserTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ConnectionString/ConnectionStringParser_BuildUriTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringParser_BuildUriTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ConnectionString/ConnectionStringParser_BuildUriTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ConnectionString/ConnectionStringTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ConnectionString/ConnectionStringTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ConnectionString/ConnectionStringTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ExceptionExtensionsTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ExceptionExtensionsTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/ExceptionExtensionsTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/ExceptionExtensionsTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/HttpHelperTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/HttpHelperTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/HttpHelperTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/HttpHelperTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/NDJsonWriterTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/NDJsonWriterTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/NDJsonWriterTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/NDJsonWriterTests.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/StubException.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/StubException.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/StubException.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/StubException.cs diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/TagsExtensionTests.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/TagsExtensionTests.cs similarity index 100% rename from sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest/TagsExtensionTests.cs rename to sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests/TagsExtensionTests.cs From b2917ee6efb1678a2962df88673682756ca4e228 Mon Sep 17 00:00:00 2001 From: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com> Date: Fri, 23 Oct 2020 12:48:34 -0700 Subject: [PATCH 14/28] [Storage][Webjobs] Doc strings and drop Core dependency. (#16221) * todo docs. * blob docs strings. * queue docs. * remove explicit dependency on core from webjobs. * PR Feedback. --- .../src/Azure.Storage.Common.csproj | 3 +++ sdk/storage/Directory.Build.props | 2 -- .../src/AzureStorageBlobsWebJobsStartup.cs | 6 ++--- .../src/BlobAttribute.cs | 24 ++++++++++--------- .../src/BlobNameValidationAttribute.cs | 12 ---------- .../src/BlobTriggerAttribute.cs | 10 ++++---- .../StorageBlobsWebJobsBuilderExtensions.cs | 9 ++++--- .../src/Shared/Queues/QueueListener.cs | 2 -- .../src/Shared/Queues/QueueProcessor.cs | 21 +++++++--------- .../Shared/Queues/QueueProcessorOptions.cs | 9 ++++--- .../src/Shared/Queues/QueuesOptions.cs | 4 ++-- .../src/Shared/StorageClientProvider.cs | 17 ------------- .../src/AzureStorageQueuesWebJobsStartup.cs | 4 +--- .../src/QueueAttribute.cs | 8 ++++--- .../src/QueueTriggerAttribute.cs | 3 ++- .../StorageQueuesWebJobsBuilderExtensions.cs | 12 ++++------ .../tests/BlobBindingEndToEndTests.cs | 1 - 17 files changed, 55 insertions(+), 92 deletions(-) diff --git a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj index 7cbe9a7a1c91..c8b9d374ce85 100644 --- a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj +++ b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj @@ -17,6 +17,9 @@ Azure.Storage + + + diff --git a/sdk/storage/Directory.Build.props b/sdk/storage/Directory.Build.props index 1302735d79ba..51044c32532d 100644 --- a/sdk/storage/Directory.Build.props +++ b/sdk/storage/Directory.Build.props @@ -54,8 +54,6 @@ DEBUG;$(DefineConstants) - - diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs index 783db9d9ceb1..174eaad833b5 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs @@ -9,12 +9,10 @@ namespace Microsoft.Azure.WebJobs.Extensions.Storage { - /// - /// TODO. - /// + /// public class AzureStorageBlobsWebJobsStartup : IWebJobsStartup { - /// + /// public void Configure(IWebJobsBuilder builder) { builder.AddAzureStorageBlobs(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs index 07e3b607d9c5..8a6668a38bac 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; +using Azure.Storage.Blobs.Specialized; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -19,11 +20,11 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// ICloudBlob - /// CloudBlockBlob - /// CloudPageBlob - /// (read-only) - /// CloudBlobStream (write-only) + /// + /// + /// + /// + /// /// /// /// @@ -39,12 +40,13 @@ namespace Microsoft.Azure.WebJobs /// The parameter type can be CloudBlobContainer, CloudBlobDirectory or /// of one of the following element types: /// - /// ICloudBlob - /// CloudBlockBlob - /// CloudPageBlob - /// Stream - /// string - /// TextReader + /// + /// + /// + /// + /// + /// + /// /// /// [SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "There is an accessor for FileAccess")] diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs index 11e452ca0d9f..2a0214e6eae9 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs @@ -78,11 +78,6 @@ protected override ValidationResult IsValid(object value, ValidationContext vali return null; } - /// - /// TODO. - /// - /// - /// internal static bool IsValidContainerName(string containerName) { if (containerName == null) @@ -98,13 +93,6 @@ internal static bool IsValidContainerName(string containerName) return Regex.IsMatch(containerName, @"^[a-z0-9](([a-z0-9\-[^\-])){1,61}[a-z0-9]$"); } - // See http://msdn.microsoft.com/en-us/library/windowsazure/dd135715.aspx. - /// - /// TODO. - /// - /// - /// - /// internal static bool IsValidBlobName(string blobName, out string errorMessage) { const string UnsafeCharactersMessage = diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs index b5fa09f37054..1d7a77500590 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs @@ -4,6 +4,7 @@ using System; using System.Diagnostics; using System.IO; +using Azure.Storage.Blobs.Specialized; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -17,17 +18,18 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// ICloudBlob - /// CloudBlockBlob - /// CloudPageBlob + /// + /// + /// + /// /// /// /// /// /// /// - [AttributeUsage(AttributeTargets.Parameter)] #pragma warning restore CA1200 // Avoid using cref tags with a prefix + [AttributeUsage(AttributeTargets.Parameter)] [DebuggerDisplay("{BlobPath,nq}")] [ConnectionProvider(typeof(StorageAccountAttribute))] [Binding] diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs index 0591197cf022..b2509d471afe 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs @@ -21,16 +21,15 @@ namespace Microsoft.Extensions.Hosting { /// - /// TODO. + /// Extension methods for Storage Blobs integration. /// public static class StorageBlobsWebJobsBuilderExtensions { /// - /// TODO. + /// Adds the Storage Blobs extension to the provided . /// - /// - /// - /// + /// The to configure. + /// Optional. An action to configure . public static IWebJobsBuilder AddAzureStorageBlobs(this IWebJobsBuilder builder, Action configureBlobs = null) { builder.Services.AddAzureClientsCore(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs index 26b782d627fe..b224d59c80f0 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs @@ -115,8 +115,6 @@ public QueueListener(QueueClient queue, _sharedWatcher = sharedWatcher; } - // TODO (kasobol-msft) remove this - //_queueProcessor = CreateQueueProcessor(_queue, _poisonQueue, loggerFactory, queueProcessorFactory, _queueOptions, _sharedWatcher); _queueProcessor = queueProcessor; TimeSpan maximumInterval = _queueProcessor.QueuesOptions.MaxPollingInterval; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs index 14fd198a7b74..56321752b714 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs @@ -54,9 +54,6 @@ internal protected QueueProcessor(QueueProcessorOptions queueProcessorOptions) /// public event EventHandler MessageAddedToPoisonQueue; - /// - /// TODO. - /// internal QueuesOptions QueuesOptions { get; private set; } /// @@ -86,7 +83,7 @@ internal protected virtual async Task BeginProcessingMessageAsync(QueueMes /// /// The message to complete processing for. /// The from the job invocation. - /// The to use + /// The to use. /// internal protected virtual async Task CompleteProcessingMessageAsync(QueueMessage message, FunctionResult result, CancellationToken cancellationToken) { @@ -125,9 +122,9 @@ private async Task HandlePoisonMessageAsync(QueueMessage message, CancellationTo /// /// Moves the specified message to the poison queue. /// - /// The poison message - /// The poison queue to copy the message to - /// The to use + /// The poison message. + /// The poison queue to copy the message to. + /// The to use. /// protected virtual async Task CopyMessageToPoisonQueueAsync(QueueMessage message, QueueClient poisonQueue, CancellationToken cancellationToken) { @@ -145,8 +142,8 @@ protected virtual async Task CopyMessageToPoisonQueueAsync(QueueMessage message, /// /// The message to release /// The from the job invocation. - /// The visibility timeout to set for the message - /// The to use + /// The visibility timeout to set for the message. + /// The to use. /// protected virtual async Task ReleaseMessageAsync(QueueMessage message, FunctionResult result, TimeSpan visibilityTimeout, CancellationToken cancellationToken) { @@ -179,7 +176,7 @@ protected virtual async Task ReleaseMessageAsync(QueueMessage message, FunctionR /// Delete the specified message. /// /// The message to delete. - /// The to use + /// The to use. /// protected virtual async Task DeleteMessageAsync(QueueMessage message, CancellationToken cancellationToken) { @@ -217,9 +214,9 @@ protected virtual async Task DeleteMessageAsync(QueueMessage message, Cancellati } /// - /// Called to raise the MessageAddedToPoisonQueue event + /// Called to raise the MessageAddedToPoisonQueue event. /// - /// The event arguments + /// The event arguments. protected internal virtual void OnMessageAddedToPoisonQueue(PoisonMessageEventArgs e) { MessageAddedToPoisonQueue?.Invoke(this, e); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs index 29ab0f753f3a..e145b7a95fe2 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs @@ -20,7 +20,7 @@ internal partial class QueueProcessorOptions /// /// Constructs a new instance. /// - /// TODO. + /// The queue the will operate on. /// The to create an from. /// The queue configuration. /// The queue to move messages to when unable to process a message after the maximum dequeue count has been exceeded. May be null. @@ -33,13 +33,12 @@ internal QueueProcessorOptions(QueueClient queue, ILoggerFactory loggerFactory, } /// - /// TODO. + /// Gets the queue the will operate on. /// public QueueClient Queue { get; private set; } /// - /// TODO. - /// May be null. + /// Gets the queue to move messages to when unable to process a message after the maximum dequeue count has been exceeded. May be null. /// public QueueClient PoisonQueue { get; private set; } @@ -49,7 +48,7 @@ internal QueueProcessorOptions(QueueClient queue, ILoggerFactory loggerFactory, public ILogger Logger { get; private set; } /// - /// TODO. + /// Gets the queue configuration. /// public QueuesOptions Options { get; private set; } } diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs index 5f5b9de63735..d3465d9246ff 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs @@ -11,10 +11,10 @@ namespace Microsoft.Azure.WebJobs.Host { +#if STORAGE_WEBJOBS_PUBLIC_QUEUE_PROCESSOR /// - /// TODO. + /// Represents configuration for . /// -#if STORAGE_WEBJOBS_PUBLIC_QUEUE_PROCESSOR public class QueuesOptions : IOptionsFormatter #else internal class QueuesOptions : IOptionsFormatter diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs index da89e37af365..42c4fd3c7257 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs @@ -24,12 +24,6 @@ internal abstract class StorageClientProvider where TCl private readonly AzureComponentFactory _componentFactory; private readonly AzureEventSourceLogForwarder _logForwarder; - /// - /// TODO. - /// - /// - /// - /// public StorageClientProvider(IConfiguration configuration, AzureComponentFactory componentFactory, AzureEventSourceLogForwarder logForwarder) { _configuration = configuration; @@ -37,23 +31,12 @@ public StorageClientProvider(IConfiguration configuration, AzureComponentFactory _logForwarder = logForwarder; } - /// - /// TODO. - /// - /// - /// - /// public virtual TClient Get(string name, INameResolver resolver) { var resolvedName = resolver.ResolveWholeString(name); return this.Get(resolvedName); } - /// - /// TODO. - /// - /// - /// public virtual TClient Get(string name) { if (string.IsNullOrWhiteSpace(name)) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs index b48174825317..56f618738559 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs @@ -9,9 +9,7 @@ namespace Microsoft.Azure.WebJobs.Extensions.Storage { - /// - /// TODO. - /// + /// public class AzureStorageQueuesWebJobsStartup : IWebJobsStartup { /// diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs index 18ce0669dccb..73d6e45f7a59 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs @@ -3,6 +3,8 @@ using System; using System.Diagnostics; +using Azure.Storage.Queues; +using Azure.Storage.Queues.Models; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -15,8 +17,8 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// CloudQueue - /// CloudQueueMessage (out parameter) + /// + /// (out parameter) /// (out parameter) /// (out parameter) /// A user-defined type (out parameter, serialized as JSON) @@ -24,8 +26,8 @@ namespace Microsoft.Azure.WebJobs /// of these types (to enqueue multiple messages via /// /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] #pragma warning restore CA1200 // Avoid using cref tags with a prefix + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue)] [DebuggerDisplay("{QueueName,nq}")] [ConnectionProvider(typeof(StorageAccountAttribute))] diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs index 52cca040f5ca..b4357aec1d64 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs @@ -3,6 +3,7 @@ using System; using System.Diagnostics; +using Azure.Storage.Queues.Models; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -16,7 +17,7 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// CloudQueueMessage + /// /// /// /// A user-defined type (serialized as JSON) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs index b8c58b8b992f..995f78427552 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs @@ -2,14 +2,11 @@ // Licensed under the MIT License. using System; -using Azure.Core; using Azure.WebJobs.Extensions.Storage.Queues; using Microsoft.Azure.WebJobs; -using Microsoft.Azure.WebJobs.Extensions.Storage; using Microsoft.Azure.WebJobs.Extensions.Storage.Common; using Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners; using Microsoft.Azure.WebJobs.Host; -using Microsoft.Azure.WebJobs.Host.Listeners; using Microsoft.Azure.WebJobs.Host.Queues; using Microsoft.Azure.WebJobs.Host.Queues.Config; using Microsoft.Azure.WebJobs.Host.Queues.Listeners; @@ -21,16 +18,15 @@ namespace Microsoft.Extensions.Hosting { /// - /// TODO. + /// Extension methods for Storage Queues integration. /// public static class StorageQueuesWebJobsBuilderExtensions { /// - /// TODO. + /// Adds the Storage Queues extension to the provided . /// - /// - /// - /// + /// The to configure. + /// Optional. An action to configure . public static IWebJobsBuilder AddAzureStorageQueues(this IWebJobsBuilder builder, Action configureQueues = null) { builder.Services.AddAzureClientsCore(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs index 92e0807f8693..24f0768416c1 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs @@ -318,7 +318,6 @@ public async Task BindToByteArray_Output() arguments = new { input = TestData }; await _fixture.JobHost.CallAsync(method, arguments); - // TODO (this sometimes results in empty string Assert.True(await blob.ExistsAsync()); string result = await blob.DownloadTextAsync(); Assert.AreEqual(TestData, result); From 39534754d42b496e784f8ab0b771bc5c05cfcd93 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Fri, 23 Oct 2020 15:57:48 -0400 Subject: [PATCH 15/28] [live tests] Avoid using ${{ insert }} duplicate keys with un-rendered yaml validation (#16225) --- eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml b/eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml index f77a4d658ae8..1480ee155877 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml @@ -89,8 +89,10 @@ jobs: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_MULTILEVEL_LOOKUP: 0 AZURE_TEST_MODE: "${{ coalesce(platform.TestMode, 'None') }}" - ${{ insert }}: ${{ parameters.EnvVars }} - ${{ insert }}: ${{ cloudConfig.value.EnvVars }} + ${{ each var in parameters.EnvVars }}: + ${{ var.key }}: ${{ var.value }} + ${{ each var in cloudConfig.value.EnvVars }}: + ${{ var.key }}: ${{ var.value }} - template: /eng/common/TestResources/remove-test-resources.yml parameters: From 027a99ec950a50418614e6a1a91065a9a3551e91 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Fri, 23 Oct 2020 13:06:38 -0700 Subject: [PATCH 16/28] Rename EventRoute -> DigitalTwinsEventRoute and all corresponding types (#16227) --- .../Azure.DigitalTwins.Core.netstandard2.0.cs | 34 ++++---- .../DigitalTwinsLifecycleSamples.cs | 6 +- .../Azure.DigitalTwins.Core/samples/Readme.md | 6 +- ...ventRoute.cs => DigitalTwinsEventRoute.cs} | 4 +- .../DigitalTwinsEventRouteCollection.cs | 13 +++ .../Customized/Models/EventRouteCollection.cs | 13 --- ...cs => GetDigitalTwinsEventRouteOptions.cs} | 4 +- ...s => GetDigitalTwinsEventRoutesOptions.cs} | 4 +- .../src/DigitalTwinsClient.cs | 80 +++++++++---------- .../src/Generated/EventRoutesRestClient.cs | 48 +++++------ ...> DigitalTwinsEventRoute.Serialization.cs} | 6 +- ...ventRoute.cs => DigitalTwinsEventRoute.cs} | 10 +-- ...winsEventRouteCollection.Serialization.cs} | 12 +-- ...cs => DigitalTwinsEventRouteCollection.cs} | 14 ++-- ...cs => GetDigitalTwinsEventRouteOptions.cs} | 6 +- ...s => GetDigitalTwinsEventRoutesOptions.cs} | 6 +- .../tests/EventRouteTests.cs | 17 ++-- .../tests/PublishTelemetryTests.cs | 18 ++--- 18 files changed, 150 insertions(+), 151 deletions(-) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/{EventRoute.cs => DigitalTwinsEventRoute.cs} (61%) create mode 100644 sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRouteCollection.cs delete mode 100644 sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRouteCollection.cs rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/{GetEventRouteOptions.cs => GetDigitalTwinsEventRouteOptions.cs} (80%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/{GetEventRoutesOptions.cs => GetDigitalTwinsEventRoutesOptions.cs} (80%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/{EventRoute.Serialization.cs => DigitalTwinsEventRoute.Serialization.cs} (84%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/{EventRoute.cs => DigitalTwinsEventRoute.cs} (83%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/{EventRouteCollection.Serialization.cs => DigitalTwinsEventRouteCollection.Serialization.cs} (66%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/{EventRouteCollection.cs => DigitalTwinsEventRouteCollection.cs} (56%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/{GetEventRouteOptions.cs => GetDigitalTwinsEventRouteOptions.cs} (55%) rename sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/{GetEventRoutesOptions.cs => GetDigitalTwinsEventRoutesOptions.cs} (68%) diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs index 9fd05c6e8916..8fdddc747db4 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs @@ -63,8 +63,8 @@ public DigitalTwinsClient(System.Uri endpoint, Azure.Core.TokenCredential creden public DigitalTwinsClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.DigitalTwins.Core.DigitalTwinsClientOptions options) { } public virtual System.Threading.Tasks.Task> CreateDigitalTwinAsync(string digitalTwinId, T digitalTwin, Azure.DigitalTwins.Core.CreateDigitalTwinOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateDigitalTwin(string digitalTwinId, T digitalTwin, Azure.DigitalTwins.Core.CreateDigitalTwinOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateEventRoute(string eventRouteId, Azure.DigitalTwins.Core.EventRoute eventRoute, Azure.DigitalTwins.Core.CreateEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateEventRouteAsync(string eventRouteId, Azure.DigitalTwins.Core.EventRoute eventRoute, Azure.DigitalTwins.Core.CreateEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateEventRoute(string eventRouteId, Azure.DigitalTwins.Core.DigitalTwinsEventRoute eventRoute, Azure.DigitalTwins.Core.CreateEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateEventRouteAsync(string eventRouteId, Azure.DigitalTwins.Core.DigitalTwinsEventRoute eventRoute, Azure.DigitalTwins.Core.CreateEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateModels(System.Collections.Generic.IEnumerable dtdlModels, Azure.DigitalTwins.Core.CreateModelsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateModelsAsync(System.Collections.Generic.IEnumerable dtdlModels, Azure.DigitalTwins.Core.CreateModelsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateRelationshipAsync(string digitalTwinId, string relationshipId, T relationship, Azure.DigitalTwins.Core.CreateRelationshipOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -83,10 +83,10 @@ public DigitalTwinsClient(System.Uri endpoint, Azure.Core.TokenCredential creden public virtual Azure.Response GetComponent(string digitalTwinId, string componentName, Azure.DigitalTwins.Core.GetComponentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDigitalTwinAsync(string digitalTwinId, Azure.DigitalTwins.Core.GetDigitalTwinOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDigitalTwin(string digitalTwinId, Azure.DigitalTwins.Core.GetDigitalTwinOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetEventRoute(string eventRouteId, Azure.DigitalTwins.Core.GetEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetEventRouteAsync(string eventRouteId, Azure.DigitalTwins.Core.GetEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetEventRoutes(Azure.DigitalTwins.Core.GetEventRoutesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetEventRoutesAsync(Azure.DigitalTwins.Core.GetEventRoutesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEventRoute(string eventRouteId, Azure.DigitalTwins.Core.GetDigitalTwinsEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEventRouteAsync(string eventRouteId, Azure.DigitalTwins.Core.GetDigitalTwinsEventRouteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEventRoutes(Azure.DigitalTwins.Core.GetDigitalTwinsEventRoutesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEventRoutesAsync(Azure.DigitalTwins.Core.GetDigitalTwinsEventRoutesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetIncomingRelationships(string digitalTwinId, Azure.DigitalTwins.Core.GetIncomingRelationshipsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetIncomingRelationshipsAsync(string digitalTwinId, Azure.DigitalTwins.Core.GetIncomingRelationshipsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetModel(string modelId, Azure.DigitalTwins.Core.GetModelOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -120,6 +120,13 @@ public enum ServiceVersion V2020_10_31 = 1, } } + public partial class DigitalTwinsEventRoute + { + public DigitalTwinsEventRoute(string endpointName, string filter) { } + public string EndpointName { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + public string Id { get { throw null; } } + } public partial class DigitalTwinsModelData { internal DigitalTwinsModelData() { } @@ -130,13 +137,6 @@ internal DigitalTwinsModelData() { } public string Id { get { throw null; } } public System.DateTimeOffset? UploadTime { get { throw null; } } } - public partial class EventRoute - { - public EventRoute(string endpointName, string filter) { } - public string EndpointName { get { throw null; } set { } } - public string Filter { get { throw null; } set { } } - public string Id { get { throw null; } } - } public partial class GetComponentOptions { public GetComponentOptions() { } @@ -149,15 +149,15 @@ public GetDigitalTwinOptions() { } public string TraceParent { get { throw null; } set { } } public string TraceState { get { throw null; } set { } } } - public partial class GetEventRouteOptions + public partial class GetDigitalTwinsEventRouteOptions { - public GetEventRouteOptions() { } + public GetDigitalTwinsEventRouteOptions() { } public string TraceParent { get { throw null; } set { } } public string TraceState { get { throw null; } set { } } } - public partial class GetEventRoutesOptions + public partial class GetDigitalTwinsEventRoutesOptions { - public GetEventRoutesOptions() { } + public GetDigitalTwinsEventRoutesOptions() { } public int? MaxItemsPerPage { get { throw null; } set { } } public string TraceParent { get { throw null; } set { } } public string TraceState { get { throw null; } set { } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs index 7892c9ccdce8..dcd301a83da8 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs @@ -378,8 +378,8 @@ public async Task GetEventRoutes() { #region Snippet:DigitalTwinsSampleGetEventRoutes - AsyncPageable response = client.GetEventRoutesAsync(); - await foreach (EventRoute er in response) + AsyncPageable response = client.GetEventRoutesAsync(); + await foreach (DigitalTwinsEventRoute er in response) { Console.WriteLine($"Event route '{er.Id}', endpoint name '{er.EndpointName}'"); } @@ -403,7 +403,7 @@ public async Task CreateEventRoute() #region Snippet:DigitalTwinsSampleCreateEventRoute string eventFilter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'"; - var eventRoute = new EventRoute(eventhubEndpointName, eventFilter); + var eventRoute = new DigitalTwinsEventRoute(eventhubEndpointName, eventFilter); await client.CreateEventRouteAsync(_eventRouteId, eventRoute); Console.WriteLine($"Created event route '{_eventRouteId}'."); diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md index f669795442cf..6e8556b73cde 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md @@ -420,7 +420,7 @@ To create an event route, provide an Id of an event route such as "sampleEventRo ```C# Snippet:DigitalTwinsSampleCreateEventRoute string eventFilter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'"; -var eventRoute = new EventRoute(eventhubEndpointName, eventFilter); +var eventRoute = new DigitalTwinsEventRoute(eventhubEndpointName, eventFilter); await client.CreateEventRouteAsync(_eventRouteId, eventRoute); Console.WriteLine($"Created event route '{_eventRouteId}'."); @@ -433,8 +433,8 @@ For more information on the event route filter language, see the "how to manage List a specific event route given event route Id or all event routes setting options with `GetEventRouteAsync` and `GetEventRoutesAsync`. ```C# Snippet:DigitalTwinsSampleGetEventRoutes -AsyncPageable response = client.GetEventRoutesAsync(); -await foreach (EventRoute er in response) +AsyncPageable response = client.GetEventRoutesAsync(); +await foreach (DigitalTwinsEventRoute er in response) { Console.WriteLine($"Event route '{er.Id}', endpoint name '{er.EndpointName}'"); } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRoute.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRoute.cs similarity index 61% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRoute.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRoute.cs index 53bca6abc149..5e6b1ede21b3 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRoute.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRoute.cs @@ -7,8 +7,8 @@ namespace Azure.DigitalTwins.Core { /// [CodeGenModel("EventRoute")] - public partial class EventRoute + public partial class DigitalTwinsEventRoute { - // This class declaration changes the namespace; do not remove. + // This class declaration changes the namespace and the class name; do not remove. } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRouteCollection.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRouteCollection.cs new file mode 100644 index 000000000000..3eb5d245df3f --- /dev/null +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsEventRouteCollection.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.DigitalTwins.Core +{ + [CodeGenModel("EventRouteCollection")] + internal partial class DigitalTwinsEventRouteCollection + { + // This class declaration makes the generated class of a different name internal instead of public and changes the namespace as well as the name; do not remove. + } +} diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRouteCollection.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRouteCollection.cs deleted file mode 100644 index 28ffcb3ae556..000000000000 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/EventRouteCollection.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.DigitalTwins.Core -{ - [CodeGenModel("EventRouteCollection")] - internal partial class EventRouteCollection - { - // This class declaration makes the generated class of the same name internal instead of public and changes the namespace; do not remove. - } -} diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetEventRouteOptions.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs similarity index 80% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetEventRouteOptions.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs index 318cf898116c..05aebb9ee2f2 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetEventRouteOptions.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRouteOptions.cs @@ -7,9 +7,9 @@ namespace Azure.DigitalTwins.Core { /// [CodeGenModel("EventRoutesGetByIdOptions")] - public partial class GetEventRouteOptions + public partial class GetDigitalTwinsEventRouteOptions { - // This class declaration changes the namespace; do not remove. + // This class declaration changes the namespace and the class name; do not remove. /// Identifies the request in a distributed tracing system. [CodeGenMember("Traceparent")] diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetEventRoutesOptions.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRoutesOptions.cs similarity index 80% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetEventRoutesOptions.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRoutesOptions.cs index ec0dc903f2d4..495dd675a1b5 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetEventRoutesOptions.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/GetDigitalTwinsEventRoutesOptions.cs @@ -7,9 +7,9 @@ namespace Azure.DigitalTwins.Core { /// [CodeGenModel("EventRoutesListOptions")] - public partial class GetEventRoutesOptions + public partial class GetDigitalTwinsEventRoutesOptions { - // This class declaration changes the namespace; do not remove. + // This class declaration changes the namespace and the class name; do not remove. /// Identifies the request in a distributed tracing system. [CodeGenMember("Traceparent")] diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs index 42e4d78f8d86..4ef8a51b8d5b 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs @@ -226,10 +226,10 @@ public virtual Response GetDigitalTwin(string digitalTwinId, GetDigitalTwi /// Console.WriteLine($"Created digital twin '{createCustomDigitalTwinResponse.Value.Id}'."); /// /// - public async virtual Task> CreateDigitalTwinAsync(string digitalTwinId, T digitalTwin, CreateDigitalTwinOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateDigitalTwinAsync(string digitalTwinId, T digitalTwin, CreateDigitalTwinOptions options = null, CancellationToken cancellationToken = default) { // Serialize the digital twin object and write it to a Stream - using MemoryStream memoryStream = await WriteToStream(digitalTwin, _objectSerializer, true /*async*/, cancellationToken).ConfigureAwait(false); + using MemoryStream memoryStream = await WriteToStream(digitalTwin, _objectSerializer, true /*asynchronous*/, cancellationToken).ConfigureAwait(false); // Get the digital twin as a Stream object Response digitalTwinStream = await _dtRestClient.AddAsync(digitalTwinId, memoryStream, options, cancellationToken).ConfigureAwait(false); @@ -262,7 +262,7 @@ public async virtual Task> CreateDigitalTwinAsync(string digitalT public virtual Response CreateDigitalTwin(string digitalTwinId, T digitalTwin, CreateDigitalTwinOptions options = null, CancellationToken cancellationToken = default) { // Serialize the digital twin object and write it to a Stream - using MemoryStream memoryStream = WriteToStream(digitalTwin, _objectSerializer, false /*async*/, cancellationToken).EnsureCompleted(); + using MemoryStream memoryStream = WriteToStream(digitalTwin, _objectSerializer, false /*asynchronous*/, cancellationToken).EnsureCompleted(); // Get the digital twin as a Stream object Response digitalTwinStream = _dtRestClient.Add(digitalTwinId, memoryStream, options, cancellationToken); @@ -516,7 +516,7 @@ public virtual Response UpdateComponent(string digitalTwinId, string componentNa /// The pageable list of application/json relationships belonging to the specified digital twin and the http response. /// /// - /// String relationships that are returned as part of the pageable list can always be deserialized into an instnace of . + /// String relationships that are returned as part of the pageable list can always be deserialized into an instance of . /// You may also deserialize the relationship into custom type that extend the . /// /// @@ -930,10 +930,10 @@ public virtual Response DeleteRelationship(string digitalTwinId, string relation /// $"from twin '{createCustomRelationshipResponse.Value.SourceId}' to twin '{createCustomRelationshipResponse.Value.TargetId}'."); /// /// - public async virtual Task> CreateRelationshipAsync(string digitalTwinId, string relationshipId, T relationship, CreateRelationshipOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateRelationshipAsync(string digitalTwinId, string relationshipId, T relationship, CreateRelationshipOptions options = null, CancellationToken cancellationToken = default) { // Serialize the digital twin object and write it to a Stream - using MemoryStream memoryStream = await WriteToStream(relationship, _objectSerializer, true /*async*/, cancellationToken).ConfigureAwait(false); + using MemoryStream memoryStream = await WriteToStream(relationship, _objectSerializer, true /*asynchronous*/, cancellationToken).ConfigureAwait(false); // Get the component as a Stream object Response relationshipStream = await _dtRestClient.AddRelationshipAsync(digitalTwinId, relationshipId, memoryStream, options, cancellationToken).ConfigureAwait(false); @@ -980,7 +980,7 @@ public virtual Response CreateRelationship( CancellationToken cancellationToken = default) { // Serialize the digital twin object and write it to a Stream - using MemoryStream memoryStream = WriteToStream(relationship, _objectSerializer, false /*async*/, cancellationToken).EnsureCompleted(); + using MemoryStream memoryStream = WriteToStream(relationship, _objectSerializer, false /*asynchronous*/, cancellationToken).EnsureCompleted(); // Get the relationship as a Stream object Response relationshipStream = _dtRestClient.AddRelationship(digitalTwinId, relationshipId, memoryStream, options, cancellationToken); @@ -1217,9 +1217,9 @@ public virtual Response GetModel(string modelId, GetModel /// The http response . /// /// - /// When a model is decomissioned, new digital twins will no longer be able to be defined by this model. + /// When a model is decommissioned, new digital twins will no longer be able to be defined by this model. /// However, existing digital twins may continue to use this model. - /// Once a model is decomissioned, it may not be recommissioned. + /// Once a model is decommissioned, it may not be recommissioned. /// /// /// For more samples, see our repo samples. @@ -1258,9 +1258,9 @@ public virtual Task DecommissionModelAsync(string modelId, Decomission /// The http response . /// /// - /// When a model is decomissioned, new digital twins will no longer be able to be defined by this model. + /// When a model is decommissioned, new digital twins will no longer be able to be defined by this model. /// However, existing digital twins may continue to use this model. - /// Once a model is decomissioned, it may not be recommissioned. + /// Once a model is decommissioned, it may not be recommissioned. /// /// /// For more samples, see our repo samples. @@ -1579,22 +1579,22 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// /// /// - /// AsyncPageable<EventRoute> response = client.GetEventRoutesAsync(); - /// await foreach (EventRoute er in response) + /// AsyncPageable<DigitalTwinsEventRoute> response = client.GetEventRoutesAsync(); + /// await foreach (DigitalTwinsEventRoute er in response) /// { /// Console.WriteLine($"Event route '{er.Id}', endpoint name '{er.EndpointName}'"); /// } /// /// - public virtual AsyncPageable GetEventRoutesAsync(GetEventRoutesOptions options = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetEventRoutesAsync(GetDigitalTwinsEventRoutesOptions options = null, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope("EventRoutesClient.List"); scope.Start(); try { - Response response = await _eventRoutesRestClient.ListAsync(options, cancellationToken).ConfigureAwait(false); + Response response = await _eventRoutesRestClient.ListAsync(options, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -1604,13 +1604,13 @@ async Task> FirstPageFunc(int? pageSizeHint) } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope("EventRoutesClient.List"); scope.Start(); try { - Response response = await _eventRoutesRestClient.ListNextPageAsync(nextLink, options, cancellationToken).ConfigureAwait(false); + Response response = await _eventRoutesRestClient.ListNextPageAsync(nextLink, options, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -1635,18 +1635,18 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// /// The exception that captures the errors from the service. Check the and properties for more details. /// - /// + /// /// See the asynchronous version of this method for examples. /// - public virtual Pageable GetEventRoutes(GetEventRoutesOptions options = null, CancellationToken cancellationToken = default) + public virtual Pageable GetEventRoutes(GetDigitalTwinsEventRoutesOptions options = null, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope("EventRoutesClient.List"); scope.Start(); try { - Response response = _eventRoutesRestClient.List(options, cancellationToken); + Response response = _eventRoutesRestClient.List(options, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -1656,13 +1656,13 @@ Page FirstPageFunc(int? pageSizeHint) } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope("EventRoutesClient.List"); scope.Start(); try { - Response response = _eventRoutesRestClient.ListNextPage(nextLink, options, cancellationToken); + Response response = _eventRoutesRestClient.ListNextPage(nextLink, options, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -1691,7 +1691,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// /// The exception is thrown when is null. /// - public virtual Task> GetEventRouteAsync(string eventRouteId, GetEventRouteOptions options = null, CancellationToken cancellationToken = default) + public virtual Task> GetEventRouteAsync(string eventRouteId, GetDigitalTwinsEventRouteOptions options = null, CancellationToken cancellationToken = default) { return _eventRoutesRestClient.GetByIdAsync(eventRouteId, options, cancellationToken); } @@ -1712,10 +1712,10 @@ public virtual Task> GetEventRouteAsync(string eventRouteId /// /// The exception is thrown when is null. /// - /// + /// /// See the asynchronous version of this method for examples. /// - public virtual Response GetEventRoute(string eventRouteId, GetEventRouteOptions options = null, CancellationToken cancellationToken = default) + public virtual Response GetEventRoute(string eventRouteId, GetDigitalTwinsEventRouteOptions options = null, CancellationToken cancellationToken = default) { return _eventRoutesRestClient.GetById(eventRouteId, options, cancellationToken); } @@ -1741,13 +1741,13 @@ public virtual Response GetEventRoute(string eventRouteId, GetEventR /// /// /// string eventFilter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'"; - /// var eventRoute = new EventRoute(eventhubEndpointName, eventFilter); + /// var eventRoute = new DigitalTwinsEventRoute(eventhubEndpointName, eventFilter); /// /// await client.CreateEventRouteAsync(_eventRouteId, eventRoute); /// Console.WriteLine($"Created event route '{_eventRouteId}'."); /// /// - public virtual Task CreateEventRouteAsync(string eventRouteId, EventRoute eventRoute, CreateEventRouteOptions options = null, CancellationToken cancellationToken = default) + public virtual Task CreateEventRouteAsync(string eventRouteId, DigitalTwinsEventRoute eventRoute, CreateEventRouteOptions options = null, CancellationToken cancellationToken = default) { return _eventRoutesRestClient.AddAsync(eventRouteId, eventRoute, options, cancellationToken); } @@ -1770,10 +1770,10 @@ public virtual Task CreateEventRouteAsync(string eventRouteId, EventRo /// /// The exception is thrown when is null. /// - /// + /// /// See the asynchronous version of this method for examples. /// - public virtual Response CreateEventRoute(string eventRouteId, EventRoute eventRoute, CreateEventRouteOptions options = null, CancellationToken cancellationToken = default) + public virtual Response CreateEventRoute(string eventRouteId, DigitalTwinsEventRoute eventRoute, CreateEventRouteOptions options = null, CancellationToken cancellationToken = default) { return _eventRoutesRestClient.Add(eventRouteId, eventRoute, options, cancellationToken); } @@ -1831,11 +1831,11 @@ public virtual Response DeleteEventRoute(string eventRouteId, DeleteEventRouteOp /// /// Publishes telemetry from a digital twin asynchronously. - /// The result is then consumed by one or many destination endpoints (subscribers) defined under . + /// The result is then consumed by one or many destination endpoints (subscribers) defined under . /// These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed. /// /// The Id of the digital twin. - /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random guid if argument is null. + /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random GUID if argument is null. /// The application/json telemetry payload to be sent. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. @@ -1875,11 +1875,11 @@ public virtual Task PublishTelemetryAsync( /// /// Publishes telemetry from a digital twin synchronously. - /// The result is then consumed by one or many destination endpoints (subscribers) defined under . + /// The result is then consumed by one or many destination endpoints (subscribers) defined under . /// These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed. /// /// The Id of the digital twin. - /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random guid if argument is null. + /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random GUID if argument is null. /// The application/json telemetry payload to be sent. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. @@ -1909,12 +1909,12 @@ public virtual Response PublishTelemetry(string digitalTwinId, string messageId, /// /// Publishes telemetry from a digital twin's component asynchronously. - /// The result is then consumed by one or many destination endpoints (subscribers) defined under . + /// The result is then consumed by one or many destination endpoints (subscribers) defined under . /// These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed. /// /// The Id of the digital twin. /// The name of the DTDL component. - /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random guid if argument is null. + /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random GUID if argument is null. /// The application/json telemetry payload to be sent. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. @@ -1962,12 +1962,12 @@ public virtual Task PublishComponentTelemetryAsync(string digitalTwinI /// /// Publishes telemetry from a digital twin's component synchronously. - /// The result is then consumed by one or many destination endpoints (subscribers) defined under . + /// The result is then consumed by one or many destination endpoints (subscribers) defined under . /// These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed. /// /// The Id of the digital twin. /// The name of the DTDL component. - /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random guid if argument is null. + /// A unique message identifier (within the scope of the digital twin id) that is commonly used for de-duplicating messages. Defaults to a random GUID if argument is null. /// The application/json telemetry payload to be sent. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. @@ -2031,7 +2031,7 @@ internal static string[] GetAuthorizationScopes(Uri endpoint) /// Generic type of the object being serialized. /// Object being serialized. /// Object serializer used to serialize/deserialize an object. - /// Indicates whether or not to use async operations during serialization. + /// Indicates whether or not to use asynchronous operations during serialization. /// Then cancellation token. /// A binary representation of the object written to a stream. internal static async Task WriteToStream(T obj, ObjectSerializer objectSerializer, bool async, CancellationToken cancellationToken) diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs index 6509da72adbc..7187b35feeff 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs @@ -42,7 +42,7 @@ public EventRoutesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p _pipeline = pipeline; } - internal HttpMessage CreateListRequest(GetEventRoutesOptions eventRoutesListOptions) + internal HttpMessage CreateListRequest(GetDigitalTwinsEventRoutesOptions eventRoutesListOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -75,7 +75,7 @@ internal HttpMessage CreateListRequest(GetEventRoutesOptions eventRoutesListOpti /// /// Parameter group. /// The cancellation token to use. - public async Task> ListAsync(GetEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) { using var message = CreateListRequest(eventRoutesListOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -83,9 +83,9 @@ public async Task> ListAsync(GetEventRoutesOption { case 200: { - EventRouteCollection value = default; + DigitalTwinsEventRouteCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EventRouteCollection.DeserializeEventRouteCollection(document.RootElement); + value = DigitalTwinsEventRouteCollection.DeserializeDigitalTwinsEventRouteCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -100,7 +100,7 @@ public async Task> ListAsync(GetEventRoutesOption /// /// Parameter group. /// The cancellation token to use. - public Response List(GetEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public Response List(GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) { using var message = CreateListRequest(eventRoutesListOptions); _pipeline.Send(message, cancellationToken); @@ -108,9 +108,9 @@ public Response List(GetEventRoutesOptions eventRoutesList { case 200: { - EventRouteCollection value = default; + DigitalTwinsEventRouteCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EventRouteCollection.DeserializeEventRouteCollection(document.RootElement); + value = DigitalTwinsEventRouteCollection.DeserializeDigitalTwinsEventRouteCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -118,7 +118,7 @@ public Response List(GetEventRoutesOptions eventRoutesList } } - internal HttpMessage CreateGetByIdRequest(string id, GetEventRouteOptions eventRoutesGetByIdOptions) + internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinsEventRouteOptions eventRoutesGetByIdOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -152,7 +152,7 @@ internal HttpMessage CreateGetByIdRequest(string id, GetEventRouteOptions eventR /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> GetByIdAsync(string id, GetEventRouteOptions eventRoutesGetByIdOptions = null, CancellationToken cancellationToken = default) + public async Task> GetByIdAsync(string id, GetDigitalTwinsEventRouteOptions eventRoutesGetByIdOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -165,9 +165,9 @@ public async Task> GetByIdAsync(string id, GetEventRouteOpt { case 200: { - EventRoute value = default; + DigitalTwinsEventRoute value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EventRoute.DeserializeEventRoute(document.RootElement); + value = DigitalTwinsEventRoute.DeserializeDigitalTwinsEventRoute(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -186,7 +186,7 @@ public async Task> GetByIdAsync(string id, GetEventRouteOpt /// Parameter group. /// The cancellation token to use. /// is null. - public Response GetById(string id, GetEventRouteOptions eventRoutesGetByIdOptions = null, CancellationToken cancellationToken = default) + public Response GetById(string id, GetDigitalTwinsEventRouteOptions eventRoutesGetByIdOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -199,9 +199,9 @@ public Response GetById(string id, GetEventRouteOptions eventRoutesG { case 200: { - EventRoute value = default; + DigitalTwinsEventRoute value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EventRoute.DeserializeEventRoute(document.RootElement); + value = DigitalTwinsEventRoute.DeserializeDigitalTwinsEventRoute(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -209,7 +209,7 @@ public Response GetById(string id, GetEventRouteOptions eventRoutesG } } - internal HttpMessage CreateAddRequest(string id, EventRoute eventRoute, CreateEventRouteOptions eventRoutesAddOptions) + internal HttpMessage CreateAddRequest(string id, DigitalTwinsEventRoute eventRoute, CreateEventRouteOptions eventRoutesAddOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -254,7 +254,7 @@ internal HttpMessage CreateAddRequest(string id, EventRoute eventRoute, CreateEv /// Parameter group. /// The cancellation token to use. /// is null. - public async Task AddAsync(string id, EventRoute eventRoute = null, CreateEventRouteOptions eventRoutesAddOptions = null, CancellationToken cancellationToken = default) + public async Task AddAsync(string id, DigitalTwinsEventRoute eventRoute = null, CreateEventRouteOptions eventRoutesAddOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -287,7 +287,7 @@ public async Task AddAsync(string id, EventRoute eventRoute = null, Cr /// Parameter group. /// The cancellation token to use. /// is null. - public Response Add(string id, EventRoute eventRoute = null, CreateEventRouteOptions eventRoutesAddOptions = null, CancellationToken cancellationToken = default) + public Response Add(string id, DigitalTwinsEventRoute eventRoute = null, CreateEventRouteOptions eventRoutesAddOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -386,7 +386,7 @@ public Response Delete(string id, DeleteEventRouteOptions eventRoutesDeleteOptio } } - internal HttpMessage CreateListNextPageRequest(string nextLink, GetEventRoutesOptions eventRoutesListOptions) + internal HttpMessage CreateListNextPageRequest(string nextLink, GetDigitalTwinsEventRoutesOptions eventRoutesListOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -420,7 +420,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, GetEventRoutesOp /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> ListNextPageAsync(string nextLink, GetEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -433,9 +433,9 @@ public async Task> ListNextPageAsync(string nextL { case 200: { - EventRouteCollection value = default; + DigitalTwinsEventRouteCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EventRouteCollection.DeserializeEventRouteCollection(document.RootElement); + value = DigitalTwinsEventRouteCollection.DeserializeDigitalTwinsEventRouteCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -452,7 +452,7 @@ public async Task> ListNextPageAsync(string nextL /// Parameter group. /// The cancellation token to use. /// is null. - public Response ListNextPage(string nextLink, GetEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -465,9 +465,9 @@ public Response ListNextPage(string nextLink, GetEventRout { case 200: { - EventRouteCollection value = default; + DigitalTwinsEventRouteCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EventRouteCollection.DeserializeEventRouteCollection(document.RootElement); + value = DigitalTwinsEventRouteCollection.DeserializeDigitalTwinsEventRouteCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRoute.Serialization.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRoute.Serialization.cs similarity index 84% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRoute.Serialization.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRoute.Serialization.cs index 7e769b7465c2..9c3e3db0ed68 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRoute.Serialization.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRoute.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.DigitalTwins.Core { - public partial class EventRoute : IUtf8JsonSerializable + public partial class DigitalTwinsEventRoute : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static EventRoute DeserializeEventRoute(JsonElement element) + internal static DigitalTwinsEventRoute DeserializeDigitalTwinsEventRoute(JsonElement element) { Optional id = default; string endpointName = default; @@ -45,7 +45,7 @@ internal static EventRoute DeserializeEventRoute(JsonElement element) continue; } } - return new EventRoute(id.Value, endpointName, filter); + return new DigitalTwinsEventRoute(id.Value, endpointName, filter); } } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRoute.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRoute.cs similarity index 83% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRoute.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRoute.cs index fef90d1fe042..f939e30fc234 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRoute.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRoute.cs @@ -10,13 +10,13 @@ namespace Azure.DigitalTwins.Core { /// A route which directs notification and telemetry events to an endpoint. Endpoints are a destination outside of Azure Digital Twins such as an EventHub. - public partial class EventRoute + public partial class DigitalTwinsEventRoute { - /// Initializes a new instance of EventRoute. + /// Initializes a new instance of DigitalTwinsEventRoute. /// The name of the endpoint this event route is bound to. /// An expression which describes the events which are routed to the endpoint. /// or is null. - public EventRoute(string endpointName, string filter) + public DigitalTwinsEventRoute(string endpointName, string filter) { if (endpointName == null) { @@ -31,11 +31,11 @@ public EventRoute(string endpointName, string filter) Filter = filter; } - /// Initializes a new instance of EventRoute. + /// Initializes a new instance of DigitalTwinsEventRoute. /// The id of the event route. /// The name of the endpoint this event route is bound to. /// An expression which describes the events which are routed to the endpoint. - internal EventRoute(string id, string endpointName, string filter) + internal DigitalTwinsEventRoute(string id, string endpointName, string filter) { Id = id; EndpointName = endpointName; diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRouteCollection.Serialization.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRouteCollection.Serialization.cs similarity index 66% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRouteCollection.Serialization.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRouteCollection.Serialization.cs index 7669deb7f1c8..07c0c927dba3 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRouteCollection.Serialization.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRouteCollection.Serialization.cs @@ -11,11 +11,11 @@ namespace Azure.DigitalTwins.Core { - internal partial class EventRouteCollection + internal partial class DigitalTwinsEventRouteCollection { - internal static EventRouteCollection DeserializeEventRouteCollection(JsonElement element) + internal static DigitalTwinsEventRouteCollection DeserializeDigitalTwinsEventRouteCollection(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -26,10 +26,10 @@ internal static EventRouteCollection DeserializeEventRouteCollection(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EventRoute.DeserializeEventRoute(item)); + array.Add(DigitalTwinsEventRoute.DeserializeDigitalTwinsEventRoute(item)); } value = array; continue; @@ -40,7 +40,7 @@ internal static EventRouteCollection DeserializeEventRouteCollection(JsonElement continue; } } - return new EventRouteCollection(Optional.ToList(value), nextLink.Value); + return new DigitalTwinsEventRouteCollection(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRouteCollection.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRouteCollection.cs similarity index 56% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRouteCollection.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRouteCollection.cs index b4529b80c2bd..e3f9f8cb1f90 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/EventRouteCollection.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsEventRouteCollection.cs @@ -11,25 +11,25 @@ namespace Azure.DigitalTwins.Core { /// A collection of EventRoute objects. - internal partial class EventRouteCollection + internal partial class DigitalTwinsEventRouteCollection { - /// Initializes a new instance of EventRouteCollection. - internal EventRouteCollection() + /// Initializes a new instance of DigitalTwinsEventRouteCollection. + internal DigitalTwinsEventRouteCollection() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of EventRouteCollection. + /// Initializes a new instance of DigitalTwinsEventRouteCollection. /// The EventRoute objects. /// A URI to retrieve the next page of results. - internal EventRouteCollection(IReadOnlyList value, string nextLink) + internal DigitalTwinsEventRouteCollection(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// The EventRoute objects. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// A URI to retrieve the next page of results. public string NextLink { get; } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetEventRouteOptions.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetDigitalTwinsEventRouteOptions.cs similarity index 55% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetEventRouteOptions.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetDigitalTwinsEventRouteOptions.cs index 46feecc76419..c9e62b2c504f 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetEventRouteOptions.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetDigitalTwinsEventRouteOptions.cs @@ -8,10 +8,10 @@ namespace Azure.DigitalTwins.Core { /// Parameter group. - public partial class GetEventRouteOptions + public partial class GetDigitalTwinsEventRouteOptions { - /// Initializes a new instance of GetEventRouteOptions. - public GetEventRouteOptions() + /// Initializes a new instance of GetDigitalTwinsEventRouteOptions. + public GetDigitalTwinsEventRouteOptions() { } } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetEventRoutesOptions.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetDigitalTwinsEventRoutesOptions.cs similarity index 68% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetEventRoutesOptions.cs rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetDigitalTwinsEventRoutesOptions.cs index 750fd252c51e..db49f3552d25 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetEventRoutesOptions.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/GetDigitalTwinsEventRoutesOptions.cs @@ -8,10 +8,10 @@ namespace Azure.DigitalTwins.Core { /// Parameter group. - public partial class GetEventRoutesOptions + public partial class GetDigitalTwinsEventRoutesOptions { - /// Initializes a new instance of GetEventRoutesOptions. - public GetEventRoutesOptions() + /// Initializes a new instance of GetDigitalTwinsEventRoutesOptions. + public GetDigitalTwinsEventRoutesOptions() { } /// The maximum number of items to retrieve per request. The server may choose to return less than the requested number. diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/EventRouteTests.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/EventRouteTests.cs index a228709635ed..439c393de035 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/EventRouteTests.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/EventRouteTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; using System.Net; using System.Threading.Tasks; using FluentAssertions; @@ -11,7 +10,7 @@ namespace Azure.DigitalTwins.Core.Tests { /// - /// Tests for DigitalTwinServiceClient methods dealing with Digital Twin operations + /// Tests for DigitalTwinServiceClient methods dealing with Digital Twin operations. /// public class EventRouteTests : E2eTestBase { @@ -20,7 +19,7 @@ public EventRouteTests(bool isAsync) { } - // Infrastructure setup script uses this hardcoded value when linking the test eventhub to the test digital twins instance + // Infrastructure setup script uses this hard-coded value when linking the test eventhub to the test digital twins instance private const string EndpointName = "someEventHubEndpoint"; [Test] @@ -33,23 +32,23 @@ public async Task EventRoutes_Lifecycle() string eventRouteId = $"someEventRouteId-{GetRandom()}"; string filter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'"; - var eventRoute = new EventRoute(EndpointName, filter); + var eventRoute = new DigitalTwinsEventRoute(EndpointName, filter); // Test CreateEventRoute Response createEventRouteResponse = await client.CreateEventRouteAsync(eventRouteId, eventRoute).ConfigureAwait(false); createEventRouteResponse.Status.Should().Be((int)HttpStatusCode.NoContent); // Test GetEventRoute - EventRoute getEventRouteResult = await client.GetEventRouteAsync(eventRouteId); + DigitalTwinsEventRoute getEventRouteResult = await client.GetEventRouteAsync(eventRouteId); eventRoute.EndpointName.Should().Be(getEventRouteResult.EndpointName); eventRoute.Filter.Should().Be(getEventRouteResult.Filter); eventRouteId.Should().Be(getEventRouteResult.Id); // Test GetEventRoutes - var eventRoutesListOptions = new GetEventRoutesOptions(); - AsyncPageable eventRouteList = client.GetEventRoutesAsync(eventRoutesListOptions); + var eventRoutesListOptions = new GetDigitalTwinsEventRoutesOptions(); + AsyncPageable eventRouteList = client.GetEventRoutesAsync(eventRoutesListOptions); bool eventRouteFoundInList = false; - await foreach (EventRoute eventRouteListEntry in eventRouteList) + await foreach (DigitalTwinsEventRoute eventRouteListEntry in eventRouteList) { if (StringComparer.Ordinal.Equals(eventRouteListEntry.Id, eventRouteId)) { @@ -100,7 +99,7 @@ public void EventRoutes_MalformedEventRouteFilter_ThrowsBadRequestException() // Ensure unique eventRouteId and endpointName string eventRouteId = $"someEventRouteId-{GetRandom()}"; string filter = "this is not a valid filter string"; - var eventRoute = new EventRoute(EndpointName, filter); + var eventRoute = new DigitalTwinsEventRoute(EndpointName, filter); // Test CreateEventRoute Func act = async () => await client.CreateEventRouteAsync(eventRouteId, eventRoute).ConfigureAwait(false); diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/PublishTelemetryTests.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/PublishTelemetryTests.cs index 030df990a358..5fe51680cdb3 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/PublishTelemetryTests.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/PublishTelemetryTests.cs @@ -22,7 +22,7 @@ public PublishTelemetryTests(bool isAsync) { } - // Infrastructure setup script uses this hardcoded value when linking the test eventhub to the test digital twins instance. + // Infrastructure setup script uses this hard-coded value when linking the test eventhub to the test digital twins instance. private const string EndpointName = "someEventHubEndpoint"; [Test] @@ -42,7 +42,7 @@ public async Task PublishTelemetry_Lifecycle() try { // Create an event route for the digital twins client. - EventRoute eventRoute = await CreateEventRoute(client, eventRouteId).ConfigureAwait(false); + DigitalTwinsEventRoute eventRoute = await CreateEventRoute(client, eventRouteId).ConfigureAwait(false); // Create the models needed for the digital twin. await CreateModelsAndTwins(client, wifiModelId, roomWithWifiModelId, wifiComponentName, roomWithWifiTwinId).ConfigureAwait(false); @@ -108,26 +108,26 @@ public async Task PublishTelemetry_Lifecycle() private async Task CreateModelsAndTwins(DigitalTwinsClient client, string wifiModelId, string roomWithWifiModelId, string wifiComponentName, string roomWithWifiTwinId) { - // Generate the payload needed to create the wifi component model. + // Generate the payload needed to create the WiFi component model. string wifiModel = TestAssetsHelper.GetWifiModelPayload(wifiModelId); - // Generate the payload needed to create the room with wifi model. + // Generate the payload needed to create the room with WiFi model. string roomWithWifiModel = TestAssetsHelper.GetRoomWithWifiModelPayload(roomWithWifiModelId, wifiModelId, wifiComponentName); - // Create the room and wifi models. + // Create the room and WiFi models. await client.CreateModelsAsync(new List { roomWithWifiModel, wifiModel }).ConfigureAwait(false); - // Generate the payload needed to create the room with wifi twin. + // Generate the payload needed to create the room with WiFi twin. BasicDigitalTwin roomWithWifiTwin = TestAssetsHelper.GetRoomWithWifiTwinPayload(roomWithWifiModelId, wifiComponentName); - // Create the room with wifi component digital twin. + // Create the room with WiFi component digital twin. await client.CreateDigitalTwinAsync(roomWithWifiTwinId, roomWithWifiTwin).ConfigureAwait(false); } - private async Task CreateEventRoute(DigitalTwinsClient client, string eventRouteId) + private async Task CreateEventRoute(DigitalTwinsClient client, string eventRouteId) { string filter = "type = 'Microsoft.DigitalTwins.Twin.Create' OR type = 'microsoft.iot.telemetry'"; - var eventRoute = new EventRoute(EndpointName, filter); + var eventRoute = new DigitalTwinsEventRoute(EndpointName, filter); // Create an event route. Response createEventRouteResponse = await client.CreateEventRouteAsync(eventRouteId, eventRoute).ConfigureAwait(false); From 63f0ed1ba4fde2e56ebfd17c099155754fd7d40f Mon Sep 17 00:00:00 2001 From: Rishab Pohane <44072574+rishabpoh@users.noreply.github.com> Date: Fri, 23 Oct 2020 13:12:00 -0700 Subject: [PATCH 17/28] Creating new PR for Storage Blob migration guide (#15749) * Adding migration guide addressing most comments from old PR * Minor mod * Adding migration guide addressing most comments from old PR * Minor mod * Fixing links * Update sdk/storage/Azure.Storage.Blobs/AzureStorageNetMigrationV12.md Co-authored-by: James <41338290+jaschrep-msft@users.noreply.github.com> * Update sdk/storage/Azure.Storage.Blobs/AzureStorageNetMigrationV12.md Co-authored-by: James <41338290+jaschrep-msft@users.noreply.github.com> * Applying additions and changes from PR comments * fixed hyperlinks Co-authored-by: Rishab Pohane Co-authored-by: James <41338290+jaschrep-msft@users.noreply.github.com> --- .../AzureStorageNetMigrationV12.md | 383 ++++++++++++++++++ 1 file changed, 383 insertions(+) create mode 100644 sdk/storage/Azure.Storage.Blobs/AzureStorageNetMigrationV12.md diff --git a/sdk/storage/Azure.Storage.Blobs/AzureStorageNetMigrationV12.md b/sdk/storage/Azure.Storage.Blobs/AzureStorageNetMigrationV12.md new file mode 100644 index 000000000000..ae91a6a9636f --- /dev/null +++ b/sdk/storage/Azure.Storage.Blobs/AzureStorageNetMigrationV12.md @@ -0,0 +1,383 @@ +# Migration Guide: From Microsoft.Azure.Storage.Blob to Azure.Storage.Blobs + +This guide intends to assist customers in migrating from the legacy version 11 of the Azure Storage .NET library for Blobs to version 12. +It will focus on side-by-side comparisons for similar operations between the v12 package, [`Azure.Storage.Blobs`](https://www.nuget.org/packages/Azure.Storage.Blobs) and v11 package, [`Microsoft.Azure.Storage.Blob`](https://www.nuget.org/packages/Microsoft.Azure.Storage.Blob/). + +Familiarity with the v11 client library is assumed. For those new to the Azure Storage Blobs client library for .NET, please refer to the [Quickstart](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-dotnet) for the v12 library rather than this guide. + +## Table of contents + +- [Migration benefits](#migration-benefits) +- [General changes](#general-changes) + - [Authentication](#authentication) + - [Package and namespaces](#package-and-namespaces) + - [Client hierarchy](#client-hierarchy) + - [Client constructors](#client-constructors) +- [Migration samples](#migration-samples) + - [Creating a Container](#creating-a-container) + - [Uploading Blobs to a Container](#uploading-blobs-to-a-container) + - [Downloading Blobs from a Container](#downloading-blobs-from-a-container) + - [Listing Blobs in a Container](#listing-blobs-in-a-container) + - [Other](#other) +- [Additional information](#additional-information) + +## Migration benefits + +To understand why we created our version 12 client libraries, you may refer to the Tech Community blog post, [Announcing the Azure Storage v12 Client Libraries](https://techcommunity.microsoft.com/t5/azure-storage/announcing-the-azure-storage-v12-client-libraries/ba-p/1482394) or refer to our video [Introducing the New Azure SDKs](https://aka.ms/azsdk/intro). + +Included are the following: +- Thread-safe synchronous and asynchronous APIs +- Improved performance +- Consistent and idiomatic code organization, naming, and API structure, aligned with a set of common guidelines +- The learning curve associated with the libraries was reduced + +Note: The blog post linked above announces deprecation for previous versions of the library. + +## General changes + +### Package and namespaces + +Package names and the namespaces root for version 12 Azure client libraries follow the pattern `Azure.[Area].[Service]` where the legacy libraries followed the pattern `Microsoft.Azure.[Area].[Service]`. + +In this case, to install the legacy v11 package with Nuget: +``` +dotnet add package Microsoft.Azure.Storage.Blob +``` + +It is now the following for v12: +``` +dotnet add package Azure.Storage.Blobs +``` + +### Authentication + +#### Azure Active Directory + +v11 + +TODO + +v12 + +```csharp +public async Task ActiveDirectoryAuthAsync() +{ + // Create a token credential that can use our Azure Active + // Directory application to authenticate with Azure Storage + TokenCredential credential = + new ClientSecretCredential( + ActiveDirectoryTenantId, + ActiveDirectoryApplicationId, + ActiveDirectoryApplicationSecret, + new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + + // Create a client that can authenticate using our token credential + BlobServiceClient service = new BlobServiceClient(ActiveDirectoryBlobUri, credential); + + // Make a service request to verify we've successfully authenticated + await service.GetPropertiesAsync(); +} +``` + +#### SAS + +There are various SAS tokens that may be generated. Visit our documentation pages to learn how to [Create a User Delegation SAS](https://docs.microsoft.com/azure/storage/blobs/storage-blob-user-delegation-sas-create-dotnet), [Create a Service SAS](https://docs.microsoft.com/azure/storage/blobs/storage-blob-service-sas-create-dotnet), or [Create an Account SAS](https://docs.microsoft.com/azure/storage/common/storage-account-sas-create-dotnet?toc=/azure/storage/blobs/toc.json). + +v11 +```csharp +string sasBlobToken; + +// Get a reference to a blob within the container. +// Note that the blob may not exist yet, but a SAS can still be created for it. +CloudBlockBlob blob = container.GetBlockBlobReference(blobName); + +if (policyName == null) +{ + // Create a new access policy and define its constraints. + // Note that the SharedAccessBlobPolicy class is used both to define the parameters of an ad hoc SAS, and + // to construct a shared access policy that is saved to the container's shared access policies. + SharedAccessBlobPolicy adHocSAS = new SharedAccessBlobPolicy() + { + // When the start time for the SAS is omitted, the start time is assumed to be the time when the storage service receives the request. + // Omitting the start time for a SAS that is effective immediately helps to avoid clock skew. + SharedAccessExpiryTime = DateTime.UtcNow.AddHours(24), + Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.Write | SharedAccessBlobPermissions.Create + }; + + // Generate the shared access signature on the blob, setting the constraints directly on the signature. + sasBlobToken = blob.GetSharedAccessSignature(adHocSAS); + + Console.WriteLine("SAS for blob (ad hoc): {0}", sasBlobToken); + Console.WriteLine(); +} +else +{ + // Generate the shared access signature on the blob. In this case, all of the constraints for the + // shared access signature are specified on the container's stored access policy. + sasBlobToken = blob.GetSharedAccessSignature(null, policyName); + + Console.WriteLine("SAS for blob (stored access policy): {0}", sasBlobToken); + Console.WriteLine(); +} + +// Return the URI string for the container, including the SAS token. +return blob.Uri + sasBlobToken; +``` + +v12 +```csharp +// Create BlobSasBuilder and specify parameters +BlobSasBuilder sasBuilder = new BlobSasBuilder() +{ + BlobContainerName = containerName, + BlobName = blobName, + ExpiresOn = new DateTimeOffset + IPRange = new SasIPRange(System.Net.IPAddress.None, System.Net.IPAddress.None) +}; +// Set Permissions +sasBuilder.SetPermissions(BlobSasPermissions.Read); + +// Create SasQueryParameters +BlobSasQueryParameters parameters = sasBuilder.ToSasQueryParameters(sharedKeyCredential); + +// Create Uri with SasToken +BlobUriBuilder uriBuilder = new BlobUriBuilder(blobUri) +{ + Sas = sasBuilder.ToSasQueryParameters(constants.Sas.SharedKeyCredential) +}; +Uri sasUri = uriBuilder.ToUri() +``` + +#### Connection string + +The following code assumes you have acquired your connection string (you can do so from the Access Keys tab under Settings in your Portal Storage Account blade). It is recommended to store it in an environment variable. Below demonstrates how to parse the connection string in v11 vs v12. + +Legacy (v11) +```csharp +string connectionString = Environment.GetEnvironmentVariable("AZURE_STORAGE_CONNECTION_STRING"); +// Check whether the connection string can be parsed. +CloudStorageAccount storageAccount; +if (CloudStorageAccount.TryParse(storageConnectionString, out storageAccount)) +{ + // If the connection string is valid, proceed with operations against Blob + // storage here. +} +else +{ + // Otherwise, user needs to define the environment variable. +} +``` + +v12 +```csharp +string connectionString = Environment.GetEnvironmentVariable("AZURE_STORAGE_CONNECTION_STRING"); +// Create a client that can authenticate with a connection string +BlobServiceClient service = new BlobServiceClient(connectionString); +// Make a service request to verify we've successfully authenticated +await service.GetPropertiesAsync(); +``` + +### Shared Access Policies + +To learn more, visit our article [Create a Stored Access Policy with .NET](https://docs.microsoft.com/azure/storage/common/storage-stored-access-policy-define-dotnet) or take a look at the code comparison below. + +v11 +```csharp +private static async Task CreateStoredAccessPolicyAsync(CloudBlobContainer container, string policyName) +{ + // Create a new stored access policy and define its constraints. + // The access policy provides create, write, read, list, and delete permissions. + SharedAccessBlobPolicy sharedPolicy = new SharedAccessBlobPolicy() + { + // When the start time for the SAS is omitted, the start time is assumed to be the time when Azure Storage receives the request. + SharedAccessExpiryTime = DateTime.UtcNow.AddHours(24), + Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List | + SharedAccessBlobPermissions.Write + }; + + // Get the container's existing permissions. + BlobContainerPermissions permissions = await container.GetPermissionsAsync(); + + // Add the new policy to the container's permissions, and set the container's permissions. + permissions.SharedAccessPolicies.Add(policyName, sharedPolicy); + await container.SetPermissionsAsync(permissions); +} +``` + +v12 +```csharp +async static Task CreateStoredAccessPolicyAsync(string containerName) +{ + string connectionString = ""; + + // Use the connection string to authorize the operation to create the access policy. + // Azure AD does not support the Set Container ACL operation that creates the policy. + BlobContainerClient containerClient = new BlobContainerClient(connectionString, containerName); + + try + { + await containerClient.CreateIfNotExistsAsync(); + + // Create one or more stored access policies. + List signedIdentifiers = new List + { + new BlobSignedIdentifier + { + Id = "mysignedidentifier", + AccessPolicy = new BlobAccessPolicy + { + StartsOn = DateTimeOffset.UtcNow.AddHours(-1), + ExpiresOn = DateTimeOffset.UtcNow.AddDays(1), + Permissions = "rw" + } + } + }; + // Set the container's access policy. + await containerClient.SetAccessPolicyAsync(permissions: signedIdentifiers); + } + catch (RequestFailedException e) + { + Console.WriteLine(e.ErrorCode); + Console.WriteLine(e.Message); + } + finally + { + await containerClient.DeleteAsync(); + } +} +``` + +### Client hierarchy + +In the interest of simplifying the API surface we've made a three top level clients that can be used to interact with a majority of your resources: `BlobServiceClient`, `BlobContainerClient`, and `BlobClient`. + +[//]: # (Blob Metadata, properties, and attributes...) + +### Client constructors + +| v11 | v12 | +|-------|--------| +| `CloudStorageAccount` | `BlobServiceClient` | +| `CloudBlobContainer` | `BlobContainerClient` | +| `CloudBlobDirectory` | Not supported | +| `CloudBlob` | `BlobBaseClient` | +| `CloudBlockBlob` | `BlockBlobClient` | +| `CloudPageBlob` | `PageBlobClient` | +| `CloudAppendBlob` | `AppendBlobClient` | + +### Creating a Container + +v11 +```csharp +// Create the CloudBlobClient that represents the Blob storage endpoint for the storage account. +CloudBlobClient cloudBlobClient = storageAccount.CreateCloudBlobClient(); +CloudBlobContainer cloudBlobContainer = + cloudBlobClient.GetContainerReference("yourcontainer"); +await cloudBlobContainer.CreateAsync(); +``` + +v12 + +```csharp +// Create a BlobServiceClient object which will be used to create a container client +BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString); +BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient("yourcontainer"); +await containerClient.CreateAsync() +``` + +Or you can skip a step by using the `BlobServiceClient.CreateBlobContainerAsync()` method. + +```csharp +// Create a BlobServiceClient object which will be used to create a container client +BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString); +BlobContainerClient containerClient = await blobServiceClient.CreateBlobContainerAsync("yourcontainer"); +``` + + +### Uploading Blobs to a Container + +v11 +```csharp +// Assumes cloudBlobContainer already contains a reference to the container. +// filename is the intended blob name as a string +// localFilePath should be the path to the local file you want to upload +// Get a reference to the blob address, then upload the file to the blob. +CloudBlockBlob cloudBlockBlob = cloudBlobContainer.GetBlockBlobReference(filename); +await cloudBlockBlob.UploadFromFileAsync(localFilePath); +``` + +v12 +```csharp +// Assumes container already exists on the service. +// blobName is desired name of new blob in the service +// localFilePath should be the path to the local file you want to upload +// Get a reference to a blob +BlobClient blobClient = containerClient.GetBlobClient(blobName); +// choose the file to upload +await blobClient.UploadAsync(localFilePath, overwrite: true); +``` + +### Downloading Blobs from a Container + +v11 +```csharp +// Assumes you have already created a reference to the blob via blobClient +// downloadFilePath should be the path to the intended file to download the blob to +await cloudBlockBlob.DownloadToFileAsync(downloadFilePath, FileMode.Create); +``` + +v12 +```csharp +// Assumes you have already created a reference to the blob via blobClient +// downloadFilePath should be the path to the intended file to download the blob to +BlobDownloadInfo download = await blobClient.DownloadAsync(); +using (FileStream downloadFileStream = File.OpenWrite(downloadFilePath)) +{ + await download.Content.CopyToAsync(downloadFileStream); + downloadFileStream.Close(); +} +``` + +### Listing Blobs in a Container + +v11 +```csharp +// List the blobs in the container. +// Assumes a reference to the container via `cloudBlobContainer` +BlobContinuationToken blobContinuationToken = null; +do +{ + var results = await cloudBlobContainer.ListBlobsSegmentedAsync(null, blobContinuationToken); + // Get the value of the continuation token returned by the listing call. + blobContinuationToken = results.ContinuationToken; + foreach (IListBlobItem item in results.Results) + { + Console.WriteLine(item.Uri); + } +} while (blobContinuationToken != null); // Loop while the continuation token is not null. +``` + +v12 +```csharp +// Get a reference to the container +BlobContainerClient container = new BlobContainerClient(connectionString, containerName); +// List all blobs in the container +await foreach (BlobItem blobItem in containerClient.GetBlobsAsync()) +{ + Console.WriteLine("\t" + blobItem.Name); +} +``` + +### Other + +## Additional information + +### Samples +More examples can be found at: +- [Azure Storage samples using v12 .NET Client Libraries](https://docs.microsoft.com/azure/storage/common/storage-samples-dotnet?toc=/azure/storage/blobs/toc.json) + +### Links and references +- [Quickstart](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-dotnet) +- [Samples](https://docs.microsoft.com/azure/storage/common/storage-samples-dotnet?toc=/azure/storage/blobs/toc.json) +- [.NET SDK reference](https://docs.microsoft.com/dotnet/api/azure.storage.blobs?view=azure-dotnet) +- [Announcing the Azure Storage v12 Client Libraries](https://techcommunity.microsoft.com/t5/azure-storage/announcing-the-azure-storage-v12-client-libraries/ba-p/1482394) blog post From ab93affc315777d449bb291b3c84476537dfdfe5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 23 Oct 2020 13:26:23 -0700 Subject: [PATCH 18/28] retarget master as the base branch for docs metadata release (#16222) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> --- .../pipelines/templates/steps/docs-metadata-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 2b57bcf7f413..45f12580f10e 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -8,8 +8,8 @@ parameters: ScriptDirectory: eng/common/scripts TargetDocRepoName: '' TargetDocRepoOwner: '' - PRBranchName: 'smoke-test-rdme' - SourceBranchName: 'smoke-test' + PRBranchName: 'master-rdme' + SourceBranchName: 'master' PRLabels: 'auto-merge' ArtifactName: '' Language: '' From 334e83100f1d5fe2c8115e207a139d5236a34369 Mon Sep 17 00:00:00 2001 From: "David R. Williamson" Date: Fri, 23 Oct 2020 13:42:10 -0700 Subject: [PATCH 19/28] ADT: Rename "UploadTime" to "UploadedOn" for DigitalTwinsModelData (#16228) --- .../api/Azure.DigitalTwins.Core.netstandard2.0.cs | 2 +- .../DigitalTwinsLifecycleSamples.cs | 2 +- .../Azure.DigitalTwins.Core/samples/Readme.md | 2 +- .../src/Customized/Models/DigitalTwinsModelData.cs | 10 +++++++++- .../Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs | 6 +++--- .../src/Generated/Models/DigitalTwinsModelData.cs | 8 +++----- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs index 8fdddc747db4..67de7cd036e5 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/api/Azure.DigitalTwins.Core.netstandard2.0.cs @@ -135,7 +135,7 @@ internal DigitalTwinsModelData() { } public System.Collections.Generic.IReadOnlyDictionary DisplayName { get { throw null; } } public string DtdlModel { get { throw null; } } public string Id { get { throw null; } } - public System.DateTimeOffset? UploadTime { get { throw null; } } + public System.DateTimeOffset? UploadedOn { get { throw null; } } } public partial class GetComponentOptions { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs index dcd301a83da8..990258a2c307 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/DigitalTwinsClientSample/DigitalTwinsLifecycleSamples.cs @@ -176,7 +176,7 @@ public async Task GetAllModelsAsync() { Console.WriteLine($"Retrieved model '{model.Id}', " + $"display name '{model.DisplayName["en"]}', " + - $"upload time '{model.UploadTime}', " + + $"uploaded on '{model.UploadedOn}', " + $"and decommissioned '{model.Decommissioned}'"); } diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md index 6e8556b73cde..36905c2be94a 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/samples/Readme.md @@ -70,7 +70,7 @@ await foreach (DigitalTwinsModelData model in allModels) { Console.WriteLine($"Retrieved model '{model.Id}', " + $"display name '{model.DisplayName["en"]}', " + - $"upload time '{model.UploadTime}', " + + $"uploaded on '{model.UploadedOn}', " + $"and decommissioned '{model.Decommissioned}'"); } ``` diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs index 506f25517a36..072fc24aae3d 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Customized/Models/DigitalTwinsModelData.cs @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using Azure.Core; namespace Azure.DigitalTwins.Core { + /// [CodeGenModel("DigitalTwinsModelData")] public partial class DigitalTwinsModelData { @@ -15,12 +17,18 @@ public partial class DigitalTwinsModelData // Do not remove. /// - /// The model definition that conforms to the Digital Twins Definition Language (DTDL). + /// The model definition that conforms to Digital Twins Definition Language (DTDL) v2. /// /// [CodeGenMember("Model")] public string DtdlModel { get; } + /// + /// The date and time the model was uploaded to the service. + /// + [CodeGenMember("UploadTime")] + public DateTimeOffset? UploadedOn { get; } + #region null overrides #pragma warning disable CA1801 // Remove unused parameter diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs index 4ef8a51b8d5b..3f2e77f84cdd 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/DigitalTwinsClient.cs @@ -1061,7 +1061,7 @@ public virtual Response UpdateRelationship(string digitalTwinId, string relation /// { /// Console.WriteLine($"Retrieved model '{model.Id}', " + /// $"display name '{model.DisplayName["en"]}', " + - /// $"upload time '{model.UploadTime}', " + + /// $"uploaded on '{model.UploadedOn}', " + /// $"and decommissioned '{model.Decommissioned}'"); /// } /// @@ -1283,7 +1283,7 @@ public virtual Response DecommissionModel(string modelId, DecomissionModelOption /// /// Creates one or many models asynchronously. /// - /// The set of models conforming to the Digital Twins Definition Language (DTDL) to create. Each string corresponds to exactly one model. + /// The set of models conforming to Digital Twins Definition Language (DTDL) v2 to create. Each string corresponds to exactly one model. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. /// The created models and the http response . @@ -1317,7 +1317,7 @@ public virtual async Task> CreateModelsAsync(I /// /// Creates one or many models synchronously. /// - /// The set of models conforming to the Digital Twins Definition Language (DTDL) to create. Each string corresponds to exactly one model. + /// The set of models conforming to Digital Twins Definition Language (DTDL) v2 to create. Each string corresponds to exactly one model. /// The optional parameters for this request. If null, the default option values will be used. /// The cancellation token. /// The created models and the http response . diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs index 0ea092ac02f5..d1aaf9dc30d9 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Models/DigitalTwinsModelData.cs @@ -19,15 +19,15 @@ public partial class DigitalTwinsModelData /// A language map that contains the localized display names as specified in the model definition. /// A language map that contains the localized descriptions as specified in the model definition. /// The id of the model as specified in the model definition. - /// The time the model was uploaded to the service. + /// The time the model was uploaded to the service. /// Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins. /// The model definition. - internal DigitalTwinsModelData(IReadOnlyDictionary displayName, IReadOnlyDictionary description, string id, DateTimeOffset? uploadTime, bool? decommissioned, string dtdlModel) + internal DigitalTwinsModelData(IReadOnlyDictionary displayName, IReadOnlyDictionary description, string id, DateTimeOffset? uploadedOn, bool? decommissioned, string dtdlModel) { DisplayName = displayName; Description = description; Id = id; - UploadTime = uploadTime; + UploadedOn = uploadedOn; Decommissioned = decommissioned; DtdlModel = dtdlModel; } @@ -38,8 +38,6 @@ internal DigitalTwinsModelData(IReadOnlyDictionary displayName, public IReadOnlyDictionary Description { get; } /// The id of the model as specified in the model definition. public string Id { get; } - /// The time the model was uploaded to the service. - public DateTimeOffset? UploadTime { get; } /// Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins. public bool? Decommissioned { get; } } From 101ee044a07056f974653b3269485615c6a4a7bd Mon Sep 17 00:00:00 2001 From: Srinivas Date: Sat, 24 Oct 2020 04:00:23 +0530 Subject: [PATCH 20/28] Added .NET SDK Support for Confluent (#16152) * added confluent sdk for net * added create&delete resource group tests * added confluent create test * added delete test Co-authored-by: Srinivas Alluri --- .../confluent_resource-manager.txt | 14 + eng/pipelines/mgmt.yml | 1 + .../AzSdk.RP.props | 7 + .../Microsoft.Azure.Management.Confluent.sln | 31 + .../Generated/ConfluentManagementClient.cs | 363 ++++ .../Generated/IConfluentManagementClient.cs | 82 + .../src/Generated/IOrganizationOperations.cs | 68 + .../IOrganizationOperationsOperations.cs | 265 +++ .../src/Generated/Models/ErrorResponseBody.cs | 80 + .../src/Generated/Models/OfferDetail.cs | 141 ++ .../src/Generated/Models/OperationDisplay.cs | 80 + .../src/Generated/Models/OperationResult.cs | 61 + .../Generated/Models/OrganizationResource.cs | 145 ++ .../Models/OrganizationResourceProperties.cs | 101 ++ ...ganizationResourcePropertiesOfferDetail.cs | 64 + ...rganizationResourcePropertiesUserDetail.cs | 58 + .../Models/OrganizationResourceUpdate.cs | 53 + .../src/Generated/Models/Page.cs | 53 + .../src/Generated/Models/ProvisionState.cs | 29 + .../ResourceProviderDefaultErrorResponse.cs | 56 + ...ceProviderDefaultErrorResponseException.cs | 62 + .../src/Generated/Models/SaaSOfferStatus.cs | 30 + .../src/Generated/Models/UserDetail.cs | 98 ++ .../src/Generated/OrganizationOperations.cs | 380 ++++ .../OrganizationOperationsExtensions.cs | 87 + .../OrganizationOperationsOperations.cs | 1555 +++++++++++++++++ ...anizationOperationsOperationsExtensions.cs | 409 +++++ ...icrosoft.Azure.Management.Confluent.csproj | 25 + .../src/Properties/AssemblyInfo.cs | 19 + .../src/generate.ps1 | 1 + ...ft.Azure.Management.Confluent.Tests.csproj | 19 + .../ConfluentTests/TestResourceLifeCycle.json | 686 ++++++++ .../tests/Tests/ConfluentTest.cs | 88 + 33 files changed, 5211 insertions(+) create mode 100644 eng/mgmt/mgmtmetadata/confluent_resource-manager.txt create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/AzSdk.RP.props create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/Microsoft.Azure.Management.Confluent.sln create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/ConfluentManagementClient.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IConfluentManagementClient.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperations.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperationsOperations.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ErrorResponseBody.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OfferDetail.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationDisplay.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationResult.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResource.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceProperties.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesOfferDetail.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesUserDetail.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceUpdate.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/Page.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ProvisionState.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/SaaSOfferStatus.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/UserDetail.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperations.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsExtensions.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperations.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperationsExtensions.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Microsoft.Azure.Management.Confluent.csproj create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/Properties/AssemblyInfo.cs create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/src/generate.ps1 create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Microsoft.Azure.Management.Confluent.Tests.csproj create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/tests/SessionRecords/ConfluentTests/TestResourceLifeCycle.json create mode 100644 sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Tests/ConfluentTest.cs diff --git a/eng/mgmt/mgmtmetadata/confluent_resource-manager.txt b/eng/mgmt/mgmtmetadata/confluent_resource-manager.txt new file mode 100644 index 000000000000..e940a1257c00 --- /dev/null +++ b/eng/mgmt/mgmtmetadata/confluent_resource-manager.txt @@ -0,0 +1,14 @@ +Installing AutoRest version: v2 +AutoRest installed successfully. +Commencing code generation +Generating CSharp code +Executing AutoRest command +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/confluent/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\work\azure-sdk-for-net\sdk +2020-10-09 01:08:52 UTC +Azure-rest-api-specs repository information +GitHub fork: Azure +Branch: master +Commit: 90d8383a505528a920ad98b5a4f75f47f4aef2b9 +AutoRest information +Requested version: v2 +Bootstrapper version: autorest@2.0.4413 diff --git a/eng/pipelines/mgmt.yml b/eng/pipelines/mgmt.yml index 94dcf58da62c..969d5452beb6 100644 --- a/eng/pipelines/mgmt.yml +++ b/eng/pipelines/mgmt.yml @@ -39,6 +39,7 @@ pr: - sdk/cdn/Microsoft.Azure.Management.Cdn - sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices - sdk/compute/Microsoft.Azure.Management.Compute + - sdk/confluent/Microsoft.Azure.Management.Confluent - sdk/consumption/Microsoft.Azure.Management.Consumption - sdk/containerinstance/Microsoft.Azure.Management.ContainerInstance - sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/AzSdk.RP.props b/sdk/confluent/Microsoft.Azure.Management.Confluent/AzSdk.RP.props new file mode 100644 index 000000000000..12e739e6ff1a --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/AzSdk.RP.props @@ -0,0 +1,7 @@ + + + + Confluent_2020-03-01-preview; + $(PackageTags);$(CommonTags);$(AzureApiTag); + + \ No newline at end of file diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/Microsoft.Azure.Management.Confluent.sln b/sdk/confluent/Microsoft.Azure.Management.Confluent/Microsoft.Azure.Management.Confluent.sln new file mode 100644 index 000000000000..cbf1708e08d6 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/Microsoft.Azure.Management.Confluent.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30503.244 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Confluent", "src\Microsoft.Azure.Management.Confluent.csproj", "{84264E5A-CCFC-492E-9A3B-DB45F420002D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Confluent.Tests", "tests\Microsoft.Azure.Management.Confluent.Tests.csproj", "{0E8A75E2-7413-4A47-AC58-4708329C9DE7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {84264E5A-CCFC-492E-9A3B-DB45F420002D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84264E5A-CCFC-492E-9A3B-DB45F420002D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84264E5A-CCFC-492E-9A3B-DB45F420002D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84264E5A-CCFC-492E-9A3B-DB45F420002D}.Release|Any CPU.Build.0 = Release|Any CPU + {0E8A75E2-7413-4A47-AC58-4708329C9DE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E8A75E2-7413-4A47-AC58-4708329C9DE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E8A75E2-7413-4A47-AC58-4708329C9DE7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E8A75E2-7413-4A47-AC58-4708329C9DE7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {82F5145C-A55C-41E9-9391-F7F35E6FF73E} + EndGlobalSection +EndGlobal diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/ConfluentManagementClient.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/ConfluentManagementClient.cs new file mode 100644 index 000000000000..d24603241333 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/ConfluentManagementClient.cs @@ -0,0 +1,363 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + public partial class ConfluentManagementClient : ServiceClient, IConfluentManagementClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// Client Api Version. + /// + public string ApiVersion { get; private set; } + + /// + /// Microsoft Azure subscription id + /// + public string SubscriptionId { get; set; } + + /// + /// The preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IOrganizationOperations. + /// + public virtual IOrganizationOperations OrganizationOperations { get; private set; } + + /// + /// Gets the IOrganizationOperationsOperations. + /// + public virtual IOrganizationOperationsOperations Organization { get; private set; } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling ConfluentManagementClient.Dispose(). False: will not dispose provided httpClient + protected ConfluentManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected ConfluentManagementClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected ConfluentManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected ConfluentManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected ConfluentManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ConfluentManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling ConfluentManagementClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public ConfluentManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ConfluentManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ConfluentManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ConfluentManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ConfluentManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + OrganizationOperations = new OrganizationOperations(this); + Organization = new OrganizationOperationsOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2020-03-01-preview"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IConfluentManagementClient.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IConfluentManagementClient.cs new file mode 100644 index 000000000000..b8891af5dab8 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IConfluentManagementClient.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// + public partial interface IConfluentManagementClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// Client Api Version. + /// + string ApiVersion { get; } + + /// + /// Microsoft Azure subscription id + /// + string SubscriptionId { get; set; } + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IOrganizationOperations. + /// + IOrganizationOperations OrganizationOperations { get; } + + /// + /// Gets the IOrganizationOperationsOperations. + /// + IOrganizationOperationsOperations Organization { get; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperations.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperations.cs new file mode 100644 index 000000000000..cb08fb1325c8 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperations.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OrganizationOperations operations. + /// + public partial interface IOrganizationOperations + { + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperationsOperations.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperationsOperations.cs new file mode 100644 index 000000000000..90638614b73a --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/IOrganizationOperationsOperations.cs @@ -0,0 +1,265 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OrganizationOperationsOperations operations. + /// + public partial interface IOrganizationOperationsOperations + { + /// + /// List all organizations under the specified subscription. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all Organizations under the specified resource group. + /// + /// + /// Resource group name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the properties of a specific Organization resource. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string organizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// ARM resource tags + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string organizationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string organizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string organizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all organizations under the specified subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all Organizations under the specified resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ErrorResponseBody.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ErrorResponseBody.cs new file mode 100644 index 000000000000..60aa418ecc42 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ErrorResponseBody.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ErrorResponseBody + /// + /// + /// Response body of Error + /// + public partial class ErrorResponseBody + { + /// + /// Initializes a new instance of the ErrorResponseBody class. + /// + public ErrorResponseBody() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponseBody class. + /// + /// Error code + /// Error message + /// Error target + /// Error detail + public ErrorResponseBody(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) + { + Code = code; + Message = message; + Target = target; + Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets error code + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets error message + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets error target + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; private set; } + + /// + /// Gets error detail + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; private set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OfferDetail.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OfferDetail.cs new file mode 100644 index 000000000000..92f7f74e5d85 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OfferDetail.cs @@ -0,0 +1,141 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Confluent Offer detail + /// + public partial class OfferDetail + { + /// + /// Initializes a new instance of the OfferDetail class. + /// + public OfferDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OfferDetail class. + /// + /// Publisher Id + /// Offer Id + /// Offer Plan Id + /// Offer Plan Name + /// Offer Plan Term unit + /// SaaS Offer Status. Possible values include: + /// 'Started', 'PendingFulfillmentStart', 'InProgress', 'Subscribed', + /// 'Suspended', 'Reinstated', 'Succeeded', 'Failed', 'Unsubscribed', + /// 'Updating' + public OfferDetail(string publisherId = default(string), string id = default(string), string planId = default(string), string planName = default(string), string termUnit = default(string), string status = default(string)) + { + PublisherId = publisherId; + Id = id; + PlanId = planId; + PlanName = planName; + TermUnit = termUnit; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets publisher Id + /// + [JsonProperty(PropertyName = "publisherId")] + public string PublisherId { get; set; } + + /// + /// Gets or sets offer Id + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets offer Plan Id + /// + [JsonProperty(PropertyName = "planId")] + public string PlanId { get; set; } + + /// + /// Gets or sets offer Plan Name + /// + [JsonProperty(PropertyName = "planName")] + public string PlanName { get; set; } + + /// + /// Gets or sets offer Plan Term unit + /// + [JsonProperty(PropertyName = "termUnit")] + public string TermUnit { get; set; } + + /// + /// Gets or sets saaS Offer Status. Possible values include: 'Started', + /// 'PendingFulfillmentStart', 'InProgress', 'Subscribed', 'Suspended', + /// 'Reinstated', 'Succeeded', 'Failed', 'Unsubscribed', 'Updating' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PublisherId != null) + { + if (PublisherId.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "PublisherId", 50); + } + } + if (Id != null) + { + if (Id.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "Id", 50); + } + } + if (PlanId != null) + { + if (PlanId.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "PlanId", 50); + } + } + if (PlanName != null) + { + if (PlanName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "PlanName", 50); + } + } + if (TermUnit != null) + { + if (TermUnit.Length > 25) + { + throw new ValidationException(ValidationRules.MaxLength, "TermUnit", 25); + } + } + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationDisplay.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..2b5f2c1ba3a7 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationDisplay.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The object that represents the operation. + /// + public partial class OperationDisplay + { + /// + /// Initializes a new instance of the OperationDisplay class. + /// + public OperationDisplay() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationDisplay class. + /// + /// Service provider: + /// Microsoft.Confluent + /// Type on which the operation is performed, + /// e.g., 'clusters'. + /// Operation type, e.g., read, write, delete, + /// etc. + /// Description of the operation, e.g., + /// 'Write confluent'. + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets service provider: Microsoft.Confluent + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets type on which the operation is performed, e.g., + /// 'clusters'. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets operation type, e.g., read, write, delete, etc. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + /// + /// Gets or sets description of the operation, e.g., 'Write confluent'. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationResult.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationResult.cs new file mode 100644 index 000000000000..c9d6764f8dd8 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OperationResult.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// An Confluent REST API operation. + /// + public partial class OperationResult + { + /// + /// Initializes a new instance of the OperationResult class. + /// + public OperationResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationResult class. + /// + /// Operation name: + /// {provider}/{resource}/{operation} + /// The object that represents the + /// operation. + public OperationResult(string name = default(string), OperationDisplay display = default(OperationDisplay)) + { + Name = name; + Display = display; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation name: {provider}/{resource}/{operation} + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the object that represents the operation. + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResource.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResource.cs new file mode 100644 index 000000000000..88b34bce0955 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResource.cs @@ -0,0 +1,145 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Organization resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class OrganizationResource : IResource + { + /// + /// Initializes a new instance of the OrganizationResource class. + /// + public OrganizationResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrganizationResource class. + /// + /// The ARM id of the resource. + /// The name of the resource. + /// The type of the resource. + /// The creation time of the + /// resource. + /// Provision states for confluent RP. + /// Possible values include: 'Accepted', 'Creating', 'Updating', + /// 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', + /// 'NotSpecified' + /// Id of the Confluent + /// organization. + /// SSO url for the Confluent + /// organization. + /// Confluent offer detail + /// Subscriber detail + /// Organization resource tags + /// Location of Organization resource + public OrganizationResource(string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdTime = default(System.DateTime?), string provisioningState = default(string), string organizationId = default(string), string ssoUrl = default(string), OrganizationResourcePropertiesOfferDetail offerDetail = default(OrganizationResourcePropertiesOfferDetail), OrganizationResourcePropertiesUserDetail userDetail = default(OrganizationResourcePropertiesUserDetail), IDictionary tags = default(IDictionary), string location = default(string)) + { + Id = id; + Name = name; + Type = type; + CreatedTime = createdTime; + ProvisioningState = provisioningState; + OrganizationId = organizationId; + SsoUrl = ssoUrl; + OfferDetail = offerDetail; + UserDetail = userDetail; + Tags = tags; + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the ARM id of the resource. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the name of the resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the creation time of the resource. + /// + [JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime { get; private set; } + + /// + /// Gets or sets provision states for confluent RP. Possible values + /// include: 'Accepted', 'Creating', 'Updating', 'Deleting', + /// 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets id of the Confluent organization. + /// + [JsonProperty(PropertyName = "properties.organizationId")] + public string OrganizationId { get; private set; } + + /// + /// Gets SSO url for the Confluent organization. + /// + [JsonProperty(PropertyName = "properties.ssoUrl")] + public string SsoUrl { get; private set; } + + /// + /// Gets or sets confluent offer detail + /// + [JsonProperty(PropertyName = "properties.offerDetail")] + public OrganizationResourcePropertiesOfferDetail OfferDetail { get; set; } + + /// + /// Gets or sets subscriber detail + /// + [JsonProperty(PropertyName = "properties.userDetail")] + public OrganizationResourcePropertiesUserDetail UserDetail { get; set; } + + /// + /// Gets or sets organization resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets location of Organization resource + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceProperties.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceProperties.cs new file mode 100644 index 000000000000..d3075d98127f --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceProperties.cs @@ -0,0 +1,101 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Organization resource property + /// + public partial class OrganizationResourceProperties + { + /// + /// Initializes a new instance of the OrganizationResourceProperties + /// class. + /// + public OrganizationResourceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrganizationResourceProperties + /// class. + /// + /// The creation time of the + /// resource. + /// Provision states for confluent RP. + /// Possible values include: 'Accepted', 'Creating', 'Updating', + /// 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', + /// 'NotSpecified' + /// Id of the Confluent + /// organization. + /// SSO url for the Confluent + /// organization. + /// Confluent offer detail + /// Subscriber detail + public OrganizationResourceProperties(System.DateTime? createdTime = default(System.DateTime?), string provisioningState = default(string), string organizationId = default(string), string ssoUrl = default(string), OrganizationResourcePropertiesOfferDetail offerDetail = default(OrganizationResourcePropertiesOfferDetail), OrganizationResourcePropertiesUserDetail userDetail = default(OrganizationResourcePropertiesUserDetail)) + { + CreatedTime = createdTime; + ProvisioningState = provisioningState; + OrganizationId = organizationId; + SsoUrl = ssoUrl; + OfferDetail = offerDetail; + UserDetail = userDetail; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the creation time of the resource. + /// + [JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime { get; private set; } + + /// + /// Gets or sets provision states for confluent RP. Possible values + /// include: 'Accepted', 'Creating', 'Updating', 'Deleting', + /// 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets id of the Confluent organization. + /// + [JsonProperty(PropertyName = "organizationId")] + public string OrganizationId { get; private set; } + + /// + /// Gets SSO url for the Confluent organization. + /// + [JsonProperty(PropertyName = "ssoUrl")] + public string SsoUrl { get; private set; } + + /// + /// Gets or sets confluent offer detail + /// + [JsonProperty(PropertyName = "offerDetail")] + public OrganizationResourcePropertiesOfferDetail OfferDetail { get; set; } + + /// + /// Gets or sets subscriber detail + /// + [JsonProperty(PropertyName = "userDetail")] + public OrganizationResourcePropertiesUserDetail UserDetail { get; set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesOfferDetail.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesOfferDetail.cs new file mode 100644 index 000000000000..d658b00b25d0 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesOfferDetail.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using System.Linq; + + /// + /// Confluent offer detail + /// + public partial class OrganizationResourcePropertiesOfferDetail : OfferDetail + { + /// + /// Initializes a new instance of the + /// OrganizationResourcePropertiesOfferDetail class. + /// + public OrganizationResourcePropertiesOfferDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// OrganizationResourcePropertiesOfferDetail class. + /// + /// Publisher Id + /// Offer Id + /// Offer Plan Id + /// Offer Plan Name + /// Offer Plan Term unit + /// SaaS Offer Status. Possible values include: + /// 'Started', 'PendingFulfillmentStart', 'InProgress', 'Subscribed', + /// 'Suspended', 'Reinstated', 'Succeeded', 'Failed', 'Unsubscribed', + /// 'Updating' + public OrganizationResourcePropertiesOfferDetail(string publisherId = default(string), string id = default(string), string planId = default(string), string planName = default(string), string termUnit = default(string), string status = default(string)) + : base(publisherId, id, planId, planName, termUnit, status) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesUserDetail.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesUserDetail.cs new file mode 100644 index 000000000000..db8fbb989149 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourcePropertiesUserDetail.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using System.Linq; + + /// + /// Subscriber detail + /// + public partial class OrganizationResourcePropertiesUserDetail : UserDetail + { + /// + /// Initializes a new instance of the + /// OrganizationResourcePropertiesUserDetail class. + /// + public OrganizationResourcePropertiesUserDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// OrganizationResourcePropertiesUserDetail class. + /// + /// First name + /// Last name + /// Email address + public OrganizationResourcePropertiesUserDetail(string firstName = default(string), string lastName = default(string), string emailAddress = default(string)) + : base(firstName, lastName, emailAddress) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceUpdate.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceUpdate.cs new file mode 100644 index 000000000000..ad6586806412 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/OrganizationResourceUpdate.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Organization Resource update + /// + public partial class OrganizationResourceUpdate + { + /// + /// Initializes a new instance of the OrganizationResourceUpdate class. + /// + public OrganizationResourceUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrganizationResourceUpdate class. + /// + /// ARM resource tags + public OrganizationResourceUpdate(IDictionary tags = default(IDictionary)) + { + Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ARM resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/Page.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/Page.cs new file mode 100644 index 000000000000..b140177b15a4 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/Page.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("nextLink")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ProvisionState.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ProvisionState.cs new file mode 100644 index 000000000000..e22ce390d6a1 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ProvisionState.cs @@ -0,0 +1,29 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + + /// + /// Defines values for ProvisionState. + /// + public static class ProvisionState + { + public const string Accepted = "Accepted"; + public const string Creating = "Creating"; + public const string Updating = "Updating"; + public const string Deleting = "Deleting"; + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Canceled = "Canceled"; + public const string Deleted = "Deleted"; + public const string NotSpecified = "NotSpecified"; + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs new file mode 100644 index 000000000000..effdda2e7e37 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceProviderDefaultErrorResponse + /// + /// + /// Default error response for resource provider + /// + public partial class ResourceProviderDefaultErrorResponse + { + /// + /// Initializes a new instance of the + /// ResourceProviderDefaultErrorResponse class. + /// + public ResourceProviderDefaultErrorResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ResourceProviderDefaultErrorResponse class. + /// + /// Response body of Error + public ResourceProviderDefaultErrorResponse(ErrorResponseBody error = default(ErrorResponseBody)) + { + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets response body of Error + /// + [JsonProperty(PropertyName = "error")] + public ErrorResponseBody Error { get; private set; } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs new file mode 100644 index 000000000000..ea04b57cce3e --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Microsoft.Rest; + + /// + /// Exception thrown for an invalid response with + /// ResourceProviderDefaultErrorResponse information. + /// + public partial class ResourceProviderDefaultErrorResponseException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ResourceProviderDefaultErrorResponse Body { get; set; } + + /// + /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class. + /// + public ResourceProviderDefaultErrorResponseException() + { + } + + /// + /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class. + /// + /// The exception message. + public ResourceProviderDefaultErrorResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class. + /// + /// The exception message. + /// Inner exception. + public ResourceProviderDefaultErrorResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/SaaSOfferStatus.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/SaaSOfferStatus.cs new file mode 100644 index 000000000000..abd6245f20fc --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/SaaSOfferStatus.cs @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + + /// + /// Defines values for SaaSOfferStatus. + /// + public static class SaaSOfferStatus + { + public const string Started = "Started"; + public const string PendingFulfillmentStart = "PendingFulfillmentStart"; + public const string InProgress = "InProgress"; + public const string Subscribed = "Subscribed"; + public const string Suspended = "Suspended"; + public const string Reinstated = "Reinstated"; + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Unsubscribed = "Unsubscribed"; + public const string Updating = "Updating"; + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/UserDetail.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/UserDetail.cs new file mode 100644 index 000000000000..e04e69287a4b --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/Models/UserDetail.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subscriber detail + /// + public partial class UserDetail + { + /// + /// Initializes a new instance of the UserDetail class. + /// + public UserDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserDetail class. + /// + /// First name + /// Last name + /// Email address + public UserDetail(string firstName = default(string), string lastName = default(string), string emailAddress = default(string)) + { + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets first name + /// + [JsonProperty(PropertyName = "firstName")] + public string FirstName { get; set; } + + /// + /// Gets or sets last name + /// + [JsonProperty(PropertyName = "lastName")] + public string LastName { get; set; } + + /// + /// Gets or sets email address + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FirstName != null) + { + if (FirstName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "FirstName", 50); + } + } + if (LastName != null) + { + if (LastName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "LastName", 50); + } + } + if (EmailAddress != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(EmailAddress, "^[\\w\\.\\-+!%\"\\s]+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$")) + { + throw new ValidationException(ValidationRules.Pattern, "EmailAddress", "^[\\w\\.\\-+!%\"\\s]+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$"); + } + } + } + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperations.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperations.cs new file mode 100644 index 000000000000..870983768cc8 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperations.cs @@ -0,0 +1,380 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OrganizationOperations operations. + /// + internal partial class OrganizationOperations : IServiceOperations, IOrganizationOperations + { + /// + /// Initializes a new instance of the OrganizationOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal OrganizationOperations(ConfluentManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ConfluentManagementClient + /// + public ConfluentManagementClient Client { get; private set; } + + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Confluent/operations").ToString(); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsExtensions.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsExtensions.cs new file mode 100644 index 000000000000..93dfa5dd518c --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsExtensions.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for OrganizationOperations. + /// + public static partial class OrganizationOperationsExtensions + { + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IOrganizationOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOrganizationOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IOrganizationOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List all operations provided by Microsoft.Confluent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IOrganizationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperations.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperations.cs new file mode 100644 index 000000000000..061e72639640 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperations.cs @@ -0,0 +1,1555 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OrganizationOperationsOperations operations. + /// + internal partial class OrganizationOperationsOperations : IServiceOperations, IOrganizationOperationsOperations + { + /// + /// Initializes a new instance of the OrganizationOperationsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal OrganizationOperationsOperations(ConfluentManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ConfluentManagementClient + /// + public ConfluentManagementClient Client { get; private set; } + + /// + /// List all organizations under the specified subscription. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List all Organizations under the specified resource group. + /// + /// + /// Resource group name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the properties of a specific Organization resource. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string organizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (organizationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "organizationName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("organizationName", organizationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{organizationName}", System.Uri.EscapeDataString(organizationName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, organizationName, body, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// ARM resource tags + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string organizationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (organizationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "organizationName"); + } + OrganizationResourceUpdate body = default(OrganizationResourceUpdate); + if (tags != null) + { + body = new OrganizationResourceUpdate(); + body.Tags = tags; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("organizationName", organizationName); + tracingParameters.Add("body", body); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{organizationName}", System.Uri.EscapeDataString(organizationName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string organizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, organizationName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Create Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (organizationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "organizationName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("organizationName", organizationName); + tracingParameters.Add("body", body); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{organizationName}", System.Uri.EscapeDataString(organizationName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete Organization resource + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string organizationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (organizationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "organizationName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("organizationName", organizationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{organizationName}", System.Uri.EscapeDataString(organizationName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List all organizations under the specified subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List all Organizations under the specified resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperationsExtensions.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperationsExtensions.cs new file mode 100644 index 000000000000..560b6d108426 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Generated/OrganizationOperationsOperationsExtensions.cs @@ -0,0 +1,409 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Confluent +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for OrganizationOperationsOperations. + /// + public static partial class OrganizationOperationsOperationsExtensions + { + /// + /// List all organizations under the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListBySubscription(this IOrganizationOperationsOperations operations) + { + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); + } + + /// + /// List all organizations under the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IOrganizationOperationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List all Organizations under the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + public static IPage ListByResourceGroup(this IOrganizationOperationsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// List all Organizations under the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the properties of a specific Organization resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + public static OrganizationResource Get(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName) + { + return operations.GetAsync(resourceGroupName, organizationName).GetAwaiter().GetResult(); + } + + /// + /// Get the properties of a specific Organization resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, organizationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + public static OrganizationResource Create(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource)) + { + return operations.CreateAsync(resourceGroupName, organizationName, body).GetAwaiter().GetResult(); + } + + /// + /// Create Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, organizationName, body, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// ARM resource tags + /// + public static OrganizationResource Update(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, IDictionary tags = default(IDictionary)) + { + return operations.UpdateAsync(resourceGroupName, organizationName, tags).GetAwaiter().GetResult(); + } + + /// + /// Update Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// ARM resource tags + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, organizationName, tags, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + public static void Delete(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName) + { + operations.DeleteAsync(resourceGroupName, organizationName).GetAwaiter().GetResult(); + } + + /// + /// Delete Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, organizationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Create Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + public static OrganizationResource BeginCreate(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource)) + { + return operations.BeginCreateAsync(resourceGroupName, organizationName, body).GetAwaiter().GetResult(); + } + + /// + /// Create Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// Organization resource model + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, OrganizationResource body = default(OrganizationResource), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, organizationName, body, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + public static void BeginDelete(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName) + { + operations.BeginDeleteAsync(resourceGroupName, organizationName).GetAwaiter().GetResult(); + } + + /// + /// Delete Organization resource + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource group name + /// + /// + /// Organization resource name + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IOrganizationOperationsOperations operations, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, organizationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List all organizations under the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBySubscriptionNext(this IOrganizationOperationsOperations operations, string nextPageLink) + { + return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List all organizations under the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionNextAsync(this IOrganizationOperationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List all Organizations under the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IOrganizationOperationsOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List all Organizations under the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IOrganizationOperationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Microsoft.Azure.Management.Confluent.csproj b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Microsoft.Azure.Management.Confluent.csproj new file mode 100644 index 000000000000..dfe1c9ba0fb7 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Microsoft.Azure.Management.Confluent.csproj @@ -0,0 +1,25 @@ + + + + + + + Microsoft.Azure.Management.Confluent + Microsoft Azure Management Confluent library + 0.1.0 + Microsoft.Azure.Management.Confluent + management;confluent; + + + + + + $(SdkTargetFx) + + + + + + diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Properties/AssemblyInfo.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..d0caf6a5442a --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Reflection; +using System.Resources; + +[assembly: AssemblyTitle("Microsoft Azure Confluent Management Library")] +[assembly: AssemblyDescription("Provides Microsoft Azure Confluent management functions for managing the Microsoft Azure Confluent service.")] + +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] + +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/src/generate.ps1 b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/generate.ps1 new file mode 100644 index 000000000000..7727c4b9e8a5 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/src/generate.ps1 @@ -0,0 +1 @@ +Start-AutoRestCodeGeneration -ResourceProvider "confluent/resource-manager" -AutoRestVersion "v2" diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Microsoft.Azure.Management.Confluent.Tests.csproj b/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Microsoft.Azure.Management.Confluent.Tests.csproj new file mode 100644 index 000000000000..042cc5eeaa43 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Microsoft.Azure.Management.Confluent.Tests.csproj @@ -0,0 +1,19 @@ + + + + Confluent.Tests + Confluent.Tests Class Library + Confluent.Tests + 1.0.0-preview + + + + + + + + + PreserveNewest + + + \ No newline at end of file diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/SessionRecords/ConfluentTests/TestResourceLifeCycle.json b/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/SessionRecords/ConfluentTests/TestResourceLifeCycle.json new file mode 100644 index 000000000000..5eade7f08a92 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/SessionRecords/ConfluentTests/TestResourceLifeCycle.json @@ -0,0 +1,686 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourcegroups/confluent-sdk-test-rg1630?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L3Jlc291cmNlZ3JvdXBzL2NvbmZsdWVudC1zZGstdGVzdC1yZzE2MzA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dd127b46-e0c6-45c7-b981-b9906f73f752" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 21 Oct 2020 19:30:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "70949b37-be9a-4e60-bdf7-5e5879510fca" + ], + "x-ms-correlation-request-id": [ + "70949b37-be9a-4e60-bdf7-5e5879510fca" + ], + "x-ms-routing-request-id": [ + "WESTINDIA:20201020T170517Z:70949b37-be9a-4e60-bdf7-5e5879510fca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "200" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourceGroups/confluent-sdk-test-rg1630\",\r\n \"name\": \"confluent-sdk-test-rg1630\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourcegroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350?api-version=2020-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L3Jlc291cmNlR3JvdXBzL2NvbmZsdWVudC1zZGstdGVzdC1yZzE2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5Db25mbHVlbnQvb3JnYW5pemF0aW9ucy9jb25mbHVlbnQtc2RrLXRlc3QtcmVzb3VyY2U4MzUwP2FwaS12ZXJzaW9uPTIwMjAtMDMtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\":{\r\n \"offerDetail\":{\r\n \"publisherId\": \"isvtestuklegacy\",\r\n \"id\": \"liftr_cf_dev\",\r\n \"planId\": \"payg\",\r\n \"planName\": \"Pay as you go\",\r\n \"termUnit\": \"P1M\"\r\n},\r\n \"userDetail\":{\r\n \"firstName\": \"Srinivas\",\r\n \"lastName\": \"Alluri\",\r\n \"emailAddress\": \"sralluri@microsoft.com\"\r\n} \r\n},\r\n \"tags\":{\r\n \"Environment\": \"Dev\" \r\n} \r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11c47e3f-bfb0-4e2f-a98d-887cc5bb051c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Confluent.ConfluentManagementClient/0.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "683" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 21 Oct 2020 19:05:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"5600e31a-0000-0700-0000-5f90868f0000\"" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "Azure-AsyncOperation": [ + "https://api-dogfood.resources.windows-int.net/providers/Microsoft.Confluent/locations/WESTUS2/operationStatuses/5e2bd0bf-aba7-4790-8df8-d992dc82f129?api-version=2020-03-01-preview" + ], + "x-ms-request-id": [ + "5e2bd0bf-aba7-4790-8df8-d992dc82f129" + ], + "x-ms-correlation-request-id": [ + "11c47e3f-bfb0-4e2f-a98d-887cc5bb051c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20201021T190552Z:16382656-5609-4b44-ae14-363f18895d74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "683" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourceGroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350\",\r\n \"name\": \"confluent-sdk-test-resource8350\",\r\n \"type\": \"Microsoft.Confluent/organizations\",\r\n \"location\": \"westus2\",\r\n \"properties\":{\r\n \"offerDetail\":{\r\n \"publisherId\": \"isvtestuklegacy\",\r\n \"id\": \"liftr_cf_dev\",\r\n \"planId\": \"payg\",\r\n \"planName\": \"Pay as you go\",\r\n \"termUnit\": \"P1M\"\r\n},\r\n \"userDetail\":{\r\n \"firstName\": \"Srinivas\",\r\n \"lastName\": \"Alluri\",\r\n \"emailAddress\": \"sralluri@microsoft.com\"\r\n} \r\n},\r\n \"tags\":{\r\n \"Environment\": \"Dev\" \r\n} \r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/providers/Microsoft.Confluent/locations/WESTUS2/operationStatuses/5e2bd0bf-aba7-4790-8df8-d992dc82f129?api-version=2020-03-01-preview", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29uZmx1ZW50L2xvY2F0aW9ucy9XRVNUVVMyL29wZXJhdGlvblN0YXR1c2VzLzVlMmJkMGJmLWFiYTctNDc5MC04ZGY4LWQ5OTJkYzgyZjEyOT9hcGktdmVyc2lvbj0yMDIwLTAzLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Confluent.ConfluentManagementClient/0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 21 Oct 2020 19:05:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"5600e31a-0000-0700-0000-5f90868f0000\"" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "1199" + ], + "x-ms-request-id": [ + "5e2bd0bf-aba7-4790-8df8-d992dc82f129" + ], + "x-ms-correlation-request-id": [ + "11c47e3f-bfb0-4e2f-a98d-887cc5bb051c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20201021T190552Z:16382656-5609-4b44-ae14-363f18895d74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "392" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Confluent/locations/WESTUS2/operationStatuses/5e2bd0bf-aba7-4790-8df8-d992dc82f129\",\r\n \"name\": \"5e2bd0bf-aba7-4790-8df8-d992dc82f129\",\r\n \"resourceId\": \"/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourceGroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350\",\r\n \"status\": \"Succeeded\",\r\n \"startTime\": \"2020-10-21T19:05:48.6482271Z\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourcegroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350?api-version=2020-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L3Jlc291cmNlR3JvdXBzL2NvbmZsdWVudC1zZGstdGVzdC1yZzE2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5Db25mbHVlbnQvb3JnYW5pemF0aW9ucy9jb25mbHVlbnQtc2RrLXRlc3QtcmVzb3VyY2U4MzUwP2FwaS12ZXJzaW9uPTIwMjAtMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Confluent.ConfluentManagementClient/0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 21 Oct 2020 19:06:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"5600e31a-0000-0700-0000-5f90868f0000\"" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "1199" + ], + "x-ms-request-id": [ + "5e2bd0bf-aba7-4790-8df8-d992dc82f129" + ], + "x-ms-correlation-request-id": [ + "11c47e3f-bfb0-4e2f-a98d-887cc5bb051c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20201021T190552Z:16382656-5609-4b44-ae14-363f18895d74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "682" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourceGroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350\",\r\n \"name\": \"confluent-sdk-test-resource8350\",\r\n \"type\": \"Microsoft.Confluent/organizations\",\r\n \"location\": \"westus2\",\r\n \"properties\":{\r\n \"provisioningState\": \"Succeeded\",\r\n \"createdTime\": \"2020-10-21T19:05:49.2563153Z\",\r\n \"organizationId\": \"ba95c968-b444-4b21-ac4f-c5dc739fd56b\",\r\n \"offerDetail\":{\r\n \"publisherId\": \"isvtestuklegacy\",\r\n \"id\": \"liftr_cf_dev\",\r\n \"planId\": \"payg\",\r\n \"planName\": \"Pay as you go\",\r\n \"termUnit\": \"P1M\"\r\n},\r\n \"userDetail\":{\r\n \"firstName\": \"Srinivas\",\r\n \"lastName\": \"Alluri\",\r\n \"emailAddress\": \"sralluri@microsoft.com\"\r\n} \r\n},\r\n \"tags\":{\r\n \"Environment\": \"Dev\" \r\n} \r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourcegroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350?api-version=2020-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L3Jlc291cmNlR3JvdXBzL2NvbmZsdWVudC1zZGstdGVzdC1yZzE2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5Db25mbHVlbnQvb3JnYW5pemF0aW9ucy9jb25mbHVlbnQtc2RrLXRlc3QtcmVzb3VyY2U4MzUwP2FwaS12ZXJzaW9uPTIwMjAtMDMtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11c47e3f-bfb0-4e2f-a98d-887cc5bb051c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Confluent.ConfluentManagementClient/0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 21 Oct 2020 19:06:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"5600e31a-0000-0700-0000-5f90868f0000\"" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "52819f24-c42b-4411-bc82-e518a4a994b1" + ], + "x-ms-correlation-request-id": [ + "dd7ed76f-ef3d-421e-9d77-7b88cef604fa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20201021T190752Z:16382656-5609-4b44-ae14-363f18895d74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "817" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "null", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourcegroups/confluent-sdk-test-rg1630/providers/Microsoft.Confluent/organizations/confluent-sdk-test-resource8350?api-version=2020-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L3Jlc291cmNlZ3JvdXBzL2NvbmZsdWVudC1zZGstdGVzdC1yZzE2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5Db25mbHVlbnQvb3JnYW5pemF0aW9ucy9jb25mbHVlbnQtc2RrLXRlc3QtcmVzb3VyY2U4MzUwP2FwaS12ZXJzaW9uPTIwMjAtMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11c47e3f-bfb0-4e2f-a98d-887cc5bb051c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Confluent.ConfluentManagementClient/0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 21 Oct 2020 19:07:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"5600e31a-0000-0700-0000-5f90868f0000\"" + ], + "Server": [ + "Kestrel" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "85fe7fef-5532-48df-8e99-0bec2a7ef1cb" + ], + "x-ms-correlation-request-id": [ + "62ea5233-9184-46a3-918e-fa5c6c2d15d9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20201021T190552Z:16382656-5609-4b44-ae14-363f18895d74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "817" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "\"{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Confluent/organizations/confluent-sdk-test-resource8350' under resource group 'confluent-sdk-test-rg1630' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\" \r\n} \r\n}\"", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/resourcegroups/confluent-sdk-test-rg1630?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L3Jlc291cmNlZ3JvdXBzL2NvbmZsdWVudC1zZGstdGVzdC1yZzE2MzA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "756949b0-3972-4b12-b2ae-655d0de5e5d7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 12 Oct 2020 19:34:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "6c2e9fe4-bde8-4d60-8fbb-a14414116677" + ], + "x-ms-correlation-request-id": [ + "6c2e9fe4-bde8-4d60-8fbb-a14414116677" + ], + "x-ms-routing-request-id": [ + "WESTUS:20201012T193436Z:6c2e9fe4-bde8-4d60-8fbb-a14414116677" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 12 Oct 2020 19:34:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "76e66806-4205-45ad-9d93-c354b3b7bb10" + ], + "x-ms-correlation-request-id": [ + "76e66806-4205-45ad-9d93-c354b3b7bb10" + ], + "x-ms-routing-request-id": [ + "WESTUS:20201012T193451Z:76e66806-4205-45ad-9d93-c354b3b7bb10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 12 Oct 2020 19:35:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "51f0b984-1ec5-4fb0-8d84-0f2980e643a9" + ], + "x-ms-correlation-request-id": [ + "51f0b984-1ec5-4fb0-8d84-0f2980e643a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20201012T193506Z:51f0b984-1ec5-4fb0-8d84-0f2980e643a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 12 Oct 2020 19:35:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "3ed7a9c5-a003-4c6d-b2db-39d92b010ee2" + ], + "x-ms-correlation-request-id": [ + "3ed7a9c5-a003-4c6d-b2db-39d92b010ee2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20201012T193521Z:3ed7a9c5-a003-4c6d-b2db-39d92b010ee2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/ece8c848-58d2-4f46-90d6-541a94c36349/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1EQVRBRE9HOjJEU0RLOjJEVEVTVDoyRFJHMTYzMC1XRVNUVVMyIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMyIn0?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWNlOGM4NDgtNThkMi00ZjQ2LTkwZDYtNTQxYTk0YzM2MzQ5L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFFUVZSQlJFOUhPakpFVTBSTE9qSkVWRVZUVkRveVJGSkhNVFl6TUMxWFJWTlVWVk15SWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTXlJbjA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 12 Oct 2020 19:35:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "b68ad2b9-7c54-4c84-824c-0f964e257963" + ], + "x-ms-correlation-request-id": [ + "b68ad2b9-7c54-4c84-824c-0f964e257963" + ], + "x-ms-routing-request-id": [ + "WESTUS:20201012T193521Z:b68ad2b9-7c54-4c84-824c-0f964e257963" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "CreateName": [ + "confluent-sdk-test-rg1630", + "confluent-sdk-test-resource8350", + "default9152" + ] + }, + "Variables": { + "SubscriptionId": "ece8c848-58d2-4f46-90d6-541a94c36349" + } +} \ No newline at end of file diff --git a/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Tests/ConfluentTest.cs b/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Tests/ConfluentTest.cs new file mode 100644 index 000000000000..2ac6e3499c72 --- /dev/null +++ b/sdk/confluent/Microsoft.Azure.Management.Confluent/tests/Tests/ConfluentTest.cs @@ -0,0 +1,88 @@ + +using Microsoft.Azure.Management.Confluent.Models; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using Xunit; + +namespace Microsoft.Azure.Management.Confluent.Tests +{ + public class ConfluentTests + { + [Fact] + public void TestResourceLifeCycle() + { + { + var context = MockContext.Start(GetType()); + string rgName = CreateName("confluent-sdk-test-rg"); + string resourceName = CreateName("confluent-sdk-test-resource8350"); + + CreateResourceGroup(context, rgName); + OrganizationResource rp = CreateResource(context, rgName, resourceName); + Assert.NotNull(rp); + + DeleteResource(context, rgName, resourceName); + DeleteResourceGroup(context, rgName); + } + } + + private ResourceGroup CreateResourceGroup(MockContext context, string rgName) + { + ResourceManagementClient client = GetResourceManagementClient(context); + return client.ResourceGroups.CreateOrUpdate( + rgName, + new ResourceGroup + { + Location = "westus2" + }); + } + + private void DeleteResourceGroup(MockContext context, string rgName) + { + ResourceManagementClient client = GetResourceManagementClient(context); + client.ResourceGroups.Delete(rgName); + } + + private OrganizationResource CreateResource(MockContext context, string rgName, string resourceName) + { + ConfluentManagementClient client = GetConfluentManagementClient(context); + return client.Organization.Create( + rgName, + resourceName, + new OrganizationResource( + name: resourceName, + type: "Microsoft.Confluent/organizations", + offerDetail: new OrganizationResourcePropertiesOfferDetail(publisherId: "isvtestuklegacy", id: "liftr_cf_dev", planId: "payg", planName: "Pay as you go", termUnit: "P1M"), + userDetail: new OrganizationResourcePropertiesUserDetail(firstName: "Srinivas", lastName: "Alluri", emailAddress: "sralluri@microsoft.com"), + location: "westus2" + ) + ); + } + + private void DeleteResource(MockContext context, string rgName, string resourceName) + { + ConfluentManagementClient client = GetConfluentManagementClient(context); + client.Organization.Delete(rgName, resourceName); + } + + private IPage ListResources(MockContext context, string rgName) + { + ConfluentManagementClient client = GetConfluentManagementClient(context); + return client.Organization.ListByResourceGroup(rgName); + } + + private string CreateName(string prefix) => TestUtilities.GenerateName(prefix); + + private ResourceManagementClient GetResourceManagementClient(MockContext context) + { + return context.GetServiceClient(); + } + + private ConfluentManagementClient GetConfluentManagementClient(MockContext context) + { + return context.GetServiceClient(); + } + } +} From 1c8ac3a0d1cb8307efce7615558cd7b9e7c9debe Mon Sep 17 00:00:00 2001 From: ulazarevic <36318254+ulazarevic@users.noreply.github.com> Date: Sat, 24 Oct 2020 00:34:06 +0200 Subject: [PATCH 21/28] added tests for managed instance creation with maintenance configuration id (#16156) Co-authored-by: Uros Lazarevic --- .../tests/ManagedInstanceCrudScenarioTests.cs | 22 +- ...estCreateUpdateGetDropManagedInstance.json | 437 ++++++++++-------- 2 files changed, 262 insertions(+), 197 deletions(-) diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/ManagedInstanceCrudScenarioTests.cs b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/ManagedInstanceCrudScenarioTests.cs index 854ef86db6a9..8c4aeec28b94 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/ManagedInstanceCrudScenarioTests.cs +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/ManagedInstanceCrudScenarioTests.cs @@ -23,7 +23,7 @@ public void TestCreateUpdateGetDropManagedInstance() SqlManagementClient sqlClient = context.GetClient(); Random r = new Random(); - string managedInstanceName = "sqlcl-crudtestswithdnszone-dotnetsdk1"; + string managedInstanceName = "sqlcl-crudtestswithfmw-dotnetsdk1"; string login = "dummylogin"; string password = "Un53cuRE!"; Dictionary tags = new Dictionary() @@ -42,6 +42,8 @@ public void TestCreateUpdateGetDropManagedInstance() bool publicDataEndpointEnabled = true; string proxyOverride = ManagedInstanceProxyOverride.Proxy; string storageAccountType = "GRS"; + string publicResourceName = "MI_Sat_12AM_6AM"; + string maintenanceConfigurationId = "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/" + publicResourceName; //Create server var managedInstance1 = sqlClient.ManagedInstances.CreateOrUpdate(resourceGroup.Name, managedInstanceName, new ManagedInstance() @@ -52,12 +54,13 @@ public void TestCreateUpdateGetDropManagedInstance() SubnetId = subnetId, Tags = tags, Location = location, - StorageAccountType = storageAccountType + StorageAccountType = storageAccountType, + MaintenanceConfigurationId = maintenanceConfigurationId }); SqlManagementTestUtilities.ValidateManagedInstance(managedInstance1, managedInstanceName, login, tags, TestEnvironmentUtilities.DefaultLocationId, shouldCheckState: true); // Create second server - string managedInstanceName2 = "sqlcl-crudtestswithdnszone-dotnetsdk2"; + string managedInstanceName2 = "sqlcl-crudtestswithfmw-dotnetsdk2"; var managedInstance2 = sqlClient.ManagedInstances.CreateOrUpdate(resourceGroup.Name, managedInstanceName2, new ManagedInstance() { AdministratorLogin = login, @@ -69,7 +72,8 @@ public void TestCreateUpdateGetDropManagedInstance() DnsZonePartner = string.Format("/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/{0}/providers/Microsoft.Sql/managedInstances/{1}", resourceGroup.Name, managedInstanceName), PublicDataEndpointEnabled = publicDataEndpointEnabled, ProxyOverride = proxyOverride, - StorageAccountType = storageAccountType + StorageAccountType = storageAccountType, + MaintenanceConfigurationId = maintenanceConfigurationId }); SqlManagementTestUtilities.ValidateManagedInstance(managedInstance2, managedInstanceName2, login, tags, TestEnvironmentUtilities.DefaultLocationId, shouldCheckState: true); @@ -81,6 +85,10 @@ public void TestCreateUpdateGetDropManagedInstance() var getMI2 = sqlClient.ManagedInstances.Get(resourceGroup.Name, managedInstanceName2); SqlManagementTestUtilities.ValidateManagedInstance(getMI2, managedInstanceName2, login, tags, TestEnvironmentUtilities.DefaultLocationId, shouldCheckState: true); + // Verify that maintenanceConfigurationId value is correctly set + Assert.Equal(publicResourceName, getMI1.MaintenanceConfigurationId); + Assert.Equal(publicResourceName, getMI2.MaintenanceConfigurationId); + // Verify that storageAccountType value is correctly set Assert.Equal(storageAccountType, getMI1.StorageAccountType); Assert.Equal(storageAccountType, getMI2.StorageAccountType); @@ -106,12 +114,12 @@ public void TestCreateUpdateGetDropManagedInstance() SqlManagementTestUtilities.ValidateManagedInstance(updateMI1, managedInstanceName, login, newTags, TestEnvironmentUtilities.DefaultLocationId); // Drop server, update count - sqlClient.ManagedInstances.DeleteAsync(resourceGroup.Name, managedInstanceName).ConfigureAwait(true); + sqlClient.ManagedInstances.Delete(resourceGroup.Name, managedInstanceName); var listMI2 = sqlClient.ManagedInstances.ListByResourceGroup(resourceGroup.Name); - Assert.Equal(1, listMI2.Count()); + Assert.Single(listMI2); - sqlClient.ManagedInstances.DeleteAsync(resourceGroup.Name, managedInstanceName2).ConfigureAwait(true); + sqlClient.ManagedInstances.Delete(resourceGroup.Name, managedInstanceName2); var listMI3 = sqlClient.ManagedInstances.ListByResourceGroup(resourceGroup.Name); Assert.Empty(listMI3); } diff --git a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ManagedInstanceCrudScenarioTests/TestCreateUpdateGetDropManagedInstance.json b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ManagedInstanceCrudScenarioTests/TestCreateUpdateGetDropManagedInstance.json index 60d52dbdd940..345ba7931d0d 100644 --- a/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ManagedInstanceCrudScenarioTests/TestCreateUpdateGetDropManagedInstance.json +++ b/sdk/sqlmanagement/Microsoft.Azure.Management.SqlManagement/tests/SessionRecords/ManagedInstanceCrudScenarioTests/TestCreateUpdateGetDropManagedInstance.json @@ -1,13 +1,13 @@ { "Entries": [ { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourcegroups/sqlcrudtest-8054?api-version=2017-05-10", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQ/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourcegroups/sqlcrudtest-3613?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTM2MTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West Europe\",\r\n \"tags\": {\r\n \"sqlcrudtest-8054\": \"2020-08-19 12:00:14Z\"\r\n }\r\n}", + "RequestBody": "{\r\n \"location\": \"West Europe\",\r\n \"tags\": {\r\n \"sqlcrudtest-3613\": \"2020-10-20 12:14:51Z\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "56592dd2-11d8-4245-9f0e-e4df377c48f9" + "80e647ce-0205-4140-a908-be18b83ecd45" ], "accept-language": [ "en-US" @@ -15,7 +15,7 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", + "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" ], "Content-Type": [ @@ -30,7 +30,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:00:14 GMT" + "Tue, 20 Oct 2020 12:14:52 GMT" ], "Pragma": [ "no-cache" @@ -39,13 +39,13 @@ "1199" ], "x-ms-request-id": [ - "b6fc223d-41a8-4470-a979-7babc545ba1e" + "8b0044b7-a8b7-4ecd-a4ac-df38f23d3d0f" ], "x-ms-correlation-request-id": [ - "b6fc223d-41a8-4470-a979-7babc545ba1e" + "8b0044b7-a8b7-4ecd-a4ac-df38f23d3d0f" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120015Z:b6fc223d-41a8-4470-a979-7babc545ba1e" + "NORTHEUROPE:20201020T121452Z:8b0044b7-a8b7-4ecd-a4ac-df38f23d3d0f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -63,17 +63,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054\",\r\n \"name\": \"sqlcrudtest-8054\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"sqlcrudtest-8054\": \"2020-08-19 12:00:14Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613\",\r\n \"name\": \"sqlcrudtest-3613\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"sqlcrudtest-3613\": \"2020-10-20 12:14:51Z\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"MIGP8G4\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\"\r\n },\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"MIGP8G4\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\"\r\n },\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"maintenanceConfigurationId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/MI_Sat_12AM_6AM\",\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "9d6f791d-efd8-4a72-adc5-0395cd469445" + "7fa1d50e-0ab5-428e-a2d4-d8d2d92fcd36" ], "accept-language": [ "en-US" @@ -81,14 +81,14 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "507" + "677" ] }, "ResponseHeaders": { @@ -96,7 +96,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:00:26 GMT" + "Tue, 20 Oct 2020 12:15:03 GMT" ], "Pragma": [ "no-cache" @@ -108,16 +108,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "14623167-b65c-4c4a-b1c4-e95d34699138" + "b1fa1f22-5d52-412b-81a1-fe8b615b6552" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-correlation-request-id": [ - "91474389-96b9-4a4a-9247-c9ef7f768f30" + "9b375779-54d8-4af6-813c-e501e7fa2b57" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120027Z:91474389-96b9-4a4a-9247-c9ef7f768f30" + "NORTHEUROPE:20201020T121504Z:9b375779-54d8-4af6-813c-e501e7fa2b57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -126,7 +126,7 @@ "nosniff" ], "Content-Length": [ - "787" + "826" ], "Content-Type": [ "application/json; charset=utf-8" @@ -135,20 +135,20 @@ "-1" ] }, - "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -156,7 +156,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:01:27 GMT" + "Tue, 20 Oct 2020 12:16:04 GMT" ], "Pragma": [ "no-cache" @@ -165,16 +165,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "2cdff8e0-72c5-4312-b0c1-a6a216a538f7" + "20ea4314-f37f-48e1-8700-ad95315aed90" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" + "11999" ], "x-ms-correlation-request-id": [ - "10ef4039-9708-42ef-b98d-03db4314fd1a" + "ddc6e68c-078e-46cc-8bd3-47f51c61898d" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120128Z:10ef4039-9708-42ef-b98d-03db4314fd1a" + "NORTHEUROPE:20201020T121604Z:ddc6e68c-078e-46cc-8bd3-47f51c61898d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -183,7 +183,7 @@ "nosniff" ], "Content-Length": [ - "1015" + "1072" ], "Content-Type": [ "application/json; charset=utf-8" @@ -192,20 +192,20 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Creating\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Creating\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -213,7 +213,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:02:27 GMT" + "Tue, 20 Oct 2020 12:17:05 GMT" ], "Pragma": [ "no-cache" @@ -222,16 +222,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "4bc6a610-fd82-49e4-9857-f177dd5a2bed" + "f59a0029-c419-47ac-b81b-0d1f2f221d2e" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11969" + "11985" ], "x-ms-correlation-request-id": [ - "508c722d-2ec2-4667-a0ed-ebaf66ed8569" + "2d05013c-5f52-4955-8e47-2c9043f4a592" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120228Z:508c722d-2ec2-4667-a0ed-ebaf66ed8569" + "NORTHEUROPE:20201020T121705Z:2d05013c-5f52-4955-8e47-2c9043f4a592" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -240,7 +240,7 @@ "nosniff" ], "Content-Length": [ - "1013" + "1070" ], "Content-Type": [ "application/json; charset=utf-8" @@ -249,17 +249,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "a25a9620-cd6e-4186-87f6-d8f094709506" + "05249103-375d-4a6a-861f-48ca2e524fac" ], "accept-language": [ "en-US" @@ -267,8 +267,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -276,7 +276,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:04:41 GMT" + "Tue, 20 Oct 2020 12:19:16 GMT" ], "Pragma": [ "no-cache" @@ -285,16 +285,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "cc2a88ca-e19b-4987-9793-362ca84a9a89" + "f231463a-ba06-4b29-bb70-ade33898686d" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], "x-ms-correlation-request-id": [ - "cf06141d-ecab-48b0-b444-af42b5ff6dd4" + "6a1853f3-6dd8-42dc-ae30-0a946ab8673e" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120442Z:cf06141d-ecab-48b0-b444-af42b5ff6dd4" + "NORTHEUROPE:20201020T121917Z:6a1853f3-6dd8-42dc-ae30-0a946ab8673e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -303,7 +303,7 @@ "nosniff" ], "Content-Length": [ - "1013" + "1070" ], "Content-Type": [ "application/json; charset=utf-8" @@ -312,20 +312,20 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -333,7 +333,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:05:43 GMT" + "Tue, 20 Oct 2020 12:20:18 GMT" ], "Pragma": [ "no-cache" @@ -342,16 +342,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "e9de5d60-226d-46f2-9890-54a68e3dcd81" + "41c74d3d-4a1a-45db-80e1-d2f712d896ab" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" + "11999" ], "x-ms-correlation-request-id": [ - "c8c4a2a2-9100-443a-b41c-6a5a31b5f209" + "59130c1b-52cf-4e3f-b40b-2e8b7ff5fc63" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120543Z:c8c4a2a2-9100-443a-b41c-6a5a31b5f209" + "NORTHEUROPE:20201020T122018Z:59130c1b-52cf-4e3f-b40b-2e8b7ff5fc63" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -360,7 +360,7 @@ "nosniff" ], "Content-Length": [ - "1005" + "1062" ], "Content-Type": [ "application/json; charset=utf-8" @@ -369,17 +369,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"asdf\": \"zxcv\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"asdf\": \"zxcv\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsyP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazI/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"MIGP8G4\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\"\r\n },\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"dnsZonePartner\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"MIGP8G4\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\"\r\n },\r\n \"properties\": {\r\n \"administratorLogin\": \"dummylogin\",\r\n \"administratorLoginPassword\": \"Un53cuRE!\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"dnsZonePartner\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"maintenanceConfigurationId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/MI_Sat_12AM_6AM\",\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "6a5a50bb-ed23-45c1-8a86-a0943d5b6dfb" + "6472d890-b961-4f4a-a9ac-083a4c11ca5e" ], "accept-language": [ "en-US" @@ -387,14 +387,14 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "767" + "933" ] }, "ResponseHeaders": { @@ -402,7 +402,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:02:40 GMT" + "Tue, 20 Oct 2020 12:17:16 GMT" ], "Pragma": [ "no-cache" @@ -414,16 +414,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "19fc7721-f2dd-477a-b646-d176961a187e" + "479f1704-4f8c-4c72-b735-25cc600454c8" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-correlation-request-id": [ - "5dca665c-0a9f-47c5-844f-b3da2cc0922a" + "22498df3-569f-453b-ab71-415829677024" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120241Z:5dca665c-0a9f-47c5-844f-b3da2cc0922a" + "NORTHEUROPE:20201020T121716Z:22498df3-569f-453b-ab71-415829677024" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -432,7 +432,7 @@ "nosniff" ], "Content-Length": [ - "844" + "883" ], "Content-Type": [ "application/json; charset=utf-8" @@ -441,20 +441,20 @@ "-1" ] }, - "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsyP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazI/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -462,7 +462,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:03:40 GMT" + "Tue, 20 Oct 2020 12:18:16 GMT" ], "Pragma": [ "no-cache" @@ -471,16 +471,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "5df7a34b-3fbf-4572-bb27-3ad491ac9693" + "bd226590-366b-4f26-b6fe-425bb06590d3" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" + "11984" ], "x-ms-correlation-request-id": [ - "24b1bf92-c107-45b5-b68e-ed12c53adeb5" + "973e85c7-bd40-4702-a936-630301f67f4e" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120341Z:24b1bf92-c107-45b5-b68e-ed12c53adeb5" + "NORTHEUROPE:20201020T121816Z:973e85c7-bd40-4702-a936-630301f67f4e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -489,7 +489,7 @@ "nosniff" ], "Content-Length": [ - "1038" + "1095" ], "Content-Type": [ "application/json; charset=utf-8" @@ -498,20 +498,20 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Creating\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Creating\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsyP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazI/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -519,7 +519,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:04:41 GMT" + "Tue, 20 Oct 2020 12:19:16 GMT" ], "Pragma": [ "no-cache" @@ -528,16 +528,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "9f458843-cfeb-4f13-adb9-74a64de33407" + "5b4d7c35-1940-4b8a-8c72-f970feed3c7a" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], "x-ms-correlation-request-id": [ - "50b50263-0a04-40d8-8c80-34f6b7a371ba" + "edd7098c-37c6-4263-8603-50157bbaee66" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120441Z:50b50263-0a04-40d8-8c80-34f6b7a371ba" + "NORTHEUROPE:20201020T121916Z:edd7098c-37c6-4263-8603-50157bbaee66" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -546,7 +546,7 @@ "nosniff" ], "Content-Length": [ - "1036" + "1093" ], "Content-Type": [ "application/json; charset=utf-8" @@ -555,17 +555,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsyP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazI/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "37dbacd5-e1af-44f0-8c32-0f1fbefc8e8f" + "36f0f355-d463-4f86-b7f0-1ff94192b251" ], "accept-language": [ "en-US" @@ -573,8 +573,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -582,7 +582,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:04:41 GMT" + "Tue, 20 Oct 2020 12:19:16 GMT" ], "Pragma": [ "no-cache" @@ -591,16 +591,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "8bfa80f5-af83-4342-ad7d-f5b59f58590c" + "adbbd7fb-63b1-484f-b510-33fae436e714" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], "x-ms-correlation-request-id": [ - "19ecd257-ab8a-4a79-876e-d60b0218e1dd" + "2b7e34a6-20fa-4626-b3a3-9f6427630afa" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120442Z:19ecd257-ab8a-4a79-876e-d60b0218e1dd" + "NORTHEUROPE:20201020T121917Z:2b7e34a6-20fa-4626-b3a3-9f6427630afa" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -609,7 +609,7 @@ "nosniff" ], "Content-Length": [ - "1036" + "1093" ], "Content-Type": [ "application/json; charset=utf-8" @@ -618,17 +618,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcz9hcGktdmVyc2lvbj0yMDIwLTAyLTAyLXByZXZpZXc=", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcz9hcGktdmVyc2lvbj0yMDIwLTAyLTAyLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "58a64df7-2a79-4568-8c56-db0ecbd2c52e" + "40ea7677-f36d-448b-b0a3-939c0d1c39fe" ], "accept-language": [ "en-US" @@ -636,8 +636,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -645,7 +645,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:04:42 GMT" + "Tue, 20 Oct 2020 12:19:16 GMT" ], "Pragma": [ "no-cache" @@ -654,16 +654,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "86c6a5c1-58b8-4354-82a9-040f01d8b0fb" + "24df4659-a9e5-453f-9164-b36475117b72" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], "x-ms-correlation-request-id": [ - "e56721a0-2004-4d27-99cf-a6c103ec57ac" + "87602579-54aa-42c9-9298-537cbc4aa9e1" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120442Z:e56721a0-2004-4d27-99cf-a6c103ec57ac" + "NORTHEUROPE:20201020T121917Z:87602579-54aa-42c9-9298-537cbc4aa9e1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -672,7 +672,7 @@ "nosniff" ], "Content-Length": [ - "2062" + "2176" ], "Content-Type": [ "application/json; charset=utf-8" @@ -681,17 +681,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n },\r\n {\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk1.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": false,\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n },\r\n {\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcz9hcGktdmVyc2lvbj0yMDIwLTAyLTAyLXByZXZpZXc=", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcz9hcGktdmVyc2lvbj0yMDIwLTAyLTAyLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "384e5293-0179-44c1-b19f-83096ec1815d" + "c68513be-17b9-463d-ade2-aebdde807177" ], "accept-language": [ "en-US" @@ -699,8 +699,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -708,7 +708,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:05:43 GMT" + "Tue, 20 Oct 2020 12:20:19 GMT" ], "Pragma": [ "no-cache" @@ -717,16 +717,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "3b2d6ca3-e401-4d9b-8623-2974a5226e79" + "946bfbb5-7bd9-4228-86b9-1a4966df58e9" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" + "11998" ], "x-ms-correlation-request-id": [ - "9aa06055-831a-4e57-806f-7d89bea8abf0" + "1f23dc28-473e-49fa-9d78-d878093dc111" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120544Z:9aa06055-831a-4e57-806f-7d89bea8abf0" + "NORTHEUROPE:20201020T122020Z:1f23dc28-473e-49fa-9d78-d878093dc111" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -735,7 +735,7 @@ "nosniff" ], "Content-Length": [ - "1048" + "1105" ], "Content-Type": [ "application/json; charset=utf-8" @@ -744,17 +744,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithdnszone-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"GP_Gen5\",\r\n \"tier\": \"GeneralPurpose\",\r\n \"family\": \"Gen5\",\r\n \"capacity\": 8\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"fullyQualifiedDomainName\": \"sqlcl-crudtestswithfmw-dotnetsdk2.d8521ae822c5.database.windows.net\",\r\n \"administratorLogin\": \"dummylogin\",\r\n \"subnetId\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/v-urmila/providers/Microsoft.Network/virtualNetworks/MIVirtualNetwork/subnets/ManagedInsanceSubnet\",\r\n \"state\": \"Ready\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"vCores\": 8,\r\n \"storageSizeInGB\": 256,\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"dnsZone\": \"d8521ae822c5\",\r\n \"publicDataEndpointEnabled\": true,\r\n \"proxyOverride\": \"Proxy\",\r\n \"timezoneId\": \"UTC\",\r\n \"maintenanceConfigurationId\": \"MI_Sat_12AM_6AM\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\",\r\n \"zoneRedundant\": false\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"tagKey1\": \"TagValue1\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk2\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n }\r\n ]\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcz9hcGktdmVyc2lvbj0yMDIwLTAyLTAyLXByZXZpZXc=", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcz9hcGktdmVyc2lvbj0yMDIwLTAyLTAyLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "27f5101f-b7f8-49a7-b300-c392e89f00ce" + "ca4a9177-d26d-4bef-8745-74ab884bfb4c" ], "accept-language": [ "en-US" @@ -762,8 +762,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -771,25 +771,22 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:05:44 GMT" + "Tue, 20 Oct 2020 12:20:20 GMT" ], "Pragma": [ "no-cache" ], - "Server": [ - "Microsoft-HTTPAPI/2.0" + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" ], "x-ms-request-id": [ - "dc61226d-2173-4403-aaba-b07aeb24e647" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" + "f2a86134-432d-4bcf-aacd-e7d9561d5ec1" ], "x-ms-correlation-request-id": [ - "a7733bfb-c780-470b-b801-4b0d994f9f22" + "f2a86134-432d-4bcf-aacd-e7d9561d5ec1" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120544Z:a7733bfb-c780-470b-b801-4b0d994f9f22" + "NORTHEUROPE:20201020T122021Z:f2a86134-432d-4bcf-aacd-e7d9561d5ec1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -811,13 +808,13 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "PATCH", "RequestBody": "{\r\n \"properties\": {\r\n \"licenseType\": \"LicenseIncluded\"\r\n },\r\n \"tags\": {\r\n \"asdf\": \"zxcv\"\r\n }\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "9be28c4f-8766-4c52-b7f7-6df3a50d3247" + "6641aa04-b5b2-41dd-851d-2640bed23a3e" ], "accept-language": [ "en-US" @@ -825,8 +822,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ], "Content-Type": [ "application/json; charset=utf-8" @@ -840,7 +837,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:04:42 GMT" + "Tue, 20 Oct 2020 12:19:17 GMT" ], "Pragma": [ "no-cache" @@ -852,16 +849,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "0609d11f-8226-4767-a6fa-6fba8b0daa75" + "c1b3a3a6-1d1c-4290-8007-96d475d34ca3" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], "x-ms-correlation-request-id": [ - "af9bdee8-681a-479a-b7a5-3269067abd92" + "cdb1c319-5230-4b15-aaa5-6aabd2a31647" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120443Z:af9bdee8-681a-479a-b7a5-3269067abd92" + "NORTHEUROPE:20201020T121918Z:cdb1c319-5230-4b15-aaa5-6aabd2a31647" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -870,7 +867,7 @@ "nosniff" ], "Content-Length": [ - "581" + "573" ], "Content-Type": [ "application/json; charset=utf-8" @@ -879,17 +876,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"asdf\": \"zxcv\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithdnszone-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", + "ResponseBody": "{\r\n \"identity\": {\r\n \"principalId\": \"00000000-0000-0000-0000-000000000000\",\r\n \"type\": \"None\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n },\r\n \"sku\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"licenseType\": \"LicenseIncluded\",\r\n \"privateEndpointConnections\": [],\r\n \"storageAccountType\": \"GRS\"\r\n },\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"asdf\": \"zxcv\"\r\n },\r\n \"id\": \"/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"name\": \"sqlcl-crudtestswithfmw-dotnetsdk1\",\r\n \"type\": \"Microsoft.Sql/managedInstances\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourcegroups/sqlcrudtest-8054?api-version=2017-05-10", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQ/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk1?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazE/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "361173e8-335e-4b42-982d-1a9ab6e91de6" + "85dd5fba-dcdb-4a89-88c8-a51cb1b9547e" ], "accept-language": [ "en-US" @@ -897,8 +894,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -906,28 +903,28 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:05:44 GMT" + "Tue, 20 Oct 2020 12:20:19 GMT" ], "Pragma": [ "no-cache" ], - "Location": [ - "https://management.azure.com/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDgwNTQtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2017-05-10" - ], "Retry-After": [ - "15" + "60" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" + "Server": [ + "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "410a3a68-e040-4446-9054-3bb912619a2e" + "cc52da5a-3670-4092-9739-9d76159723db" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" ], "x-ms-correlation-request-id": [ - "410a3a68-e040-4446-9054-3bb912619a2e" + "3ba8d483-5420-4e13-863f-23aea2705ae1" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120545Z:410a3a68-e040-4446-9054-3bb912619a2e" + "NORTHEUROPE:20201020T122020Z:3ba8d483-5420-4e13-863f-23aea2705ae1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -935,24 +932,21 @@ "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" - ], "Expires": [ "-1" ] }, "ResponseBody": "", - "StatusCode": 202 + "StatusCode": 204 }, { - "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-8054/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithdnszone-dotnetsdk1?api-version=2020-02-02-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTgwNTQvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZG5zem9uZS1kb3RuZXRzZGsxP2FwaS12ZXJzaW9uPTIwMjAtMDItMDItcHJldmlldw==", + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/sqlcrudtest-3613/providers/Microsoft.Sql/managedInstances/sqlcl-crudtestswithfmw-dotnetsdk2?api-version=2020-02-02-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlR3JvdXBzL3NxbGNydWR0ZXN0LTM2MTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvbWFuYWdlZEluc3RhbmNlcy9zcWxjbC1jcnVkdGVzdHN3aXRoZm13LWRvdG5ldHNkazI/YXBpLXZlcnNpb249MjAyMC0wMi0wMi1wcmV2aWV3", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "2b6bf146-fcb0-4716-8f7d-26daca46cffb" + "02e8a1b2-29d4-4a1f-9f66-b3ed6e143df6" ], "accept-language": [ "en-US" @@ -960,8 +954,8 @@ "User-Agent": [ "FxVersion/4.6.26614.01", "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.14393.", - "Microsoft.Azure.Management.Sql.SqlManagementClient/1.45.0.0" + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Sql.SqlManagementClient/1.44.2.0" ] }, "ResponseHeaders": { @@ -969,7 +963,7 @@ "no-cache" ], "Date": [ - "Wed, 19 Aug 2020 12:05:44 GMT" + "Tue, 20 Oct 2020 12:20:20 GMT" ], "Pragma": [ "no-cache" @@ -981,16 +975,16 @@ "Microsoft-HTTPAPI/2.0" ], "x-ms-request-id": [ - "6c8df210-e55b-4b19-a787-b0f1764e6426" + "421da74e-8c7e-4286-80f6-2eafe6d7c1fb" ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" + "14998" ], "x-ms-correlation-request-id": [ - "b4f35bc2-acdb-4a97-8e30-037171b77fdc" + "1cd8e071-f072-47af-abbb-3f13c96fab82" ], "x-ms-routing-request-id": [ - "UKSOUTH:20200819T120545Z:b4f35bc2-acdb-4a97-8e30-037171b77fdc" + "NORTHEUROPE:20201020T122021Z:1cd8e071-f072-47af-abbb-3f13c96fab82" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1004,11 +998,74 @@ }, "ResponseBody": "", "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourcegroups/sqlcrudtest-3613?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYThjOWE5MjQtMDZjMC00YmRlLTk3ODgtZTdiMTM3MDk2OWUxL3Jlc291cmNlZ3JvdXBzL3NxbGNydWR0ZXN0LTM2MTM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ef8ecb56-3d99-47e1-8c26-5a3951732385" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 20 Oct 2020 12:20:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TUUxDUlVEVEVTVDoyRDM2MTMtV0VTVEVVUk9QRSIsImpvYkxvY2F0aW9uIjoid2VzdGV1cm9wZSJ9?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "f9579be1-ecf2-477b-bee7-fdaa52dc0990" + ], + "x-ms-correlation-request-id": [ + "f9579be1-ecf2-477b-bee7-fdaa52dc0990" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20201020T122022Z:f9579be1-ecf2-477b-bee7-fdaa52dc0990" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 202 } ], "Names": { "CreateResourceGroup": [ - "sqlcrudtest-8054" + "sqlcrudtest-3613" ] }, "Variables": { From cde62f6e5a4716785ec90f397e74a9e788b3e9fc Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 23 Oct 2020 17:41:11 -0700 Subject: [PATCH 22/28] Update Delete-RemoteBranches.ps1 (#16242) Co-authored-by: Chidozie Ononiwu --- eng/common/scripts/Delete-RemoteBranches.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/common/scripts/Delete-RemoteBranches.ps1 b/eng/common/scripts/Delete-RemoteBranches.ps1 index 0ca7c55be932..77cf7e506461 100644 --- a/eng/common/scripts/Delete-RemoteBranches.ps1 +++ b/eng/common/scripts/Delete-RemoteBranches.ps1 @@ -9,7 +9,7 @@ param( LogDebug "Operating on Repo [ $RepoName ]" try{ - $branches = (Get-GitHubSourceReferences -RepoOwner $RepoOwner -RepoName $RepoName -Ref "heads/$BranchPrefix").ref + $branches = (Get-GitHubSourceReferences -RepoOwner $RepoOwner -RepoName $RepoName -Ref "heads/$BranchPrefix" -AuthToken $AuthToken).ref } catch { LogError "Get-GitHubSourceReferences failed with exception:`n$_" @@ -22,7 +22,7 @@ foreach ($branch in $branches) $branchName = $branch.Replace("refs/heads/","") $head = "${RepoOwner}/${RepoName}:${branchName}" LogDebug "Operating on branch [ $branchName ]" - $pullRequests = Get-GitHubPullRequests -RepoOwner $RepoOwner -RepoName $RepoName -head $head + $pullRequests = Get-GitHubPullRequests -RepoOwner $RepoOwner -RepoName $RepoName -State "all" -Head $head -AuthToken $AuthToken } catch { @@ -30,9 +30,9 @@ foreach ($branch in $branches) exit 1 } - if ($pullRequests.Count -eq 0) + if ($pullRequests -and (($pullRequests | ? { $_.State -eq "open" }).Count -eq 0)) { - LogDebug "Branch [ $branchName ] in repo [ $RepoName ] has no associated Pull Request. Deleting Branch" + LogDebug "Branch [ $branchName ] in repo [ $RepoName ] has no associated open Pull Request. Deleting Branch" try{ Remove-GitHubSourceReferences -RepoOwner $RepoOwner -RepoName $RepoName -Ref ($branch.Remove(0,5)) -AuthToken $AuthToken } From 49787679d51ba0e45b4bc42220bbd43009346b58 Mon Sep 17 00:00:00 2001 From: Vijaya Gopal Yarramneni Date: Fri, 23 Oct 2020 17:46:22 -0700 Subject: [PATCH 23/28] Amqp connection idle timeout2 (#16235) * Adding ConnectionIldeTimeout property on servicebusconnection to detection socket errors sooner. * Fixing a typo. * Chaning accepted API spec. --- .../src/ServiceBusConnection.cs | 17 ++++++++++ .../src/ServiceBusConnectionStringBuilder.cs | 33 +++++++++++++++++++ ...rovals.ApproveAzureServiceBus.approved.txt | 2 ++ .../ServiceBusConnectionStringBuilderTests.cs | 17 ++++++++++ 4 files changed, 69 insertions(+) diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnection.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnection.cs index 4d4454e1c78b..d1fce5390aff 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnection.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnection.cs @@ -132,6 +132,16 @@ internal ServiceBusConnection(RetryPolicy retryPolicy = null) /// Defaults to 1 minute. public TimeSpan OperationTimeout { get; set; } + /// + /// ConnectionIdleTimeout is applied when a connection recevies no traffic for a certain period of time. + /// In some situations, underlying transport layer takes really long time to detect a socket error and it may + /// cause some operations to time out after a long wait. This timeout helps to detect and close an idle connection + /// without waiting for the network layer to identify a socket error. But this setting may result in some increased + /// heartbeat traffic between the client and service. + /// + /// Defaults to null + public TimeSpan? ConnectionIdleTimeout { get; set; } + /// /// Retry policy for operations performed on the connection. /// @@ -225,6 +235,7 @@ void InitializeConnection(ServiceBusConnectionStringBuilder builder) this.OperationTimeout = builder.OperationTimeout; this.TransportType = builder.TransportType; + this.ConnectionIdleTimeout = builder.ConnectionIdleTimeout; this.ConnectionManager = new FaultTolerantAmqpObject(this.CreateConnectionAsync, CloseConnection); this.TransactionController = new FaultTolerantAmqpObject(this.CreateControllerAsync, CloseController); } @@ -257,6 +268,12 @@ async Task CreateConnectionAsync(TimeSpan timeout) var containerId = Guid.NewGuid().ToString(); var amqpConnectionSettings = AmqpConnectionHelper.CreateAmqpConnectionSettings(AmqpConstants.DefaultMaxFrameSize, containerId, hostName); + if (this.ConnectionIdleTimeout.HasValue && this.ConnectionIdleTimeout.Value > TimeSpan.Zero) + { + uint timeOutInMillis = checked((uint)this.ConnectionIdleTimeout.Value.TotalMilliseconds); + amqpConnectionSettings.IdleTimeOut = timeOutInMillis; + } + var connection = new AmqpConnection(transport, amqpSettings, amqpConnectionSettings); await connection.OpenAsync(timeoutHelper.RemainingTime()).ConfigureAwait(false); diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnectionStringBuilder.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnectionStringBuilder.cs index 6583f278e086..f556cd7e333d 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnectionStringBuilder.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/src/ServiceBusConnectionStringBuilder.cs @@ -27,6 +27,7 @@ public class ServiceBusConnectionStringBuilder const string TransportTypeConfigName = "TransportType"; const string OperationTimeoutConfigName = "OperationTimeout"; + const string ConnectionIdleTimeoutConfigName = "ConnectionIdleTimeout"; string entityPath, sasKeyName, sasKey, sasToken, endpoint; AuthenticationType authType = AuthenticationType.Other; @@ -243,6 +244,13 @@ public string SasToken /// Defaults to 1 minute. public TimeSpan OperationTimeout { get; set; } = Constants.DefaultOperationTimeout; + /// + /// Maximum duration after which an idle connection is closed.A connection is considered + /// idle if it receives no traffic. + /// + /// Defaults to null. + public TimeSpan? ConnectionIdleTimeout { get; set; } + /// /// Enables Azure Active Directory Managed Identity authentication when set to ServiceBusConnectionStringBuilder.AuthenticationType.ManagedIdentity /// @@ -310,6 +318,11 @@ public string GetNamespaceConnectionString() connectionStringBuilder.Append(AuthenticationConfigName).Append(KeyValueSeparator).Append("Managed Identity").Append(KeyValuePairDelimiter); } + if (this.ConnectionIdleTimeout.HasValue) + { + connectionStringBuilder.Append(ConnectionIdleTimeoutConfigName).Append(KeyValueSeparator).Append(this.ConnectionIdleTimeout.Value).Append(KeyValuePairDelimiter); + } + return connectionStringBuilder.ToString().Trim(';'); } @@ -416,6 +429,26 @@ void ParseConnectionString(string connectionString) this.authType = AuthenticationType.Other; } } + else if (key.Equals(ConnectionIdleTimeoutConfigName, StringComparison.OrdinalIgnoreCase)) + { + if (int.TryParse(value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out var timeoutInSeconds)) + { + this.ConnectionIdleTimeout = TimeSpan.FromSeconds(timeoutInSeconds); + } + else if (TimeSpan.TryParse(value, NumberFormatInfo.InvariantInfo, out var connectionIdleTimeout)) + { + this.ConnectionIdleTimeout = connectionIdleTimeout; + } + else + { + throw Fx.Exception.Argument(nameof(connectionString), $"The {ConnectionIdleTimeoutConfigName} ({value}) format is invalid. It must be an integer representing a number of seconds or a timespan."); + } + + if (this.ConnectionIdleTimeout.Value.TotalMilliseconds <= 0) + { + throw Fx.Exception.Argument(nameof(connectionString), $"The {ConnectionIdleTimeoutConfigName} ({value}) must be greater than zero."); + } + } else { ConnectionStringProperties[key] = value; diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/API/ApiApprovals.ApproveAzureServiceBus.approved.txt b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/API/ApiApprovals.ApproveAzureServiceBus.approved.txt index f0e3b2ae9e7c..f449e7df94cf 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/API/ApiApprovals.ApproveAzureServiceBus.approved.txt +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/API/ApiApprovals.ApproveAzureServiceBus.approved.txt @@ -320,6 +320,7 @@ namespace Microsoft.Azure.ServiceBus "String, RetryPolicy retryPolicy) constructor instead, providing operationTimeout" + " in the connection string.")] public ServiceBusConnection(string namespaceConnectionString, System.TimeSpan operationTimeout, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = null) { } + public System.TimeSpan? ConnectionIdleTimeout { get; set; } public System.Uri Endpoint { get; set; } public bool IsClosedOrClosing { get; } public System.TimeSpan OperationTimeout { get; set; } @@ -337,6 +338,7 @@ namespace Microsoft.Azure.ServiceBus public ServiceBusConnectionStringBuilder(string endpoint, string entityPath, string sharedAccessSignature, Microsoft.Azure.ServiceBus.TransportType transportType) { } public ServiceBusConnectionStringBuilder(string endpoint, string entityPath, string sharedAccessKeyName, string sharedAccessKey, Microsoft.Azure.ServiceBus.TransportType transportType) { } public Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder.AuthenticationType Authentication { get; set; } + public System.TimeSpan? ConnectionIdleTimeout { get; set; } public string Endpoint { get; set; } public string EntityPath { get; set; } public System.TimeSpan OperationTimeout { get; set; } diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/ServiceBusConnectionStringBuilderTests.cs b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/ServiceBusConnectionStringBuilderTests.cs index 4d0eaf130d79..100699306efe 100644 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/ServiceBusConnectionStringBuilderTests.cs +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/tests/ServiceBusConnectionStringBuilderTests.cs @@ -83,6 +83,9 @@ public void ConnectionStringBuilderShouldTrimTrailingSemicolon() csBuilder.OperationTimeout = TimeSpan.FromSeconds(42); Assert.Equal("Endpoint=amqps://contoso.servicebus.windows.net;TransportType=AmqpWebSockets;OperationTimeout=00:00:42", csBuilder.ToString()); + + csBuilder.ConnectionIdleTimeout = TimeSpan.FromSeconds(42); + Assert.Equal("Endpoint=amqps://contoso.servicebus.windows.net;TransportType=AmqpWebSockets;OperationTimeout=00:00:42;ConnectionIdleTimeout=00:00:42", csBuilder.ToString()); } [Fact] @@ -148,6 +151,20 @@ public void ConnectionStringBuilderShouldParseOperationTimeoutAsTimeSpan() Assert.Equal(TimeSpan.FromMinutes(12).Add(TimeSpan.FromSeconds(34)), csBuilder.OperationTimeout); } + [Fact] + public void ConnectionStringBuilderShouldParseConnectionIdleTimeoutAsInteger() + { + var csBuilder = new ServiceBusConnectionStringBuilder("Endpoint=sb://contoso.servicebus.windows.net;SharedAccessKeyName=keyname;SharedAccessKey=key;ConnectionIdleTimeout=30"); + Assert.Equal(TimeSpan.FromSeconds(30), csBuilder.ConnectionIdleTimeout.Value); + } + + [Fact] + public void ConnectionStringBuilderShouldParseConnectionIdleTimeoutAsTimeSpan() + { + var csBuilder = new ServiceBusConnectionStringBuilder("Endpoint=sb://contoso.servicebus.windows.net;SharedAccessKeyName=keyname;SharedAccessKey=key;ConnectionIdleTimeout=00:12:34"); + Assert.Equal(TimeSpan.FromMinutes(12).Add(TimeSpan.FromSeconds(34)), csBuilder.ConnectionIdleTimeout.Value); + } + [Fact] public void ConnectionStringBuilderOperationTimeoutShouldDefaultToOneMinute() { From 5fedc94bca9fb9d1a941eda7a8af1eceebb5809a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 23 Oct 2020 17:48:01 -0700 Subject: [PATCH 24/28] Sync eng/common directory with azure-sdk-tools for PR 1135 (#16241) * Add check of http link. * Fixed the tool http link Co-authored-by: Sima Zhu --- eng/common/TestResources/New-TestResources.ps1.md | 2 +- eng/common/TestResources/Remove-TestResources.ps1.md | 2 +- eng/common/scripts/Verify-Links.ps1 | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1.md b/eng/common/TestResources/New-TestResources.ps1.md index 6fc15eefdb49..c41693c87666 100644 --- a/eng/common/TestResources/New-TestResources.ps1.md +++ b/eng/common/TestResources/New-TestResources.ps1.md @@ -449,7 +449,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/eng/common/TestResources/Remove-TestResources.ps1.md b/eng/common/TestResources/Remove-TestResources.ps1.md index 691306f8397e..f0bcb0bdebe6 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1.md +++ b/eng/common/TestResources/Remove-TestResources.ps1.md @@ -263,7 +263,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 9376564e3472..c9991a058894 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -200,6 +200,10 @@ function CheckLink ([System.Uri]$linkUri) } if ($checkLinkGuidance) { + if ($linkUri.Scheme -eq 'http') { + LogWarning "DO NOT use 'http' in $linkUri. Please use secure link with https instead. Check here for more information: https://aka.ms/azsdk/guideline/links" + $linkValid = $false + } $link = $linkUri.ToString() # Check if the url is relative links, suppress the archor link validation. if (!$linkUri.IsAbsoluteUri -and !$link.StartsWith("#")) { From d94de0a35ce052c8ac2f45d509068f54c6e35f0a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 23 Oct 2020 19:27:14 -0700 Subject: [PATCH 25/28] Update eng/common workflow docs (#16244) Co-authored-by: Chidozie Ononiwu --- eng/common/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/common/README.md b/eng/common/README.md index e63b74367b74..7bda6ec94208 100644 --- a/eng/common/README.md +++ b/eng/common/README.md @@ -20,7 +20,6 @@ The 'Sync eng/common directory' PRs will be created in the language repositories 3. The `azure-sdk-tools - sync - eng-common` pipeline queues test runs for template pipelines in various languages. These help you test your changes in the **Tools PR**. 4. If there are changes in the **Tools PR** that will affect the release stage you should approve the release test pipelines by clicking the approval gate. The test (template) pipeline will automatically release the next eligible version without needing manual intervention for the versioning. Please approve your test releases as quickly as possible. A race condition may occur due to someone else queueing the pipeline and going all the way to release using your version while yours is still waiting. If this occurs manually rerun the pipeline that failed. 5. If you make additional changes to your **Tools PR** repeat steps 1 - 4 until you have completed the necessary testing of your changes. This includes full releases of the template package, if necessary. -6. Sign off on CreateSyncPRs stage of the sync pipeline using the approval gate. This stage will create the **Sync PRs** in the various language repos with the `auto-merge` label applied. A link to each of the **Sync PRs** will show up in the **Tools PR** for you to click and review. -7. Go review and approve each of your **Sync PRs**. The merging will happen automatically. -8. Sign off on VerifyAndMerge stage of the sync pipeline using the approval gate. This stage will merge any remaining open **Sync PRs** and also append `auto-merge` to the **Tools PR** so it will automatically merge once the pipeline finishes. -7. Sign Off on the VerifyAndMerge stage. This will merge any remaining open **Sync PR** and also append `auto-merge` to the **Tools PR**. +6. Sign off on CreateSyncPRs stage of the sync pipeline using the approval gate. This stage will create the **Sync PRs** in the various language repos. A link to each of the **Sync PRs** will show up in the **Tools PR** for you to click and review. +7. Go review and approve each of your **Sync PRs**. +8. Sign Off on the VerifyAndMerge stage. This will merge any remaining open **Sync PR** and also append `auto-merge` to the **Tools PR**. From c48a172fd343964d35dddf04fd633204a5eb71aa Mon Sep 17 00:00:00 2001 From: Rajkumar Rangaraj Date: Sat, 24 Oct 2020 20:00:56 -0700 Subject: [PATCH 26/28] Azure Monitor Exporter - Update to Otel0.7 (#16246) * Update to otel0.7 * Update API * Update return type in API --- eng/Packages.Data.props | 8 ++++---- ...Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs | 4 ++-- .../src/AzureMonitorExporterHelperExtensions.cs | 4 +++- .../src/AzureMonitorTraceExporter.cs | 2 +- .../TestFramework/OpenTelemetryWebApplicationFactory.cs | 6 ++++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 596861923dcd..2a930c1ca559 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -88,10 +88,10 @@ - - - - + + + + diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs index 548a335eef07..c1ef40071b0d 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs @@ -11,10 +11,10 @@ public AzureMonitorExporterOptions() { } public long MaxTransmissionStorageCapacity { get { throw null; } set { } } public string StorageFolder { get { throw null; } set { } } } - public partial class AzureMonitorTraceExporter : OpenTelemetry.Trace.ActivityExporter + public partial class AzureMonitorTraceExporter : OpenTelemetry.BaseExporter { public AzureMonitorTraceExporter(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions options) { } - public override OpenTelemetry.Trace.ExportResult Export(in OpenTelemetry.Batch batch) { throw null; } + public override OpenTelemetry.ExportResult Export(in OpenTelemetry.Batch batch) { throw null; } } } namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs index c45bac4b6bd8..c0150305e2ff 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using OpenTelemetry; using OpenTelemetry.Trace; using System; +using System.Diagnostics; namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { @@ -28,7 +30,7 @@ public static TracerProviderBuilder AddAzureMonitorTraceExporter(this TracerProv configure?.Invoke(options); // TODO: Pick Simple vs Batching based on AzureMonitorExporterOptions - return builder.AddProcessor(new BatchExportActivityProcessor(new AzureMonitorTraceExporter(options))); + return builder.AddProcessor(new BatchExportProcessor(new AzureMonitorTraceExporter(options))); } } } diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs index 95d1eda8a3c4..e50341952cee 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs @@ -12,7 +12,7 @@ namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { - public class AzureMonitorTraceExporter : ActivityExporter + public class AzureMonitorTraceExporter : BaseExporter { private readonly ITransmitter Transmitter; private readonly AzureMonitorExporterOptions options; diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs index f23bbd0064d0..9d22ddf7e5eb 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs @@ -9,6 +9,8 @@ using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; using OpenTelemetry.Trace; +using OpenTelemetry; +using System.Diagnostics; namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.TestFramework { @@ -24,11 +26,11 @@ public class OpenTelemetryWebApplicationFactory : WebApplicationFactor private const string EmptyConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000"; private readonly MockTransmitter Transmitter = new MockTransmitter(); - private ActivityProcessor ActivityProcessor; + private BaseProcessor ActivityProcessor; protected override void ConfigureWebHost(IWebHostBuilder builder) { - this.ActivityProcessor = new BatchExportActivityProcessor(new AzureMonitorTraceExporter( + this.ActivityProcessor = new BatchExportProcessor(new AzureMonitorTraceExporter( options: new AzureMonitorExporterOptions { ConnectionString = EmptyConnectionString, From aec8457a481615f2ff344e74857f6033f8310e41 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Fri, 23 Oct 2020 15:05:49 -0700 Subject: [PATCH 27/28] Fixed the http links --- README.md | 2 +- sdk/eventhub/Microsoft.Azure.EventHubs/README.md | 4 ++-- sdk/keyvault/Microsoft.Azure.KeyVault/README.md | 4 ++-- sdk/mgmtcommon/ClientRuntime.Log4Net/README.md | 2 +- sdk/servicebus/Microsoft.Azure.ServiceBus/README.md | 4 ++-- sdk/storage/Azure.Storage.Common/swagger/Generator/readme.md | 2 +- sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md | 2 +- sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md | 2 +- sdk/synapse/Azure.Analytics.Synapse.Spark/README.md | 2 +- sdk/synapse/Microsoft.Azure.Synapse/README.md | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f8d0e2519d3e..cbd503fd8bd6 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Documentation and code samples for these libraries can be found [here](https://a ## Need help? -* For reference documentation visit the [Azure SDK for .NET API Reference](http://aka.ms/net-docs). +* For reference documentation visit the [Azure SDK for .NET API Reference](https://aka.ms/net-docs). * For tutorials, samples, quick starts, and other documentation, go to [Azure for .NET Developers](https://docs.microsoft.com/dotnet/azure/). * File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-net/issues/new/choose). * Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on StackOverflow using `azure` and `.net` tags. diff --git a/sdk/eventhub/Microsoft.Azure.EventHubs/README.md b/sdk/eventhub/Microsoft.Azure.EventHubs/README.md index 1417123a9d90..fcbebb4cee17 100755 --- a/sdk/eventhub/Microsoft.Azure.EventHubs/README.md +++ b/sdk/eventhub/Microsoft.Azure.EventHubs/README.md @@ -13,7 +13,7 @@ computation and filtering. Processing may also involve distribution or storage o Event Hub consumers are often robust and high-scale platform infrastructure parts with built-in analytics capabilities, like Azure Stream Analytics, Apache Spark, or Apache Storm. -This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). Use the client library for Event Hubs to: @@ -102,7 +102,7 @@ For additional insight and context, the development, release, and issue history ## Versioning information -The Azure Event Hubs client library uses [the semantic versioning scheme.](http://semver.org/) +The Azure Event Hubs client library uses [the semantic versioning scheme.](https://semver.org/) ## Target frameworks diff --git a/sdk/keyvault/Microsoft.Azure.KeyVault/README.md b/sdk/keyvault/Microsoft.Azure.KeyVault/README.md index 47b5b561c26d..7ea3bdd194b5 100644 --- a/sdk/keyvault/Microsoft.Azure.KeyVault/README.md +++ b/sdk/keyvault/Microsoft.Azure.KeyVault/README.md @@ -17,7 +17,7 @@ It is **recommended** that you move to one or more of the new packages. The Microsoft Azure Key Vault SDK for .NET allows you to build secure Azure applications that can access secrets, keys, and certificates that a encrypted at rest with hardware security modules. This directory contains the open source subset of the .NET SDK. For documentation of the -complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). ## Features @@ -60,7 +60,7 @@ For the best development experience, developers should use the official Microsof ## Versioning Information -- The Key Vault SDK uses [the semantic versioning scheme.](http://semver.org/) +- The Key Vault SDK uses [the semantic versioning scheme.](https://semver.org/) ## Target Frameworks diff --git a/sdk/mgmtcommon/ClientRuntime.Log4Net/README.md b/sdk/mgmtcommon/ClientRuntime.Log4Net/README.md index e78562bbc680..73f5c38ceb30 100644 --- a/sdk/mgmtcommon/ClientRuntime.Log4Net/README.md +++ b/sdk/mgmtcommon/ClientRuntime.Log4Net/README.md @@ -1,7 +1,7 @@ Using Log4Net for AutoRest Generated Clients: --------------------------------------------- 1- Configure the log4net in your app.config/web.config (or your preferred way). - For more examples on the available configurations check [config examples](http://logging.apache.org/log4net/release/config-examples.html) + For more examples on the available configurations check [config examples](https://logging.apache.org/log4net/release/config-examples.html) Here's an example of app.config for the logger used with ConsoleAppender: diff --git a/sdk/servicebus/Microsoft.Azure.ServiceBus/README.md b/sdk/servicebus/Microsoft.Azure.ServiceBus/README.md index de59e7a20298..41623766382a 100755 --- a/sdk/servicebus/Microsoft.Azure.ServiceBus/README.md +++ b/sdk/servicebus/Microsoft.Azure.ServiceBus/README.md @@ -2,7 +2,7 @@ Azure Service Bus allows you to build applications that take advantage of asynchronous messaging patterns using a highly-reliable service to broker messages between producers and consumers. Azure Service Bus provides flexible, brokered messaging between client and server, along with structured first-in, first-out (FIFO) messaging, and publish/subscribe capabilities with complex routing. -This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). Use the client library for Azure Service Bus to: @@ -62,7 +62,7 @@ For additional insight and context, the development, release, and issue history ## Versioning information -The Azure Service Bus client library uses [the semantic versioning scheme](http://semver.org/). +The Azure Service Bus client library uses [the semantic versioning scheme](https://semver.org/). ## Target frameworks diff --git a/sdk/storage/Azure.Storage.Common/swagger/Generator/readme.md b/sdk/storage/Azure.Storage.Common/swagger/Generator/readme.md index a89302eab41a..133f55721254 100644 --- a/sdk/storage/Azure.Storage.Common/swagger/Generator/readme.md +++ b/sdk/storage/Azure.Storage.Common/swagger/Generator/readme.md @@ -20,7 +20,7 @@ We support a number of extensions including using the vendor prefix `x-az-`: ### AutoRest plugin configuration The AutoRest example at https://github.com/Azure/autorest-extension-helloworld walks through the following section and the docs at -http://azure.github.io/autorest/user/literate-file-formats/configuration.html +https://azure.github.io/autorest/user/literate-file-formats/configuration.html and https://github.com/Azure/autorest/tree/master/docs are the closest I could find to official explanations. diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md index 60909561975d..2d2944476474 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md @@ -1,6 +1,6 @@ # Azure Synapse Analytics Access Control client library for .NET -This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). The Azure Synapse Analytics access control client library enables programmatically managing role assignments. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md index a367d14295f0..92984b3dab05 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md @@ -1,6 +1,6 @@ # Azure Synapse Analytics Artifacts client library for .NET -This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). The Azure Synapse Analytics development client library enables programmatically managing artifacts, offering methods to create, update, list, and delete pipelines, datasets, data flows, notebooks, Spark job definitions, SQL scripts, linked services and triggers. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md b/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md index b825d4c457ee..823d987ba021 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md @@ -1,6 +1,6 @@ # Azure Synapse Spark client library for .NET -This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). Use the client library for Synapse to: diff --git a/sdk/synapse/Microsoft.Azure.Synapse/README.md b/sdk/synapse/Microsoft.Azure.Synapse/README.md index 21da67d78940..f262e052e040 100644 --- a/sdk/synapse/Microsoft.Azure.Synapse/README.md +++ b/sdk/synapse/Microsoft.Azure.Synapse/README.md @@ -2,7 +2,7 @@ Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. -This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/develop/net/). +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](https://azure.microsoft.com/develop/net/). Use the client library for Synapse to: From 89b94c6e3c28c4f9837e63d2874024b2c6ddf84a Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 26 Oct 2020 08:28:20 +0000 Subject: [PATCH 28/28] Generated from 1f91f50eff5790375e54f20ff15fbb3d3640be73 --- .../src/Generated/ComputeManagementClient.cs | 24 + .../src/Generated/GalleriesOperations.cs | 23 +- .../GalleriesOperationsExtensions.cs | 16 +- .../GalleryApplicationVersionsOperations.cs | 10 +- .../GalleryApplicationsOperations.cs | 10 +- .../GalleryImageVersionsOperations.cs | 64 +- ...alleryImageVersionsOperationsExtensions.cs | 108 +-- .../src/Generated/GalleryImagesOperations.cs | 38 +- .../GalleryImagesOperationsExtensions.cs | 56 +- .../GallerySharingProfileOperations.cs | 309 +++++++++ ...llerySharingProfileOperationsExtensions.cs | 117 ++++ .../src/Generated/IComputeManagementClient.cs | 20 + .../src/Generated/IGalleriesOperations.cs | 6 +- .../IGalleryImageVersionsOperations.cs | 54 +- .../src/Generated/IGalleryImagesOperations.cs | 28 +- .../IGallerySharingProfileOperations.cs | 83 +++ .../Generated/ISharedGalleriesOperations.cs | 100 +++ .../ISharedGalleryImageVersionsOperations.cs | 118 ++++ .../ISharedGalleryImagesOperations.cs | 107 +++ .../Generated/IVirtualMachinesOperations.cs | 10 +- .../src/Generated/Models/Gallery.cs | 8 +- ...leryApplicationVersionPublishingProfile.cs | 23 +- .../GalleryArtifactPublishingProfileBase.cs | 8 +- .../Models/GalleryArtifactVersionSource.cs | 18 +- .../src/Generated/Models/GalleryImage.cs | 32 +- .../Generated/Models/GalleryImageFeature.cs | 59 ++ .../Models/GalleryImageIdentifier.cs | 14 +- .../Generated/Models/GalleryImageUpdate.cs | 32 +- .../Generated/Models/GalleryImageVersion.cs | 6 +- .../GalleryImageVersionPublishingProfile.cs | 6 +- .../Models/GalleryImageVersionUpdate.cs | 6 +- .../Models/GallerySharingPermissionTypes.cs | 22 + .../src/Generated/Models/GalleryUpdate.cs | 8 +- .../src/Generated/Models/ImagePurchasePlan.cs | 2 +- .../src/Generated/Models/PirResource.cs | 59 ++ .../Models/PirSharedGalleryResource.cs | 58 ++ .../Models/RegionalReplicationStatus.cs | 4 +- .../src/Generated/Models/ReplicationStatus.cs | 2 +- .../src/Generated/Models/SelectPermissions.cs | 21 + .../src/Generated/Models/SharedGallery.cs | 48 ++ .../Generated/Models/SharedGalleryImage.cs | 157 +++++ .../Models/SharedGalleryImageVersion.cs | 76 ++ .../src/Generated/Models/SharedToValues.cs | 21 + .../src/Generated/Models/SharingProfile.cs | 68 ++ .../Generated/Models/SharingProfileGroup.cs | 71 ++ .../Models/SharingProfileGroupTypes.cs | 22 + .../src/Generated/Models/SharingUpdate.cs | 85 +++ .../Models/SharingUpdateOperationTypes.cs | 23 + .../Generated/Models/UserArtifactManage.cs | 95 +++ .../Generated/Models/UserArtifactSource.cs | 30 +- .../SdkInfo_ComputeManagementClient.cs | 25 +- .../Generated/SharedGalleriesOperations.cs | 615 ++++++++++++++++ .../SharedGalleriesOperationsExtensions.cs | 141 ++++ .../SharedGalleryImageVersionsOperations.cs | 656 ++++++++++++++++++ ...alleryImageVersionsOperationsExtensions.cs | 175 +++++ .../SharedGalleryImagesOperations.cs | 634 +++++++++++++++++ ...SharedGalleryImagesOperationsExtensions.cs | 155 +++++ .../Generated/VirtualMachinesOperations.cs | 17 +- .../VirtualMachinesOperationsExtensions.cs | 28 +- 59 files changed, 4525 insertions(+), 306 deletions(-) create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactManage.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs index 7bab34599755..8d2ba29fe5d4 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs @@ -226,6 +226,26 @@ public partial class ComputeManagementClient : ServiceClient public virtual IGalleryApplicationVersionsOperations GalleryApplicationVersions { get; private set; } + /// + /// Gets the IGallerySharingProfileOperations. + /// + public virtual IGallerySharingProfileOperations GallerySharingProfile { get; private set; } + + /// + /// Gets the ISharedGalleriesOperations. + /// + public virtual ISharedGalleriesOperations SharedGalleries { get; private set; } + + /// + /// Gets the ISharedGalleryImagesOperations. + /// + public virtual ISharedGalleryImagesOperations SharedGalleryImages { get; private set; } + + /// + /// Gets the ISharedGalleryImageVersionsOperations. + /// + public virtual ISharedGalleryImageVersionsOperations SharedGalleryImageVersions { get; private set; } + /// /// Gets the IContainerServicesOperations. /// @@ -503,6 +523,10 @@ private void Initialize() GalleryImageVersions = new GalleryImageVersionsOperations(this); GalleryApplications = new GalleryApplicationsOperations(this); GalleryApplicationVersions = new GalleryApplicationVersionsOperations(this); + GallerySharingProfile = new GallerySharingProfileOperations(this); + SharedGalleries = new SharedGalleriesOperations(this); + SharedGalleryImages = new SharedGalleryImagesOperations(this); + SharedGalleryImageVersions = new SharedGalleryImageVersionsOperations(this); ContainerServices = new ContainerServicesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs index 26c248d669a7..cd1041750010 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs @@ -113,6 +113,10 @@ internal GalleriesOperations(ComputeManagementClient client) /// /// The name of the Shared Image Gallery. /// + /// + /// The select expression to apply on the operation. Possible values include: + /// 'Permissions' + /// /// /// Headers that will be added to request. /// @@ -134,7 +138,7 @@ internal GalleriesOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -148,7 +152,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -159,6 +163,7 @@ internal GalleriesOperations(ComputeManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("galleryName", galleryName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("select", select); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -173,6 +178,10 @@ internal GalleriesOperations(ComputeManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } + if (select != null) + { + _queryParameters.Add(string.Format("$select={0}", System.Uri.EscapeDataString(select))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -357,7 +366,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +544,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -738,7 +747,7 @@ internal GalleriesOperations(ComputeManagementClient client) { gallery.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -984,7 +993,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gallery"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1182,7 +1191,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs index 200ecf5072b8..d5c55ace52ec 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs @@ -133,9 +133,13 @@ public static Gallery Update(this IGalleriesOperations operations, string resour /// /// The name of the Shared Image Gallery. /// - public static Gallery Get(this IGalleriesOperations operations, string resourceGroupName, string galleryName) + /// + /// The select expression to apply on the operation. Possible values include: + /// 'Permissions' + /// + public static Gallery Get(this IGalleriesOperations operations, string resourceGroupName, string galleryName, string select = default(string)) { - return operations.GetAsync(resourceGroupName, galleryName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, galleryName, select).GetAwaiter().GetResult(); } /// @@ -150,12 +154,16 @@ public static Gallery Get(this IGalleriesOperations operations, string resourceG /// /// The name of the Shared Image Gallery. /// + /// + /// The select expression to apply on the operation. Possible values include: + /// 'Permissions' + /// /// /// The cancellation token. /// - public static async Task GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, string select = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, galleryName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, galleryName, select, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs index 5ee6cdad2a4f..7fee20b39f3c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs @@ -187,7 +187,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -429,7 +429,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -656,7 +656,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { galleryApplicationVersion.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -923,7 +923,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersion"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1141,7 +1141,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs index 1d36b379d0e5..ee8bf60a5e4e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs @@ -164,7 +164,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -387,7 +387,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -602,7 +602,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { galleryApplication.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -858,7 +858,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplication"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1066,7 +1066,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs index 69cb3fd8df8c..112a66063ee3 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs @@ -51,7 +51,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) public ComputeManagementClient Client { get; private set; } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -60,17 +60,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -87,7 +87,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -96,17 +96,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The headers that will be added to request. @@ -122,7 +122,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The name of the resource group. @@ -131,11 +131,11 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values include: @@ -184,7 +184,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -344,7 +344,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -353,11 +353,11 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The headers that will be added to request. @@ -373,7 +373,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The name of the resource group. @@ -424,7 +424,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -577,7 +577,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -586,17 +586,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -650,7 +650,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { galleryImageVersion.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -848,7 +848,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -857,17 +857,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// Headers that will be added to request. @@ -916,7 +916,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersion"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1078,7 +1078,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -1087,11 +1087,11 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// Headers that will be added to request. @@ -1133,7 +1133,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1270,7 +1270,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs index 7b915d62dfdf..f77ed912503e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Compute public static partial class GalleryImageVersionsOperationsExtensions { /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -34,17 +34,17 @@ public static partial class GalleryImageVersionsOperationsExtensions /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion) @@ -53,7 +53,7 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -65,17 +65,17 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -90,7 +90,7 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -102,17 +102,17 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// public static GalleryImageVersion Update(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion) { @@ -120,7 +120,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -132,17 +132,17 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The cancellation token. @@ -156,7 +156,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The operations group for this extension method. @@ -168,11 +168,11 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values include: @@ -184,7 +184,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The operations group for this extension method. @@ -196,11 +196,11 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values include: @@ -218,7 +218,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -230,11 +230,11 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// public static void Delete(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName) { @@ -242,7 +242,7 @@ public static void Delete(this IGalleryImageVersionsOperations operations, strin } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -254,11 +254,11 @@ public static void Delete(this IGalleryImageVersionsOperations operations, strin /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The cancellation token. @@ -269,7 +269,7 @@ public static void Delete(this IGalleryImageVersionsOperations operations, strin } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. @@ -290,7 +290,7 @@ public static IPage ListByGalleryImage(this IGalleryImageVe } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. @@ -317,7 +317,7 @@ public static IPage ListByGalleryImage(this IGalleryImageVe } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -329,17 +329,17 @@ public static IPage ListByGalleryImage(this IGalleryImageVe /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion) @@ -348,7 +348,7 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -360,17 +360,17 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -385,7 +385,7 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -397,17 +397,17 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion) { @@ -415,7 +415,7 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -427,17 +427,17 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The cancellation token. @@ -451,7 +451,7 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -463,11 +463,11 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// public static void BeginDelete(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName) { @@ -475,7 +475,7 @@ public static void BeginDelete(this IGalleryImageVersionsOperations operations, } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -487,11 +487,11 @@ public static void BeginDelete(this IGalleryImageVersionsOperations operations, /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The cancellation token. @@ -502,7 +502,7 @@ public static void BeginDelete(this IGalleryImageVersionsOperations operations, } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. @@ -516,7 +516,7 @@ public static IPage ListByGalleryImageNext(this IGalleryIma } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs index f9021f2d57a9..02f11b8fd7ac 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs @@ -51,7 +51,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) public ComputeManagementClient Client { get; private set; } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -61,7 +61,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -82,7 +82,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -92,7 +92,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -113,7 +113,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The name of the resource group. @@ -123,7 +123,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// /// /// Headers that will be added to request. @@ -164,7 +164,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -327,7 +327,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The headers that will be added to request. @@ -343,7 +343,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The name of the resource group. @@ -387,7 +387,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -538,7 +538,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -548,7 +548,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -602,7 +602,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { galleryImage.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -798,7 +798,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -808,7 +808,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -858,7 +858,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImage"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1028,7 +1028,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// Headers that will be added to request. @@ -1066,7 +1066,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1201,7 +1201,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs index 0f2a873723dd..578c096bffa6 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Compute public static partial class GalleryImagesOperationsExtensions { /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -35,7 +35,7 @@ public static partial class GalleryImagesOperationsExtensions /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -48,7 +48,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -61,7 +61,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -80,7 +80,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -93,7 +93,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -106,7 +106,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -119,7 +119,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -138,7 +138,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri } /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The operations group for this extension method. @@ -151,7 +151,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri /// to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// public static GalleryImage Get(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName) { @@ -159,7 +159,7 @@ public static GalleryImage Get(this IGalleryImagesOperations operations, string } /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The operations group for this extension method. @@ -172,7 +172,7 @@ public static GalleryImage Get(this IGalleryImagesOperations operations, string /// to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// /// /// The cancellation token. @@ -199,7 +199,7 @@ public static GalleryImage Get(this IGalleryImagesOperations operations, string /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// public static void Delete(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName) { @@ -220,7 +220,7 @@ public static void Delete(this IGalleryImagesOperations operations, string resou /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The cancellation token. @@ -231,7 +231,7 @@ public static void Delete(this IGalleryImagesOperations operations, string resou } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. @@ -249,7 +249,7 @@ public static IPage ListByGallery(this IGalleryImagesOperations op } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. @@ -273,7 +273,7 @@ public static IPage ListByGallery(this IGalleryImagesOperations op } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -286,7 +286,7 @@ public static IPage ListByGallery(this IGalleryImagesOperations op /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -299,7 +299,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -312,7 +312,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -331,7 +331,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -344,7 +344,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -357,7 +357,7 @@ public static GalleryImage BeginUpdate(this IGalleryImagesOperations operations, } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -370,7 +370,7 @@ public static GalleryImage BeginUpdate(this IGalleryImagesOperations operations, /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -402,7 +402,7 @@ public static GalleryImage BeginUpdate(this IGalleryImagesOperations operations, /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// public static void BeginDelete(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName) { @@ -423,7 +423,7 @@ public static void BeginDelete(this IGalleryImagesOperations operations, string /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The cancellation token. @@ -434,7 +434,7 @@ public static void BeginDelete(this IGalleryImagesOperations operations, string } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. @@ -448,7 +448,7 @@ public static IPage ListByGalleryNext(this IGalleryImagesOperation } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs new file mode 100644 index 000000000000..36d20e5f894b --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs @@ -0,0 +1,309 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// GallerySharingProfileOperations operations. + /// + internal partial class GallerySharingProfileOperations : IServiceOperations, IGallerySharingProfileOperations + { + /// + /// Initializes a new instance of the GallerySharingProfileOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GallerySharingProfileOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, galleryName, sharingUpdate, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (galleryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); + } + if (sharingUpdate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sharingUpdate"); + } + if (sharingUpdate != null) + { + sharingUpdate.Validate(); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("galleryName", galleryName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("sharingUpdate", sharingUpdate); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{galleryName}", System.Uri.EscapeDataString(galleryName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(sharingUpdate != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(sharingUpdate, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs new file mode 100644 index 000000000000..9ab1747dd236 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs @@ -0,0 +1,117 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for GallerySharingProfileOperations. + /// + public static partial class GallerySharingProfileOperationsExtensions + { + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + public static SharingUpdate Update(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate) + { + return operations.UpdateAsync(resourceGroupName, galleryName, sharingUpdate).GetAwaiter().GetResult(); + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, galleryName, sharingUpdate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + public static SharingUpdate BeginUpdate(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate) + { + return operations.BeginUpdateAsync(resourceGroupName, galleryName, sharingUpdate).GetAwaiter().GetResult(); + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, galleryName, sharingUpdate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs index b96ecca11522..b634e4529533 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs @@ -221,6 +221,26 @@ public partial interface IComputeManagementClient : System.IDisposable /// IGalleryApplicationVersionsOperations GalleryApplicationVersions { get; } + /// + /// Gets the IGallerySharingProfileOperations. + /// + IGallerySharingProfileOperations GallerySharingProfile { get; } + + /// + /// Gets the ISharedGalleriesOperations. + /// + ISharedGalleriesOperations SharedGalleries { get; } + + /// + /// Gets the ISharedGalleryImagesOperations. + /// + ISharedGalleryImagesOperations SharedGalleryImages { get; } + + /// + /// Gets the ISharedGalleryImageVersionsOperations. + /// + ISharedGalleryImageVersionsOperations SharedGalleryImageVersions { get; } + /// /// Gets the IContainerServicesOperations. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs index ca3cfebcee4c..2e17fe75814a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs @@ -93,6 +93,10 @@ public partial interface IGalleriesOperations /// /// The name of the Shared Image Gallery. /// + /// + /// The select expression to apply on the operation. Possible values + /// include: 'Permissions' + /// /// /// The headers that will be added to request. /// @@ -108,7 +112,7 @@ public partial interface IGalleriesOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete a Shared Image Gallery. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs index 48a1efb60205..60387a8991fe 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Compute public partial interface IGalleryImageVersionsOperations { /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -34,18 +34,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be created. /// /// - /// The name of the gallery Image Version to be created. Needs to + /// The name of the gallery image version to be created. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -65,7 +65,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -75,18 +75,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to + /// The name of the gallery image version to be updated. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The headers that will be added to request. @@ -105,7 +105,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The name of the resource group. @@ -115,11 +115,11 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values @@ -142,7 +142,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -152,11 +152,11 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The headers that will be added to request. @@ -172,7 +172,7 @@ public partial interface IGalleryImageVersionsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The name of the resource group. @@ -202,7 +202,7 @@ public partial interface IGalleryImageVersionsOperations /// Task>> ListByGalleryImageWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -212,18 +212,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be created. /// /// - /// The name of the gallery Image Version to be created. Needs to + /// The name of the gallery image version to be created. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -243,7 +243,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -253,18 +253,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to + /// The name of the gallery image version to be updated. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The headers that will be added to request. @@ -283,7 +283,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -293,11 +293,11 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The headers that will be added to request. @@ -313,7 +313,7 @@ public partial interface IGalleryImageVersionsOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs index 523c2ffc9ffc..bfe8aaf91f55 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Compute public partial interface IGalleryImagesOperations { /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -34,7 +34,7 @@ public partial interface IGalleryImagesOperations /// is to be created. /// /// - /// The name of the gallery Image Definition to be created or updated. + /// The name of the gallery image definition to be created or updated. /// The allowed characters are alphabets and numbers with dots, dashes, /// and periods allowed in the middle. The maximum length is 80 /// characters. @@ -60,7 +60,7 @@ public partial interface IGalleryImagesOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, GalleryImage galleryImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -70,7 +70,7 @@ public partial interface IGalleryImagesOperations /// is to be updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -94,7 +94,7 @@ public partial interface IGalleryImagesOperations /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, GalleryImageUpdate galleryImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The name of the resource group. @@ -104,7 +104,7 @@ public partial interface IGalleryImagesOperations /// Definitions are to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// /// /// The headers that will be added to request. @@ -133,7 +133,7 @@ public partial interface IGalleryImagesOperations /// is to be deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The headers that will be added to request. @@ -149,7 +149,7 @@ public partial interface IGalleryImagesOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The name of the resource group. @@ -175,7 +175,7 @@ public partial interface IGalleryImagesOperations /// Task>> ListByGalleryWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -185,7 +185,7 @@ public partial interface IGalleryImagesOperations /// is to be created. /// /// - /// The name of the gallery Image Definition to be created or updated. + /// The name of the gallery image definition to be created or updated. /// The allowed characters are alphabets and numbers with dots, dashes, /// and periods allowed in the middle. The maximum length is 80 /// characters. @@ -211,7 +211,7 @@ public partial interface IGalleryImagesOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, GalleryImage galleryImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -221,7 +221,7 @@ public partial interface IGalleryImagesOperations /// is to be updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -255,7 +255,7 @@ public partial interface IGalleryImagesOperations /// is to be deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The headers that will be added to request. @@ -271,7 +271,7 @@ public partial interface IGalleryImagesOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs new file mode 100644 index 000000000000..851857bc297a --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// GallerySharingProfileOperations operations. + /// + public partial interface IGallerySharingProfileOperations + { + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs new file mode 100644 index 000000000000..369d638e16b0 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SharedGalleriesOperations operations. + /// + public partial interface ISharedGalleriesOperations + { + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when + /// doing listing operations. Possible values include: 'tenant' + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(string location, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string location, string galleryUniqueName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs new file mode 100644 index 000000000000..f885944fb8f4 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SharedGalleryImageVersionsOperations operations. + /// + public partial interface ISharedGalleryImageVersionsOperations + { + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the + /// Image Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when + /// doing listing operations. Possible values include: 'tenant' + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(string location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the + /// Image Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to + /// follow semantic version name pattern: The allowed characters are + /// digit and period. Digits must be within the range of a 32-bit + /// integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs new file mode 100644 index 000000000000..29684dfca5e7 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SharedGalleryImagesOperations operations. + /// + public partial interface ISharedGalleryImagesOperations + { + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when + /// doing listing operations. Possible values include: 'tenant' + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(string location, string galleryUniqueName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the + /// Image Versions are to be listed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string location, string galleryUniqueName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs index cd0a8bbcdd18..a0386139bd1e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs @@ -142,6 +142,9 @@ public partial interface IVirtualMachinesOperations /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The headers that will be added to request. /// @@ -154,7 +157,7 @@ public partial interface IVirtualMachinesOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieves information about the model view or the instance view of /// a virtual machine. @@ -733,6 +736,9 @@ public partial interface IVirtualMachinesOperations /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The headers that will be added to request. /// @@ -745,7 +751,7 @@ public partial interface IVirtualMachinesOperations /// /// Thrown when a required parameter is null /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Converts virtual machine disks from blob-based to managed disks. /// Virtual machine must be stop-deallocated before invoking this diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs index 3164fc5d8259..df6b6a84056c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs @@ -44,12 +44,13 @@ public Gallery() /// Gallery resource. This property is updatable. /// The current state of the /// gallery. - public Gallery(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string)) + public Gallery(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string), SharingProfile sharingProfile = default(SharingProfile)) : base(location, id, name, type, tags) { Description = description; Identifier = identifier; ProvisioningState = provisioningState; + SharingProfile = sharingProfile; CustomInit(); } @@ -81,6 +82,11 @@ public Gallery() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// + [JsonProperty(PropertyName = "properties.sharingProfile")] + public SharingProfile SharingProfile { get; set; } + /// /// Validate the object. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs index 3705c404cf17..90a4c08c1c33 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// The publishing profile of a gallery Image Version. + /// The publishing profile of a gallery image version. /// public partial class GalleryApplicationVersionPublishingProfile : GalleryArtifactPublishingProfileBase { @@ -45,24 +45,21 @@ public GalleryApplicationVersionPublishingProfile() /// deployed from the latest version of the Image Definition won't use /// this Image Version. /// The timestamp for when the gallery - /// Image Version is published. + /// image version is published. /// The end of life date of the gallery - /// Image Version. This property can be used for decommissioning + /// image version. This property can be used for decommissioning /// purposes. This property is updatable. /// Specifies the storage account type /// to be used to store the image. This property is not updatable. /// Possible values include: 'Standard_LRS', 'Standard_ZRS', /// 'Premium_LRS' - /// Optional. May be used to help process - /// this file. The type of file contained in the source, e.g. zip, - /// json, etc. /// Optional. Whether or not this /// application reports health. - public GalleryApplicationVersionPublishingProfile(UserArtifactSource source, IList targetRegions = default(IList), int? replicaCount = default(int?), bool? excludeFromLatest = default(bool?), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?), string storageAccountType = default(string), string contentType = default(string), bool? enableHealthCheck = default(bool?)) + public GalleryApplicationVersionPublishingProfile(UserArtifactSource source, IList targetRegions = default(IList), int? replicaCount = default(int?), bool? excludeFromLatest = default(bool?), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?), string storageAccountType = default(string), UserArtifactManage manageActions = default(UserArtifactManage), bool? enableHealthCheck = default(bool?)) : base(targetRegions, replicaCount, excludeFromLatest, publishedDate, endOfLifeDate, storageAccountType) { Source = source; - ContentType = contentType; + ManageActions = manageActions; EnableHealthCheck = enableHealthCheck; CustomInit(); } @@ -78,11 +75,9 @@ public GalleryApplicationVersionPublishingProfile() public UserArtifactSource Source { get; set; } /// - /// Gets or sets optional. May be used to help process this file. The - /// type of file contained in the source, e.g. zip, json, etc. /// - [JsonProperty(PropertyName = "contentType")] - public string ContentType { get; set; } + [JsonProperty(PropertyName = "manageActions")] + public UserArtifactManage ManageActions { get; set; } /// /// Gets or sets optional. Whether or not this application reports @@ -107,6 +102,10 @@ public virtual void Validate() { Source.Validate(); } + if (ManageActions != null) + { + ManageActions.Validate(); + } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs index 1b6b478f2b6b..8f21c927feef 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs @@ -44,9 +44,9 @@ public GalleryArtifactPublishingProfileBase() /// deployed from the latest version of the Image Definition won't use /// this Image Version. /// The timestamp for when the gallery - /// Image Version is published. + /// image version is published. /// The end of life date of the gallery - /// Image Version. This property can be used for decommissioning + /// image version. This property can be used for decommissioning /// purposes. This property is updatable. /// Specifies the storage account type /// to be used to store the image. This property is not updatable. @@ -93,13 +93,13 @@ public GalleryArtifactPublishingProfileBase() public bool? ExcludeFromLatest { get; set; } /// - /// Gets the timestamp for when the gallery Image Version is published. + /// Gets the timestamp for when the gallery image version is published. /// [JsonProperty(PropertyName = "publishedDate")] public System.DateTime? PublishedDate { get; private set; } /// - /// Gets or sets the end of life date of the gallery Image Version. + /// Gets or sets the end of life date of the gallery image version. /// This property can be used for decommissioning purposes. This /// property is updatable. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs index 7617dbe21556..ebe95fdfc09b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs @@ -32,10 +32,14 @@ public GalleryArtifactVersionSource() /// class. /// /// The id of the gallery artifact version source. Can - /// specify a disk uri, snapshot uri, or user image. - public GalleryArtifactVersionSource(string id = default(string)) + /// specify a disk uri, snapshot uri, user image or storage account + /// resource. + /// The uri of the gallery artifact version source. + /// Currently used to specify vhd/blob source. + public GalleryArtifactVersionSource(string id = default(string), string uri = default(string)) { Id = id; + Uri = uri; CustomInit(); } @@ -46,10 +50,18 @@ public GalleryArtifactVersionSource() /// /// Gets or sets the id of the gallery artifact version source. Can - /// specify a disk uri, snapshot uri, or user image. + /// specify a disk uri, snapshot uri, user image or storage account + /// resource. /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } + /// + /// Gets or sets the uri of the gallery artifact version source. + /// Currently used to specify vhd/blob source. + /// + [JsonProperty(PropertyName = "uri")] + public string Uri { get; set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs index 276cb3aeaae5..62dbb59864df 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Definition that you want + /// Specifies information about the gallery image definition that you want /// to create or update. /// [Rest.Serialization.JsonTransformation] @@ -49,22 +49,23 @@ public GalleryImage() /// Resource name /// Resource type /// Resource tags - /// The description of this gallery Image - /// Definition resource. This property is updatable. - /// The Eula agreement for the gallery Image - /// Definition. + /// The description of this gallery image + /// definition resource. This property is updatable. + /// The Eula agreement for the gallery image + /// definition. /// The privacy statement /// uri. /// The release note uri. /// The hypervisor generation of the /// Virtual Machine. Applicable to OS disks only. Possible values /// include: 'V1', 'V2' + /// A list of gallery image features. /// The end of life date of the gallery - /// Image Definition. This property can be used for decommissioning + /// image definition. This property can be used for decommissioning /// purposes. This property is updatable. /// The current state of the gallery - /// Image Definition. - public GalleryImage(string location, OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) + /// image definition. + public GalleryImage(string location, OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), IList features = default(IList), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) : base(location, id, name, type, tags) { Description = description; @@ -74,6 +75,7 @@ public GalleryImage() OsType = osType; OsState = osState; HyperVGeneration = hyperVGeneration; + Features = features; EndOfLifeDate = endOfLifeDate; Identifier = identifier; Recommended = recommended; @@ -89,14 +91,14 @@ public GalleryImage() partial void CustomInit(); /// - /// Gets or sets the description of this gallery Image Definition + /// Gets or sets the description of this gallery image definition /// resource. This property is updatable. /// [JsonProperty(PropertyName = "properties.description")] public string Description { get; set; } /// - /// Gets or sets the Eula agreement for the gallery Image Definition. + /// Gets or sets the Eula agreement for the gallery image definition. /// [JsonProperty(PropertyName = "properties.eula")] public string Eula { get; set; } @@ -141,7 +143,13 @@ public GalleryImage() public string HyperVGeneration { get; set; } /// - /// Gets or sets the end of life date of the gallery Image Definition. + /// Gets or sets a list of gallery image features. + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image definition. /// This property can be used for decommissioning purposes. This /// property is updatable. /// @@ -169,7 +177,7 @@ public GalleryImage() public ImagePurchasePlan PurchasePlan { get; set; } /// - /// Gets the current state of the gallery Image Definition. + /// Gets the current state of the gallery image definition. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs new file mode 100644 index 000000000000..2aa52c29b60b --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A feature for gallery image. + /// + public partial class GalleryImageFeature + { + /// + /// Initializes a new instance of the GalleryImageFeature class. + /// + public GalleryImageFeature() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GalleryImageFeature class. + /// + /// The name of the gallery image feature. + /// The value of the gallery image feature. + public GalleryImageFeature(string name = default(string), string value = default(string)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the gallery image feature. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the value of the gallery image feature. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs index b18ce093894f..5f3835b6879f 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// This is the gallery Image Definition identifier. + /// This is the gallery image definition identifier. /// public partial class GalleryImageIdentifier { @@ -30,11 +30,11 @@ public GalleryImageIdentifier() /// /// Initializes a new instance of the GalleryImageIdentifier class. /// - /// The name of the gallery Image Definition + /// The name of the gallery image definition /// publisher. - /// The name of the gallery Image Definition + /// The name of the gallery image definition /// offer. - /// The name of the gallery Image Definition + /// The name of the gallery image definition /// SKU. public GalleryImageIdentifier(string publisher, string offer, string sku) { @@ -50,19 +50,19 @@ public GalleryImageIdentifier(string publisher, string offer, string sku) partial void CustomInit(); /// - /// Gets or sets the name of the gallery Image Definition publisher. + /// Gets or sets the name of the gallery image definition publisher. /// [JsonProperty(PropertyName = "publisher")] public string Publisher { get; set; } /// - /// Gets or sets the name of the gallery Image Definition offer. + /// Gets or sets the name of the gallery image definition offer. /// [JsonProperty(PropertyName = "offer")] public string Offer { get; set; } /// - /// Gets or sets the name of the gallery Image Definition SKU. + /// Gets or sets the name of the gallery image definition SKU. /// [JsonProperty(PropertyName = "sku")] public string Sku { get; set; } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs index 4ac822d3c550..de806c8b415b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Definition that you want + /// Specifies information about the gallery image definition that you want /// to update. /// [Rest.Serialization.JsonTransformation] @@ -48,22 +48,23 @@ public GalleryImageUpdate() /// Resource name /// Resource type /// Resource tags - /// The description of this gallery Image - /// Definition resource. This property is updatable. - /// The Eula agreement for the gallery Image - /// Definition. + /// The description of this gallery image + /// definition resource. This property is updatable. + /// The Eula agreement for the gallery image + /// definition. /// The privacy statement /// uri. /// The release note uri. /// The hypervisor generation of the /// Virtual Machine. Applicable to OS disks only. Possible values /// include: 'V1', 'V2' + /// A list of gallery image features. /// The end of life date of the gallery - /// Image Definition. This property can be used for decommissioning + /// image definition. This property can be used for decommissioning /// purposes. This property is updatable. /// The current state of the gallery - /// Image Definition. - public GalleryImageUpdate(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) + /// image definition. + public GalleryImageUpdate(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), IList features = default(IList), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) : base(id, name, type, tags) { Description = description; @@ -73,6 +74,7 @@ public GalleryImageUpdate() OsType = osType; OsState = osState; HyperVGeneration = hyperVGeneration; + Features = features; EndOfLifeDate = endOfLifeDate; Identifier = identifier; Recommended = recommended; @@ -88,14 +90,14 @@ public GalleryImageUpdate() partial void CustomInit(); /// - /// Gets or sets the description of this gallery Image Definition + /// Gets or sets the description of this gallery image definition /// resource. This property is updatable. /// [JsonProperty(PropertyName = "properties.description")] public string Description { get; set; } /// - /// Gets or sets the Eula agreement for the gallery Image Definition. + /// Gets or sets the Eula agreement for the gallery image definition. /// [JsonProperty(PropertyName = "properties.eula")] public string Eula { get; set; } @@ -140,7 +142,13 @@ public GalleryImageUpdate() public string HyperVGeneration { get; set; } /// - /// Gets or sets the end of life date of the gallery Image Definition. + /// Gets or sets a list of gallery image features. + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image definition. /// This property can be used for decommissioning purposes. This /// property is updatable. /// @@ -168,7 +176,7 @@ public GalleryImageUpdate() public ImagePurchasePlan PurchasePlan { get; set; } /// - /// Gets the current state of the gallery Image Definition. + /// Gets the current state of the gallery image definition. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs index a7ad1dea5fab..707a553ae2c5 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Version that you want to + /// Specifies information about the gallery image version that you want to /// create or update. /// [Rest.Serialization.JsonTransformation] @@ -41,7 +41,7 @@ public GalleryImageVersion() /// Resource type /// Resource tags /// The current state of the gallery - /// Image Version. + /// image version. public GalleryImageVersion(string location, GalleryImageVersionStorageProfile storageProfile, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), GalleryImageVersionPublishingProfile publishingProfile = default(GalleryImageVersionPublishingProfile), string provisioningState = default(string), ReplicationStatus replicationStatus = default(ReplicationStatus)) : base(location, id, name, type, tags) { @@ -63,7 +63,7 @@ public GalleryImageVersion() public GalleryImageVersionPublishingProfile PublishingProfile { get; set; } /// - /// Gets the current state of the gallery Image Version. + /// Gets the current state of the gallery image version. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs index 6881266310aa..d047e097275a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// The publishing profile of a gallery Image Version. + /// The publishing profile of a gallery image Version. /// public partial class GalleryImageVersionPublishingProfile : GalleryArtifactPublishingProfileBase { @@ -43,9 +43,9 @@ public GalleryImageVersionPublishingProfile() /// deployed from the latest version of the Image Definition won't use /// this Image Version. /// The timestamp for when the gallery - /// Image Version is published. + /// image version is published. /// The end of life date of the gallery - /// Image Version. This property can be used for decommissioning + /// image version. This property can be used for decommissioning /// purposes. This property is updatable. /// Specifies the storage account type /// to be used to store the image. This property is not updatable. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs index 95a7c06e84e8..174e5218e0fe 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Version that you want to + /// Specifies information about the gallery image version that you want to /// update. /// [Rest.Serialization.JsonTransformation] @@ -40,7 +40,7 @@ public GalleryImageVersionUpdate() /// Resource type /// Resource tags /// The current state of the gallery - /// Image Version. + /// image version. public GalleryImageVersionUpdate(GalleryImageVersionStorageProfile storageProfile, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), GalleryImageVersionPublishingProfile publishingProfile = default(GalleryImageVersionPublishingProfile), string provisioningState = default(string), ReplicationStatus replicationStatus = default(ReplicationStatus)) : base(id, name, type, tags) { @@ -62,7 +62,7 @@ public GalleryImageVersionUpdate() public GalleryImageVersionPublishingProfile PublishingProfile { get; set; } /// - /// Gets the current state of the gallery Image Version. + /// Gets the current state of the gallery image version. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs new file mode 100644 index 000000000000..22f0125b9557 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for GallerySharingPermissionTypes. + /// + public static class GallerySharingPermissionTypes + { + public const string Private = "Private"; + public const string Groups = "Groups"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs index e46c769da8b3..23ea5f90f3c5 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs @@ -43,12 +43,13 @@ public GalleryUpdate() /// Gallery resource. This property is updatable. /// The current state of the /// gallery. - public GalleryUpdate(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string)) + public GalleryUpdate(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string), SharingProfile sharingProfile = default(SharingProfile)) : base(id, name, type, tags) { Description = description; Identifier = identifier; ProvisioningState = provisioningState; + SharingProfile = sharingProfile; CustomInit(); } @@ -80,5 +81,10 @@ public GalleryUpdate() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// + [JsonProperty(PropertyName = "properties.sharingProfile")] + public SharingProfile SharingProfile { get; set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs index 8c15c2873d2e..491af12db0e4 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Describes the gallery Image Definition purchase plan. This is used by + /// Describes the gallery image definition purchase plan. This is used by /// marketplace images. /// public partial class ImagePurchasePlan diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs new file mode 100644 index 000000000000..7a1e494e0651 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Resource model definition. + /// + public partial class PirResource + { + /// + /// Initializes a new instance of the PirResource class. + /// + public PirResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PirResource class. + /// + /// Resource name + /// Resource location + public PirResource(string name = default(string), string location = default(string)) + { + Name = name; + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource location + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs new file mode 100644 index 000000000000..1ee9785ad48c --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base information about the shared gallery resource in pir. + /// + [Rest.Serialization.JsonTransformation] + public partial class PirSharedGalleryResource : PirResource + { + /// + /// Initializes a new instance of the PirSharedGalleryResource class. + /// + public PirSharedGalleryResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PirSharedGalleryResource class. + /// + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + public PirSharedGalleryResource(string name = default(string), string location = default(string), string uniqueId = default(string)) + : base(name, location) + { + UniqueId = uniqueId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the unique id of this shared gallery. + /// + [JsonProperty(PropertyName = "identifier.uniqueId")] + public string UniqueId { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs index 1723a9663fe3..a40af552a406 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs @@ -29,7 +29,7 @@ public RegionalReplicationStatus() /// /// Initializes a new instance of the RegionalReplicationStatus class. /// - /// The region to which the gallery Image Version + /// The region to which the gallery image version /// is being replicated to. /// This is the regional replication state. /// Possible values include: 'Unknown', 'Replicating', 'Completed', @@ -53,7 +53,7 @@ public RegionalReplicationStatus() partial void CustomInit(); /// - /// Gets the region to which the gallery Image Version is being + /// Gets the region to which the gallery image version is being /// replicated to. /// [JsonProperty(PropertyName = "region")] diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs index 17e4a4ad55a5..5263ab577613 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// This is the replication status of the gallery Image Version. + /// This is the replication status of the gallery image version. /// public partial class ReplicationStatus { diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs new file mode 100644 index 000000000000..dcd358cd68e3 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for SelectPermissions. + /// + public static class SelectPermissions + { + public const string Permissions = "Permissions"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs new file mode 100644 index 000000000000..aef86d0b185c --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs @@ -0,0 +1,48 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using System.Linq; + + /// + /// Specifies information about the Shared Gallery that you want to create + /// or update. + /// + public partial class SharedGallery : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGallery class. + /// + public SharedGallery() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGallery class. + /// + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + public SharedGallery(string name = default(string), string location = default(string), string uniqueId = default(string)) + : base(name, location, uniqueId) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs new file mode 100644 index 000000000000..e64cdf38245e --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Specifies information about the gallery image definition that you want + /// to create or update. + /// + [Rest.Serialization.JsonTransformation] + public partial class SharedGalleryImage : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGalleryImage class. + /// + public SharedGalleryImage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGalleryImage class. + /// + /// This property allows you to specify the type + /// of the OS that is included in the disk when creating a VM from a + /// managed image. <br><br> Possible values are: + /// <br><br> **Windows** <br><br> **Linux**. + /// Possible values include: 'Windows', 'Linux' + /// This property allows the user to specify + /// whether the virtual machines created under this image are + /// 'Generalized' or 'Specialized'. Possible values include: + /// 'Generalized', 'Specialized' + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + /// The end of life date of the gallery + /// image definition. This property can be used for decommissioning + /// purposes. This property is updatable. + /// The hypervisor generation of the + /// Virtual Machine. Applicable to OS disks only. Possible values + /// include: 'V1', 'V2' + /// A list of gallery image features. + public SharedGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan)) + : base(name, location, uniqueId) + { + OsType = osType; + OsState = osState; + EndOfLifeDate = endOfLifeDate; + Identifier = identifier; + Recommended = recommended; + Disallowed = disallowed; + HyperVGeneration = hyperVGeneration; + Features = features; + PurchasePlan = purchasePlan; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the type of the OS + /// that is included in the disk when creating a VM from a managed + /// image. &lt;br&gt;&lt;br&gt; Possible values are: + /// &lt;br&gt;&lt;br&gt; **Windows** + /// &lt;br&gt;&lt;br&gt; **Linux**. Possible values + /// include: 'Windows', 'Linux' + /// + [JsonProperty(PropertyName = "properties.osType")] + public OperatingSystemTypes OsType { get; set; } + + /// + /// Gets or sets this property allows the user to specify whether the + /// virtual machines created under this image are 'Generalized' or + /// 'Specialized'. Possible values include: 'Generalized', + /// 'Specialized' + /// + [JsonProperty(PropertyName = "properties.osState")] + public OperatingSystemStateTypes OsState { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image definition. + /// This property can be used for decommissioning purposes. This + /// property is updatable. + /// + [JsonProperty(PropertyName = "properties.endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.identifier")] + public GalleryImageIdentifier Identifier { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.recommended")] + public RecommendedMachineConfiguration Recommended { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.disallowed")] + public Disallowed Disallowed { get; set; } + + /// + /// Gets or sets the hypervisor generation of the Virtual Machine. + /// Applicable to OS disks only. Possible values include: 'V1', 'V2' + /// + [JsonProperty(PropertyName = "properties.hyperVGeneration")] + public string HyperVGeneration { get; set; } + + /// + /// Gets or sets a list of gallery image features. + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.purchasePlan")] + public ImagePurchasePlan PurchasePlan { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Identifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Identifier"); + } + if (Identifier != null) + { + Identifier.Validate(); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs new file mode 100644 index 000000000000..b51fcbd0b480 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Specifies information about the gallery image version that you want to + /// create or update. + /// + [Rest.Serialization.JsonTransformation] + public partial class SharedGalleryImageVersion : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGalleryImageVersion class. + /// + public SharedGalleryImageVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGalleryImageVersion class. + /// + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + /// The published date of the gallery image + /// version Definition. This property can be used for decommissioning + /// purposes. This property is updatable. + /// The end of life date of the gallery + /// image version Definition. This property can be used for + /// decommissioning purposes. This property is updatable. + public SharedGalleryImageVersion(string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?)) + : base(name, location, uniqueId) + { + PublishedDate = publishedDate; + EndOfLifeDate = endOfLifeDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the published date of the gallery image version + /// Definition. This property can be used for decommissioning purposes. + /// This property is updatable. + /// + [JsonProperty(PropertyName = "properties.publishedDate")] + public System.DateTime? PublishedDate { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image version + /// Definition. This property can be used for decommissioning purposes. + /// This property is updatable. + /// + [JsonProperty(PropertyName = "properties.endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs new file mode 100644 index 000000000000..463c15183c04 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for SharedToValues. + /// + public static class SharedToValues + { + public const string Tenant = "tenant"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs new file mode 100644 index 000000000000..772a9e641f95 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Profile for gallery sharing to subscription or tenant + /// + public partial class SharingProfile + { + /// + /// Initializes a new instance of the SharingProfile class. + /// + public SharingProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharingProfile class. + /// + /// This property allows you to specify the + /// permission of sharing gallery. <br><br> Possible values + /// are: <br><br> **Private** <br><br> + /// **Groups**. Possible values include: 'Private', 'Groups' + /// A list of sharing profile groups. + public SharingProfile(string permissions = default(string), IList groups = default(IList)) + { + Permissions = permissions; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the permission of + /// sharing gallery. &lt;br&gt;&lt;br&gt; Possible + /// values are: &lt;br&gt;&lt;br&gt; **Private** + /// &lt;br&gt;&lt;br&gt; **Groups**. Possible values + /// include: 'Private', 'Groups' + /// + [JsonProperty(PropertyName = "permissions")] + public string Permissions { get; set; } + + /// + /// Gets a list of sharing profile groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; private set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs new file mode 100644 index 000000000000..7a8e4df6262c --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Group of the gallery sharing profile + /// + public partial class SharingProfileGroup + { + /// + /// Initializes a new instance of the SharingProfileGroup class. + /// + public SharingProfileGroup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharingProfileGroup class. + /// + /// This property allows you to specify the type of + /// sharing group. <br><br> Possible values are: + /// <br><br> **Subscriptions** <br><br> + /// **AADTenants**. Possible values include: 'Subscriptions', + /// 'AADTenants' + /// A list of subscription/tenant ids the gallery is + /// aimed to be shared to. + public SharingProfileGroup(string type = default(string), IList ids = default(IList)) + { + Type = type; + Ids = ids; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the type of + /// sharing group. &lt;br&gt;&lt;br&gt; Possible values + /// are: &lt;br&gt;&lt;br&gt; **Subscriptions** + /// &lt;br&gt;&lt;br&gt; **AADTenants**. Possible + /// values include: 'Subscriptions', 'AADTenants' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets a list of subscription/tenant ids the gallery is aimed + /// to be shared to. + /// + [JsonProperty(PropertyName = "ids")] + public IList Ids { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs new file mode 100644 index 000000000000..1f1724bed836 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for SharingProfileGroupTypes. + /// + public static class SharingProfileGroupTypes + { + public const string Subscriptions = "Subscriptions"; + public const string AADTenants = "AADTenants"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs new file mode 100644 index 000000000000..a51aa0ad30dc --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Specifies information about the gallery sharing profile update. + /// + public partial class SharingUpdate : IResource + { + /// + /// Initializes a new instance of the SharingUpdate class. + /// + public SharingUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharingUpdate class. + /// + /// This property allows you to specify the + /// operation type of gallery sharing update. <br><br> + /// Possible values are: <br><br> **Add** + /// <br><br> **Remove** <br><br> **Reset**. + /// Possible values include: 'Add', 'Remove', 'Reset' + /// A list of sharing profile groups. + public SharingUpdate(string operationType, IList groups = default(IList)) + { + OperationType = operationType; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the operation type + /// of gallery sharing update. &lt;br&gt;&lt;br&gt; + /// Possible values are: &lt;br&gt;&lt;br&gt; **Add** + /// &lt;br&gt;&lt;br&gt; **Remove** + /// &lt;br&gt;&lt;br&gt; **Reset**. Possible values + /// include: 'Add', 'Remove', 'Reset' + /// + [JsonProperty(PropertyName = "operationType")] + public string OperationType { get; set; } + + /// + /// Gets or sets a list of sharing profile groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperationType"); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs new file mode 100644 index 000000000000..821acf46873f --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for SharingUpdateOperationTypes. + /// + public static class SharingUpdateOperationTypes + { + public const string Add = "Add"; + public const string Remove = "Remove"; + public const string Reset = "Reset"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactManage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactManage.cs new file mode 100644 index 000000000000..c071bf5d91f4 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactManage.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + public partial class UserArtifactManage + { + /// + /// Initializes a new instance of the UserArtifactManage class. + /// + public UserArtifactManage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserArtifactManage class. + /// + /// Required. The path and arguments to install + /// the gallery application. This is limited to 4096 + /// characters. + /// Required. The path and arguments to remove the + /// gallery application. This is limited to 4096 characters. + /// Optional. The path and arguments to update the + /// gallery application. If not present, then update operation will + /// invoke remove command on the previous version and install command + /// on the current version of the gallery application. This is limited + /// to 4096 characters. + public UserArtifactManage(string install, string remove, string update = default(string)) + { + Install = install; + Remove = remove; + Update = update; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required. The path and arguments to install the + /// gallery application. This is limited to 4096 characters. + /// + [JsonProperty(PropertyName = "install")] + public string Install { get; set; } + + /// + /// Gets or sets required. The path and arguments to remove the gallery + /// application. This is limited to 4096 characters. + /// + [JsonProperty(PropertyName = "remove")] + public string Remove { get; set; } + + /// + /// Gets or sets optional. The path and arguments to update the gallery + /// application. If not present, then update operation will invoke + /// remove command on the previous version and install command on the + /// current version of the gallery application. This is limited to 4096 + /// characters. + /// + [JsonProperty(PropertyName = "update")] + public string Update { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Install == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Install"); + } + if (Remove == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Remove"); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactSource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactSource.cs index a37d1ec81227..3af7ac1a8a5d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactSource.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UserArtifactSource.cs @@ -30,14 +30,15 @@ public UserArtifactSource() /// /// Initializes a new instance of the UserArtifactSource class. /// - /// Required. The fileName of the - /// artifact. /// Required. The mediaLink of the artifact, - /// must be a readable storage blob. - public UserArtifactSource(string fileName, string mediaLink) + /// must be a readable storage page blob. + /// Optional. The + /// defaultConfigurationLink of the artifact, must be a readable + /// storage page blob. + public UserArtifactSource(string mediaLink, string defaultConfigurationLink = default(string)) { - FileName = fileName; MediaLink = mediaLink; + DefaultConfigurationLink = defaultConfigurationLink; CustomInit(); } @@ -46,19 +47,20 @@ public UserArtifactSource(string fileName, string mediaLink) /// partial void CustomInit(); - /// - /// Gets or sets required. The fileName of the artifact. - /// - [JsonProperty(PropertyName = "fileName")] - public string FileName { get; set; } - /// /// Gets or sets required. The mediaLink of the artifact, must be a - /// readable storage blob. + /// readable storage page blob. /// [JsonProperty(PropertyName = "mediaLink")] public string MediaLink { get; set; } + /// + /// Gets or sets optional. The defaultConfigurationLink of the + /// artifact, must be a readable storage page blob. + /// + [JsonProperty(PropertyName = "defaultConfigurationLink")] + public string DefaultConfigurationLink { get; set; } + /// /// Validate the object. /// @@ -67,10 +69,6 @@ public UserArtifactSource(string fileName, string mediaLink) /// public virtual void Validate() { - if (FileName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "FileName"); - } if (MediaLink == null) { throw new ValidationException(ValidationRules.CannotBeNull, "MediaLink"); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs index 9094c86f8b99..39908bdca092 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs @@ -25,16 +25,20 @@ public static IEnumerable> ApiInfo_ComputeManageme new Tuple("Compute", "DiskAccesses", "2020-06-30"), new Tuple("Compute", "DiskEncryptionSets", "2020-06-30"), new Tuple("Compute", "Disks", "2020-06-30"), - new Tuple("Compute", "Galleries", "2019-12-01"), - new Tuple("Compute", "GalleryApplicationVersions", "2019-12-01"), - new Tuple("Compute", "GalleryApplications", "2019-12-01"), - new Tuple("Compute", "GalleryImageVersions", "2019-12-01"), - new Tuple("Compute", "GalleryImages", "2019-12-01"), + new Tuple("Compute", "Galleries", "2020-09-30"), + new Tuple("Compute", "GalleryApplicationVersions", "2020-09-30"), + new Tuple("Compute", "GalleryApplications", "2020-09-30"), + new Tuple("Compute", "GalleryImageVersions", "2020-09-30"), + new Tuple("Compute", "GalleryImages", "2020-09-30"), + new Tuple("Compute", "GallerySharingProfile", "2020-09-30"), new Tuple("Compute", "Images", "2020-06-01"), new Tuple("Compute", "LogAnalytics", "2020-06-01"), new Tuple("Compute", "Operations", "2020-06-01"), new Tuple("Compute", "ProximityPlacementGroups", "2020-06-01"), new Tuple("Compute", "ResourceSkus", "2019-04-01"), + new Tuple("Compute", "SharedGalleries", "2020-09-30"), + new Tuple("Compute", "SharedGalleryImageVersions", "2020-09-30"), + new Tuple("Compute", "SharedGalleryImages", "2020-09-30"), new Tuple("Compute", "Snapshots", "2020-06-30"), new Tuple("Compute", "SshPublicKeys", "2020-06-01"), new Tuple("Compute", "Usage", "2020-06-01"), @@ -54,16 +58,5 @@ public static IEnumerable> ApiInfo_ComputeManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "1959aa63dd7a626aac36cc0e6b8c656dd2c1791d"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs new file mode 100644 index 000000000000..409b39892dba --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs @@ -0,0 +1,615 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SharedGalleriesOperations operations. + /// + internal partial class SharedGalleriesOperations : IServiceOperations, ISharedGalleriesOperations + { + /// + /// Initializes a new instance of the SharedGalleriesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SharedGalleriesOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(string location, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("sharedTo", sharedTo); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (sharedTo != null) + { + _queryParameters.Add(string.Format("sharedTo={0}", System.Uri.EscapeDataString(sharedTo))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string location, string galleryUniqueName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs new file mode 100644 index 000000000000..fbc46821ac94 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs @@ -0,0 +1,141 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SharedGalleriesOperations. + /// + public static partial class SharedGalleriesOperationsExtensions + { + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + public static IPage List(this ISharedGalleriesOperations operations, string location, string sharedTo = default(string)) + { + return operations.ListAsync(location, sharedTo).GetAwaiter().GetResult(); + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISharedGalleriesOperations operations, string location, string sharedTo = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, sharedTo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + public static SharedGallery Get(this ISharedGalleriesOperations operations, string location, string galleryUniqueName) + { + return operations.GetAsync(location, galleryUniqueName).GetAwaiter().GetResult(); + } + + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISharedGalleriesOperations operations, string location, string galleryUniqueName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, galleryUniqueName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISharedGalleriesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this ISharedGalleriesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs new file mode 100644 index 000000000000..f86e48b89e02 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs @@ -0,0 +1,656 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SharedGalleryImageVersionsOperations operations. + /// + internal partial class SharedGalleryImageVersionsOperations : IServiceOperations, ISharedGalleryImageVersionsOperations + { + /// + /// Initializes a new instance of the SharedGalleryImageVersionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SharedGalleryImageVersionsOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(string location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + if (galleryImageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("galleryImageName", galleryImageName); + tracingParameters.Add("sharedTo", sharedTo); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (sharedTo != null) + { + _queryParameters.Add(string.Format("sharedTo={0}", System.Uri.EscapeDataString(sharedTo))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. + /// Digits must be within the range of a 32-bit integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + if (galleryImageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); + } + if (galleryImageVersionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("galleryImageName", galleryImageName); + tracingParameters.Add("galleryImageVersionName", galleryImageVersionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName)); + _url = _url.Replace("{galleryImageVersionName}", System.Uri.EscapeDataString(galleryImageVersionName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs new file mode 100644 index 000000000000..30ce93c9da32 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs @@ -0,0 +1,175 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SharedGalleryImageVersionsOperations. + /// + public static partial class SharedGalleryImageVersionsOperationsExtensions + { + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + public static IPage List(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string)) + { + return operations.ListAsync(location, galleryUniqueName, galleryImageName, sharedTo).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, galleryUniqueName, galleryImageName, sharedTo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. + /// Digits must be within the range of a 32-bit integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + public static SharedGalleryImageVersion Get(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName) + { + return operations.GetAsync(location, galleryUniqueName, galleryImageName, galleryImageVersionName).GetAwaiter().GetResult(); + } + + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. + /// Digits must be within the range of a 32-bit integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, galleryUniqueName, galleryImageName, galleryImageVersionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISharedGalleryImageVersionsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this ISharedGalleryImageVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs new file mode 100644 index 000000000000..e6d129ddf34d --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs @@ -0,0 +1,634 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SharedGalleryImagesOperations operations. + /// + internal partial class SharedGalleryImagesOperations : IServiceOperations, ISharedGalleryImagesOperations + { + /// + /// Initializes a new instance of the SharedGalleryImagesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SharedGalleryImagesOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(string location, string galleryUniqueName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("sharedTo", sharedTo); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (sharedTo != null) + { + _queryParameters.Add(string.Format("sharedTo={0}", System.Uri.EscapeDataString(sharedTo))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string location, string galleryUniqueName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + if (galleryImageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("galleryImageName", galleryImageName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs new file mode 100644 index 000000000000..6f7b97ca6e91 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs @@ -0,0 +1,155 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SharedGalleryImagesOperations. + /// + public static partial class SharedGalleryImagesOperationsExtensions + { + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + public static IPage List(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string sharedTo = default(string)) + { + return operations.ListAsync(location, galleryUniqueName, sharedTo).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string sharedTo = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, galleryUniqueName, sharedTo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + public static SharedGalleryImage Get(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string galleryImageName) + { + return operations.GetAsync(location, galleryUniqueName, galleryImageName).GetAwaiter().GetResult(); + } + + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string galleryImageName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, galleryUniqueName, galleryImageName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISharedGalleryImagesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this ISharedGalleryImagesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs index 7c170b6402a6..443773a98417 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs @@ -329,16 +329,19 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -2804,6 +2807,9 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// Headers that will be added to request. /// @@ -2822,7 +2828,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2846,6 +2852,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmName", vmName); + tracingParameters.Add("forceDeletion", forceDeletion); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); @@ -2857,6 +2864,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDeletion != null) + { + _queryParameters.Add(string.Format("forceDeletion={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDeletion, Client.SerializationSettings).Trim('"')))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs index 495ef93f9b68..17ea6694c4c7 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs @@ -213,9 +213,12 @@ public static VirtualMachine Update(this IVirtualMachinesOperations operations, /// /// The name of the virtual machine. /// - public static void Delete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName) + /// + /// Optional parameter to force delete virtual machines. + /// + public static void Delete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?)) { - operations.DeleteAsync(resourceGroupName, vmName).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, vmName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -230,12 +233,15 @@ public static void Delete(this IVirtualMachinesOperations operations, string res /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1187,9 +1193,12 @@ public static VirtualMachine BeginUpdate(this IVirtualMachinesOperations operati /// /// The name of the virtual machine. /// - public static void BeginDelete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName) + /// + /// Optional parameter to force delete virtual machines. + /// + public static void BeginDelete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?)) { - operations.BeginDeleteAsync(resourceGroupName, vmName).GetAwaiter().GetResult(); + operations.BeginDeleteAsync(resourceGroupName, vmName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -1204,12 +1213,15 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The cancellation token. /// - public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } ///