diff --git a/src/SDKs/IotHub/IotHub.Tests/Helpers/IotHubTestUtilities.cs b/src/SDKs/IotHub/IotHub.Tests/Helpers/IotHubTestUtilities.cs index 5b81a2400b84f..e751f760825ba 100644 --- a/src/SDKs/IotHub/IotHub.Tests/Helpers/IotHubTestUtilities.cs +++ b/src/SDKs/IotHub/IotHub.Tests/Helpers/IotHubTestUtilities.cs @@ -9,7 +9,7 @@ namespace IotHub.Tests.Helpers using System.Net; using Microsoft.Azure.Management.EventHub; using Microsoft.Azure.Management.IotHub; - using Microsoft.Azure.Management.Resources; + using Microsoft.Azure.Management.ResourceManager; using Microsoft.Azure.Management.ServiceBus; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; @@ -21,6 +21,22 @@ public class IotHubTestUtilities public static string DefaultResourceGroupName = "DotNetHubRG"; public static string DefaultUpdateResourceGroupName = "UpdateDotNetHubRG"; public static string EventsEndpointName = "events"; + public static string DefaultCertificateIotHubName = "DotNetCertificateHub"; + public static string DefaultCertificateResourceGroupName = "DotNetCertificateHubRG"; + public static string DefaultIotHubCertificateName = "DotNetCertificateHubCertificate"; + public static string DefaultIotHubCertificateSubject = "CN=Azure IoT Root CA"; + public static string DefaultIotHubCertificateThumbprint = "9F0983E8F2DB2DB3582997FEF331247D872DEE32"; + public static string DefaultIotHubCertificateType = "Microsoft.Devices/IotHubs/Certificates"; + public static string DefaultIotHubCertificateContent = "MIIBvjCCAWOgAwIBAgIQG6PoBFT6GLJGNKn/EaxltTAKBggqhkjOPQQDAjAcMRow" + + "GAYDVQQDDBFBenVyZSBJb1QgUm9vdCBDQTAeFw0xNzExMDMyMDUyNDZaFw0xNzEy" + + "MDMyMTAyNDdaMBwxGjAYBgNVBAMMEUF6dXJlIElvVCBSb290IENBMFkwEwYHKoZI" + + "zj0CAQYIKoZIzj0DAQcDQgAE+CgpnW3K+KRNIi/U6Zqe/Al9m8PExHX2KgakmGTf" + + "E04nNBwnSoygWb0ekqpT+Lm+OP56LMMe9ynVNryDEr9OSKOBhjCBgzAOBgNVHQ8B" + + "Af8EBAMCAgQwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMB8GA1UdEQQY" + + "MBaCFENOPUF6dXJlIElvVCBSb290IENBMBIGA1UdEwEB/wQIMAYBAf8CAQwwHQYD" + + "VR0OBBYEFDjiklfHQzw1G0A33BcmRQTjAivTMAoGCCqGSM49BAMCA0kAMEYCIQCt" + + "jJ4bAvoYuDhwr92Kk+OkvpPF+qBFiRfrA/EC4YGtzQIhAO79WPtbUnBQ5fsQnW2a" + + "UAT4yJGWL+7l4/qfmqblb96n"; public static IotHubClient GetIotHubClient(MockContext context, RecordedDelegatingHandler handler = null) { if (handler != null) diff --git a/src/SDKs/IotHub/IotHub.Tests/IotHub.Tests.csproj b/src/SDKs/IotHub/IotHub.Tests/IotHub.Tests.csproj index 97856661bbb4c..4feb78a9b417f 100644 --- a/src/SDKs/IotHub/IotHub.Tests/IotHub.Tests.csproj +++ b/src/SDKs/IotHub/IotHub.Tests/IotHub.Tests.csproj @@ -13,6 +13,7 @@ + diff --git a/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubLifeCycleTests.cs b/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubLifeCycleTests.cs index 637358648a139..588ba64625e16 100644 --- a/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubLifeCycleTests.cs +++ b/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubLifeCycleTests.cs @@ -8,8 +8,8 @@ namespace IotHub.Tests.ScenarioTests { using System; using System.Net; - using Microsoft.Azure.Management.Resources; - using Microsoft.Azure.Management.Resources.Models; + using Microsoft.Azure.Management.ResourceManager; + using Microsoft.Azure.Management.ResourceManager.Models; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.Azure.Management.IotHub; using Microsoft.Azure.Management.IotHub.Models; @@ -129,6 +129,17 @@ public void TestIotHubCreateLifeCycle() IotHubTestUtilities.DefaultIotHubName, IotHubTestUtilities.EventsEndpointName, "testConsumerGroup"); + + // Get all of the available IoT Hub REST API operations + var operationList = this.iotHubClient.Operations.List(); + Assert.True(operationList.Count() > 0); + Assert.True(operationList.Any(e => e.Name.Equals("Microsoft.Devices/iotHubs/Read", StringComparison.OrdinalIgnoreCase))); + + // Get IoT Hub REST API read operation + var hubReadOperation = operationList.Where(e => e.Name.Equals("Microsoft.Devices/iotHubs/Read", StringComparison.OrdinalIgnoreCase)); + Assert.True(hubReadOperation.Count().Equals(1)); + Assert.True(hubReadOperation.First().Display.Provider.Equals("Microsoft Devices", StringComparison.OrdinalIgnoreCase)); + Assert.True(hubReadOperation.First().Display.Operation.Equals("Get IotHub(s)", StringComparison.OrdinalIgnoreCase)); } } @@ -179,7 +190,7 @@ public void TestIotHubUpdateLifeCycle() iotHub.Properties.Routing = this.GetIotHubRoutingProperties(resourceGroup); retIotHub = this.UpdateIotHub(resourceGroup, iotHub, IotHubTestUtilities.DefaultUpdateIotHubName); - + Assert.NotNull(retIotHub); Assert.Equal(IotHubTestUtilities.DefaultUpdateIotHubName, retIotHub.Name); Assert.Equal(retIotHub.Properties.Routing.Routes.Count, 4); @@ -213,6 +224,66 @@ public void TestIotHubUpdateLifeCycle() } } + [Fact] + public void TestIotHubCertificateLifeCycle() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + this.Initialize(context); + + // Create Resource Group + var resourceGroup = this.CreateResourceGroup(IotHubTestUtilities.DefaultCertificateResourceGroupName); + + // Check if Hub Exists and Delete + var operationInputs = new OperationInputs() + { + Name = IotHubTestUtilities.DefaultCertificateIotHubName + }; + + var iotHubNameAvailabilityInfo = this.iotHubClient.IotHubResource.CheckNameAvailability(operationInputs); + + if (!(bool)iotHubNameAvailabilityInfo.NameAvailable) + { + this.iotHubClient.IotHubResource.Delete( + IotHubTestUtilities.DefaultCertificateResourceGroupName, + IotHubTestUtilities.DefaultCertificateIotHubName); + + iotHubNameAvailabilityInfo = this.iotHubClient.IotHubResource.CheckNameAvailability(operationInputs); + Assert.Equal(true, iotHubNameAvailabilityInfo.NameAvailable); + } + + // Create Hub + var iotHub = this.CreateIotHub(resourceGroup, IotHubTestUtilities.DefaultLocation, IotHubTestUtilities.DefaultCertificateIotHubName, null); + + // Upload Certificate to the Hub + var newCertificateDescription = this.CreateCertificate(resourceGroup, IotHubTestUtilities.DefaultCertificateIotHubName, IotHubTestUtilities.DefaultIotHubCertificateName, IotHubTestUtilities.DefaultIotHubCertificateContent); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateName, newCertificateDescription.Name); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateSubject, newCertificateDescription.Properties.Subject); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateThumbprint, newCertificateDescription.Properties.Thumbprint); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateType, newCertificateDescription.Type); + Assert.False(newCertificateDescription.Properties.IsVerified); + + // Get all certificates + var certificateList = this.GetCertificates(resourceGroup, IotHubTestUtilities.DefaultCertificateIotHubName); + Assert.True(certificateList.Value.Count().Equals(1)); + + // Get certificate + var certificate = this.GetCertificate(resourceGroup, IotHubTestUtilities.DefaultCertificateIotHubName, IotHubTestUtilities.DefaultIotHubCertificateName); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateName, certificate.Name); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateSubject, certificate.Properties.Subject); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateThumbprint, certificate.Properties.Thumbprint); + Assert.Equal(IotHubTestUtilities.DefaultIotHubCertificateType, certificate.Type); + Assert.False(certificate.Properties.IsVerified); + + // Delete certificate + this.DeleteCertificate(resourceGroup, IotHubTestUtilities.DefaultCertificateIotHubName, IotHubTestUtilities.DefaultIotHubCertificateName, certificate.Etag); + + // Get all certificate after delete + var certificateListAfterDelete = this.GetCertificates(resourceGroup, IotHubTestUtilities.DefaultCertificateIotHubName); + Assert.True(certificateListAfterDelete.Value.Count().Equals(0)); + } + } + RoutingProperties GetIotHubRoutingProperties(ResourceGroup resourceGroup) { var ehConnectionString = this.CreateExternalEH(resourceGroup, location); diff --git a/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubTestBase.cs b/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubTestBase.cs index 219ad6fa919b3..810a4dc292722 100644 --- a/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubTestBase.cs +++ b/src/SDKs/IotHub/IotHub.Tests/ScenarioTests/IotHubTestBase.cs @@ -15,8 +15,8 @@ namespace IotHub.Tests.ScenarioTests using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.Azure.Management.IotHub; using Microsoft.Azure.Management.IotHub.Models; - using Microsoft.Azure.Management.Resources; - using Microsoft.Azure.Management.Resources.Models; + using Microsoft.Azure.Management.ResourceManager; + using Microsoft.Azure.Management.ResourceManager.Models; using IotHub.Tests.Helpers; using Xunit; @@ -183,8 +183,6 @@ protected IotHubDescription CreateIotHub(ResourceGroup resourceGroup, string loc createIotHubDescription); } - - protected IotHubDescription UpdateIotHub(ResourceGroup resourceGroup, IotHubDescription iotHubDescription, string iotHubName) { return this.iotHubClient.IotHubResource.CreateOrUpdate( @@ -201,5 +199,31 @@ protected ResourceGroup CreateResourceGroup(string resourceGroupName) Location = IotHubTestUtilities.DefaultLocation }); } + + protected CertificateDescription CreateCertificate(ResourceGroup resourceGroup, string iotHubName, string certificateName, string certificateBodyDescriptionContent) + { + var createCertificateBodyDescription = new CertificateBodyDescription(certificateBodyDescriptionContent); + + return this.iotHubClient.Certificates.CreateOrUpdate( + resourceGroup.Name, + iotHubName, + certificateName, + createCertificateBodyDescription); + } + + protected CertificateListDescription GetCertificates(ResourceGroup resourceGroup, string iotHubName) + { + return this.iotHubClient.Certificates.ListByIotHub(resourceGroup.Name, iotHubName); + } + + protected CertificateDescription GetCertificate(ResourceGroup resourceGroup, string iotHubName, string certificateName) + { + return this.iotHubClient.Certificates.Get(resourceGroup.Name, iotHubName, certificateName); + } + + protected void DeleteCertificate(ResourceGroup resourceGroup, string iotHubName, string certificateName, string Etag) + { + this.iotHubClient.Certificates.Delete(resourceGroup.Name, iotHubName, certificateName, Etag); + } } } diff --git a/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCertificateLifeCycle.json b/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCertificateLifeCycle.json new file mode 100644 index 0000000000000..79044a79596d5 --- /dev/null +++ b/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCertificateLifeCycle.json @@ -0,0 +1,786 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/DotNetCertificateHubRG?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlZ3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkc/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"WestUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ], + "x-ms-client-request-id": [ + "5dd449ac-0268-49b2-964a-589470011ae6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG\",\r\n \"name\": \"DotNetCertificateHubRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:28:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "7214bcdf-1155-4ad8-a866-afac22f707f0" + ], + "x-ms-correlation-request-id": [ + "7214bcdf-1155-4ad8-a866-afac22f707f0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002804Z:7214bcdf-1155-4ad8-a866-afac22f707f0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkNameAvailability?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"Name\": \"DotNetCertificateHub\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "38" + ], + "x-ms-client-request-id": [ + "61881fa3-bc44-4f36-b082-dc55e1a9b2ca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"Invalid\",\r\n \"message\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:28:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "aaee0773-f828-4924-9056-46dbcce3ef37" + ], + "x-ms-correlation-request-id": [ + "aaee0773-f828-4924-9056-46dbcce3ef37" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002805Z:aaee0773-f828-4924-9056-46dbcce3ef37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWI/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetCertificateHubRG\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"WestUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "191" + ], + "x-ms-client-request-id": [ + "5440590f-4dab-4e15-8aa4-de2227ba0fed" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub\",\r\n \"name\": \"DotNetCertificateHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetCertificateHubRG\",\r\n \"properties\": {\r\n \"state\": \"Activating\",\r\n \"provisioningState\": \"Accepted\",\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "678" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:28:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/operationResults/b3NfaWhfOGJmMGRmYjctZTNiYy00NTUyLTg3ZWMtZDcxNWI0OTI5MGRk?api-version=2017-07-01&asyncinfo" + ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ + "4999" + ], + "x-ms-request-id": [ + "9e8978f2-2e57-460a-97de-563dd3d73fa7" + ], + "x-ms-correlation-request-id": [ + "9e8978f2-2e57-460a-97de-563dd3d73fa7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002810Z:9e8978f2-2e57-460a-97de-563dd3d73fa7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/operationResults/b3NfaWhfOGJmMGRmYjctZTNiYy00NTUyLTg3ZWMtZDcxNWI0OTI5MGRk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvb3BlcmF0aW9uUmVzdWx0cy9iM05mYVdoZk9HSm1NR1JtWWpjdFpUTmlZeTAwTlRVeUxUZzNaV010WkRjeE5XSTBPVEk1TUdSaz9hcGktdmVyc2lvbj0yMDE3LTA3LTAxJmFzeW5jaW5mbw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:28:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14824" + ], + "x-ms-request-id": [ + "7a3163fa-77c3-44e4-95c8-2f1a6def0806" + ], + "x-ms-correlation-request-id": [ + "7a3163fa-77c3-44e4-95c8-2f1a6def0806" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002840Z:7a3163fa-77c3-44e4-95c8-2f1a6def0806" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/operationResults/b3NfaWhfOGJmMGRmYjctZTNiYy00NTUyLTg3ZWMtZDcxNWI0OTI5MGRk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvb3BlcmF0aW9uUmVzdWx0cy9iM05mYVdoZk9HSm1NR1JtWWpjdFpUTmlZeTAwTlRVeUxUZzNaV010WkRjeE5XSTBPVEk1TUdSaz9hcGktdmVyc2lvbj0yMDE3LTA3LTAxJmFzeW5jaW5mbw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:29:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14821" + ], + "x-ms-request-id": [ + "5e40d15c-14bf-4577-ae73-b305a179218f" + ], + "x-ms-correlation-request-id": [ + "5e40d15c-14bf-4577-ae73-b305a179218f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002911Z:5e40d15c-14bf-4577-ae73-b305a179218f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/operationResults/b3NfaWhfOGJmMGRmYjctZTNiYy00NTUyLTg3ZWMtZDcxNWI0OTI5MGRk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvb3BlcmF0aW9uUmVzdWx0cy9iM05mYVdoZk9HSm1NR1JtWWpjdFpUTmlZeTAwTlRVeUxUZzNaV010WkRjeE5XSTBPVEk1TUdSaz9hcGktdmVyc2lvbj0yMDE3LTA3LTAxJmFzeW5jaW5mbw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:29:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14819" + ], + "x-ms-request-id": [ + "cad2d16e-9e34-4d5d-ac3a-350d75cb44d1" + ], + "x-ms-correlation-request-id": [ + "cad2d16e-9e34-4d5d-ac3a-350d75cb44d1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002941Z:cad2d16e-9e34-4d5d-ac3a-350d75cb44d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/operationResults/b3NfaWhfOGJmMGRmYjctZTNiYy00NTUyLTg3ZWMtZDcxNWI0OTI5MGRk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvb3BlcmF0aW9uUmVzdWx0cy9iM05mYVdoZk9HSm1NR1JtWWpjdFpUTmlZeTAwTlRVeUxUZzNaV010WkRjeE5XSTBPVEk1TUdSaz9hcGktdmVyc2lvbj0yMDE3LTA3LTAxJmFzeW5jaW5mbw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14830" + ], + "x-ms-request-id": [ + "5bf423ed-2998-4ed3-92a7-c62c94b1f156" + ], + "x-ms-correlation-request-id": [ + "5bf423ed-2998-4ed3-92a7-c62c94b1f156" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003011Z:5bf423ed-2998-4ed3-92a7-c62c94b1f156" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWI/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub\",\r\n \"name\": \"DotNetCertificateHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetCertificateHubRG\",\r\n \"etag\": \"AAAAAAFD1XM=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"DotNetCertificateHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnetcertificatehub\",\r\n \"endpoint\": \"sb://iothub-ns-dotnetcert-262904-586ba1df29.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnetcertificatehub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-dotnetcert-262904-586ba1df29.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": [],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14829" + ], + "x-ms-request-id": [ + "ba455ef7-2b39-49e8-a61d-8ca212bc80c7" + ], + "x-ms-correlation-request-id": [ + "ba455ef7-2b39-49e8-a61d-8ca212bc80c7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003011Z:ba455ef7-2b39-49e8-a61d-8ca212bc80c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates/DotNetCertificateHubCertificate?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvY2VydGlmaWNhdGVzL0RvdE5ldENlcnRpZmljYXRlSHViQ2VydGlmaWNhdGU/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"certificate\": \"MIIBvjCCAWOgAwIBAgIQG6PoBFT6GLJGNKn/EaxltTAKBggqhkjOPQQDAjAcMRowGAYDVQQDDBFBenVyZSBJb1QgUm9vdCBDQTAeFw0xNzExMDMyMDUyNDZaFw0xNzEyMDMyMTAyNDdaMBwxGjAYBgNVBAMMEUF6dXJlIElvVCBSb290IENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE+CgpnW3K+KRNIi/U6Zqe/Al9m8PExHX2KgakmGTfE04nNBwnSoygWb0ekqpT+Lm+OP56LMMe9ynVNryDEr9OSKOBhjCBgzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMB8GA1UdEQQYMBaCFENOPUF6dXJlIElvVCBSb290IENBMBIGA1UdEwEB/wQIMAYBAf8CAQwwHQYDVR0OBBYEFDjiklfHQzw1G0A33BcmRQTjAivTMAoGCCqGSM49BAMCA0kAMEYCIQCtjJ4bAvoYuDhwr92Kk+OkvpPF+qBFiRfrA/EC4YGtzQIhAO79WPtbUnBQ5fsQnW2aUAT4yJGWL+7l4/qfmqblb96n\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "625" + ], + "x-ms-client-request-id": [ + "c5e9cf7e-9a96-44d5-8a88-45f7cf005bf1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"subject\": \"CN=Azure IoT Root CA\",\r\n \"expiry\": \"Sun, 03 Dec 2017 21:02:47 GMT\",\r\n \"thumbprint\": \"9F0983E8F2DB2DB3582997FEF331247D872DEE32\",\r\n \"isVerified\": false,\r\n \"created\": \"Fri, 10 Nov 2017 00:30:11 GMT\",\r\n \"updated\": \"Fri, 10 Nov 2017 00:30:11 GMT\"\r\n },\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates/DotNetCertificateHubCertificate\",\r\n \"name\": \"DotNetCertificateHubCertificate\",\r\n \"type\": \"Microsoft.Devices/IotHubs/Certificates\",\r\n \"etag\": \"AAAAAAFD1X8=\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "2277fee4-3511-4a70-b215-9f6533c31fe6" + ], + "x-ms-correlation-request-id": [ + "2277fee4-3511-4a70-b215-9f6533c31fe6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003012Z:2277fee4-3511-4a70-b215-9f6533c31fe6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvY2VydGlmaWNhdGVzP2FwaS12ZXJzaW9uPTIwMTctMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b482bf47-af28-43f7-91f4-92067a2f20f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"subject\": \"CN=Azure IoT Root CA\",\r\n \"expiry\": \"Sun, 03 Dec 2017 21:02:47 GMT\",\r\n \"thumbprint\": \"9F0983E8F2DB2DB3582997FEF331247D872DEE32\",\r\n \"isVerified\": false,\r\n \"created\": \"Fri, 10 Nov 2017 00:30:11 GMT\",\r\n \"updated\": \"Fri, 10 Nov 2017 00:30:11 GMT\"\r\n },\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates/DotNetCertificateHubCertificate\",\r\n \"name\": \"DotNetCertificateHubCertificate\",\r\n \"type\": \"Microsoft.Devices/IotHubs/Certificates\",\r\n \"etag\": \"AAAAAAFD1X8=\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14827" + ], + "x-ms-request-id": [ + "6a0d1aa6-d4f3-4fb8-96ca-ebf44eefa9c5" + ], + "x-ms-correlation-request-id": [ + "6a0d1aa6-d4f3-4fb8-96ca-ebf44eefa9c5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003012Z:6a0d1aa6-d4f3-4fb8-96ca-ebf44eefa9c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvY2VydGlmaWNhdGVzP2FwaS12ZXJzaW9uPTIwMTctMDctMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "831e4c10-9831-4027-8c48-88267864ac1e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14825" + ], + "x-ms-request-id": [ + "cac1c8f5-2f19-4c10-b7af-4ca0753127d9" + ], + "x-ms-correlation-request-id": [ + "cac1c8f5-2f19-4c10-b7af-4ca0753127d9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003014Z:cac1c8f5-2f19-4c10-b7af-4ca0753127d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates/DotNetCertificateHubCertificate?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvY2VydGlmaWNhdGVzL0RvdE5ldENlcnRpZmljYXRlSHViQ2VydGlmaWNhdGU/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43b93d3f-23e8-461c-ab9c-ae35f548ba2b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"subject\": \"CN=Azure IoT Root CA\",\r\n \"expiry\": \"Sun, 03 Dec 2017 21:02:47 GMT\",\r\n \"thumbprint\": \"9F0983E8F2DB2DB3582997FEF331247D872DEE32\",\r\n \"isVerified\": false,\r\n \"created\": \"Fri, 10 Nov 2017 00:30:11 GMT\",\r\n \"updated\": \"Fri, 10 Nov 2017 00:30:11 GMT\"\r\n },\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates/DotNetCertificateHubCertificate\",\r\n \"name\": \"DotNetCertificateHubCertificate\",\r\n \"type\": \"Microsoft.Devices/IotHubs/Certificates\",\r\n \"etag\": \"AAAAAAFD1X8=\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14826" + ], + "x-ms-request-id": [ + "7375bfc1-c4bb-4790-801f-3891e7eea250" + ], + "x-ms-correlation-request-id": [ + "7375bfc1-c4bb-4790-801f-3891e7eea250" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003013Z:7375bfc1-c4bb-4790-801f-3891e7eea250" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetCertificateHubRG/providers/Microsoft.Devices/IotHubs/DotNetCertificateHub/certificates/DotNetCertificateHubCertificate?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldENlcnRpZmljYXRlSHViUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5EZXZpY2VzL0lvdEh1YnMvRG90TmV0Q2VydGlmaWNhdGVIdWIvY2VydGlmaWNhdGVzL0RvdE5ldENlcnRpZmljYXRlSHViQ2VydGlmaWNhdGU/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4134f5a7-b801-4782-af21-c6e26bc22b97" + ], + "If-Match": [ + "AAAAAAFD1X8=" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:30:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "84fc8062-07a2-43ed-94c9-a1fdf434a93d" + ], + "x-ms-correlation-request-id": [ + "84fc8062-07a2-43ed-94c9-a1fdf434a93d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T003013Z:84fc8062-07a2-43ed-94c9-a1fdf434a93d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" + } +} \ No newline at end of file diff --git a/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCreateLifeCycle.json b/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCreateLifeCycle.json index 1a645f6964faf..d21ba73a40497 100644 --- a/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCreateLifeCycle.json +++ b/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubCreateLifeCycle.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/DotNetHubRG?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlZ3JvdXBzL0RvdE5ldEh1YlJHP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/DotNetHubRG?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlZ3JvdXBzL0RvdE5ldEh1YlJHP2FwaS12ZXJzaW9uPTIwMTctMDUtMTA=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { @@ -13,21 +13,18 @@ "28" ], "x-ms-client-request-id": [ - "cb2731f5-c924-4268-a76e-e82d1b15cbd2" + "39cdc401-9a8a-4f1c-8eba-f63ac2848bb8" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG\",\r\n \"name\": \"DotNetHubRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "ResponseHeaders": { - "Content-Length": [ - "175" - ], "Content-Type": [ "application/json; charset=utf-8" ], @@ -38,32 +35,38 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:42:21 GMT" + "Thu, 09 Nov 2017 23:56:37 GMT" ], "Pragma": [ "no-cache" ], + "Transfer-Encoding": [ + "chunked" + ], + "Vary": [ + "Accept-Encoding" + ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "1194" ], "x-ms-request-id": [ - "3f11a8a7-3d0a-4704-a858-49eca25342d5" + "cb06790c-fd2a-43cf-a26c-d811665f4ca1" ], "x-ms-correlation-request-id": [ - "3f11a8a7-3d0a-4704-a858-49eca25342d5" + "cb06790c-fd2a-43cf-a26c-d811665f4ca1" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204222Z:3f11a8a7-3d0a-4704-a858-49eca25342d5" + "WESTUS2:20171109T235637Z:cb06790c-fd2a-43cf-a26c-d811665f4ca1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ] }, - "StatusCode": 201 + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkNameAvailability?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkNameAvailability?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", "RequestMethod": "POST", "RequestBody": "{\r\n \"Name\": \"DotNetHub\"\r\n}", "RequestHeaders": { @@ -74,14 +77,14 @@ "27" ], "x-ms-client-request-id": [ - "d3343b50-d7eb-431c-8018-0b3ddf05ff44" + "dce49109-f63d-464a-9476-821b0101507a" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"Invalid\",\r\n \"message\": null\r\n}", @@ -96,7 +99,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:42:22 GMT" + "Thu, 09 Nov 2017 23:56:37 GMT" ], "Pragma": [ "no-cache" @@ -111,16 +114,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" + "1195" ], "x-ms-request-id": [ - "3c66473b-f563-4f26-814e-52852cb5a156" + "9a1d0c72-57aa-43ec-892c-3a2d83aea8a9" ], "x-ms-correlation-request-id": [ - "3c66473b-f563-4f26-814e-52852cb5a156" + "9a1d0c72-57aa-43ec-892c-3a2d83aea8a9" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204222Z:3c66473b-f563-4f26-814e-52852cb5a156" + "WESTUS2:20171109T235638Z:9a1d0c72-57aa-43ec-892c-3a2d83aea8a9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -141,14 +144,14 @@ "95" ], "x-ms-client-request-id": [ - "71e07713-257d-4bc0-a1a0-0f1283c25f42" + "6a837b0c-4aca-4025-b3ad-f1d33cf5ccc5" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", @@ -163,7 +166,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:42:24 GMT" + "Thu, 09 Nov 2017 23:57:11 GMT" ], "Pragma": [ "no-cache" @@ -179,19 +182,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "59f2c175-74d8-4100-b50f-30fc366ede18_M0_M0" + "9e290b44-7d1d-4ac7-8697-a801afa29bd3_M7_M7" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" + "1193" ], "x-ms-correlation-request-id": [ - "5243f182-77bf-4e0e-b773-90d73d966531" + "4dea4230-1ae6-43d1-873c-392666d388e1" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204224Z:5243f182-77bf-4e0e-b773-90d73d966531" + "WESTUS2:20171109T235712Z:4dea4230-1ae6-43d1-873c-392666d388e1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -206,11 +209,11 @@ "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:42:24.653Z\",\r\n \"serviceBusEndpoint\": \"https://iothubcsharpsdkehnamespacetest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-506\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-05-02T20:42:44.877Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-09T19:04:46.627Z\",\r\n \"serviceBusEndpoint\": \"https://iothubcsharpsdkehnamespacetest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-508\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-11-09T23:57:10.907Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -222,7 +225,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:42:54 GMT" + "Thu, 09 Nov 2017 23:57:42 GMT" ], "Pragma": [ "no-cache" @@ -238,19 +241,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "e10b967b-893f-463c-a3fa-6b7e0dd8a724_M0_M0" + "d2ee2b1d-d13e-4a44-a358-21a660640a41_M7_M7" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14966" + "14935" ], "x-ms-correlation-request-id": [ - "8e0fafcb-55d0-43d3-a178-2370e2cda67c" + "d78120aa-c69b-4fe1-a495-4fa01fcea498" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204255Z:8e0fafcb-55d0-43d3-a178-2370e2cda67c" + "WESTUS2:20171109T235742Z:d78120aa-c69b-4fe1-a495-4fa01fcea498" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -271,17 +274,17 @@ "28" ], "x-ms-client-request-id": [ - "26227a6c-88e4-4f0d-b7df-ddd56eccd04c" + "819f9f6f-8ac4-4baf-bfa6-b5e95b55df55" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest/eventhubs/iothubcsharpsdkehtest\",\r\n \"name\": \"iothubcsharpsdkehtest\",\r\n \"type\": \"Microsoft.EventHub/EventHubs\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"messageRetentionInDays\": 7,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:42:54.84Z\",\r\n \"updatedAt\": \"2017-05-02T20:43:00.56Z\",\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest/eventhubs/iothubcsharpsdkehtest\",\r\n \"name\": \"iothubcsharpsdkehtest\",\r\n \"type\": \"Microsoft.EventHub/EventHubs\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"iothubcsharpsdkehtest\",\r\n \"messageRetentionInDays\": 7,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-09T23:57:46.58Z\",\r\n \"updatedAt\": \"2017-11-09T23:57:51.47Z\",\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -293,7 +296,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:07 GMT" + "Thu, 09 Nov 2017 23:57:54 GMT" ], "Pragma": [ "no-cache" @@ -309,19 +312,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "75edb115-231a-438e-9a44-64305324d9c4_M0_M0" + "1cd14eea-c8a1-4e7d-8fe8-4ab3484800b0_M7_M7" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" + "1190" ], "x-ms-correlation-request-id": [ - "db2c8613-b625-499b-b8de-1241be6ca5da" + "e928bcb4-0acf-4eaf-867b-aaf092af8d0d" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204308Z:db2c8613-b625-499b-b8de-1241be6ca5da" + "WESTUS2:20171109T235754Z:e928bcb4-0acf-4eaf-867b-aaf092af8d0d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -342,14 +345,14 @@ "108" ], "x-ms-client-request-id": [ - "1be1fd02-dfae-45dc-97e8-e464bbcdbe9c" + "f28062db-2c8d-427b-952a-4fb84b5ec701" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest/eventhubs/iothubcsharpsdkehtest/authorizationRules/iothubcsharpsdkehtestrule\",\r\n \"name\": \"iothubcsharpsdkehtestrule\",\r\n \"type\": \"Microsoft.EventHub/AuthorizationRules\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\",\r\n \"Listen\"\r\n ]\r\n }\r\n}", @@ -364,7 +367,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:12 GMT" + "Thu, 09 Nov 2017 23:57:59 GMT" ], "Pragma": [ "no-cache" @@ -380,19 +383,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "95cf9f6b-24bb-4acb-a50c-871350332687_M0_M0" + "dcddbceb-0943-49b9-8d87-30a905769081_M7_M7" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" + "1189" ], "x-ms-correlation-request-id": [ - "aa75af96-b4bc-4813-bfe7-879a3f1ac4d0" + "41e6459f-dfe8-4c3b-a829-1bbf1910e7f7" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204313Z:aa75af96-b4bc-4813-bfe7-879a3f1ac4d0" + "WESTUS2:20171109T235800Z:41e6459f-dfe8-4c3b-a829-1bbf1910e7f7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -407,17 +410,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "8a97d9a9-f9fc-4189-a1fc-b3215fb3da70" + "e5194ae5-0339-4709-a7f4-dc461ee88e84" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Bx3JHw9KjQ6Vfr7cDvIw/klp/Ji+COyNnZwfRfgqW8k=;EntityPath=iothubcsharpsdkehtest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=RSlJEpGeTcSt1VjOJw0aLcM1X4jSfx7MnKkjjCgGKWw=;EntityPath=iothubcsharpsdkehtest\",\r\n \"primaryKey\": \"Bx3JHw9KjQ6Vfr7cDvIw/klp/Ji+COyNnZwfRfgqW8k=\",\r\n \"secondaryKey\": \"RSlJEpGeTcSt1VjOJw0aLcM1X4jSfx7MnKkjjCgGKWw=\",\r\n \"keyName\": \"iothubcsharpsdkehtestrule\"\r\n}", + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=O5sxnmMYZQsE6xkmBNcjz2/MUCK0+V0uCpvsteayRJ0=;EntityPath=iothubcsharpsdkehtest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=8DfP18Fw5AudllVyrc/n+1FGDgOtAhHKN1FUVXrLaWQ=;EntityPath=iothubcsharpsdkehtest\",\r\n \"primaryKey\": \"O5sxnmMYZQsE6xkmBNcjz2/MUCK0+V0uCpvsteayRJ0=\",\r\n \"secondaryKey\": \"8DfP18Fw5AudllVyrc/n+1FGDgOtAhHKN1FUVXrLaWQ=\",\r\n \"keyName\": \"iothubcsharpsdkehtestrule\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -429,7 +432,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:13 GMT" + "Thu, 09 Nov 2017 23:58:00 GMT" ], "Pragma": [ "no-cache" @@ -445,19 +448,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "7b301afb-cc36-4e3c-ba67-2eac718d91a2_M0_M0" + "9042f03f-917c-4ace-a4ed-6128491e53db_M7_M7" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "1188" ], "x-ms-correlation-request-id": [ - "5d2092dc-0b6b-4424-9079-c8038dd54fc1" + "08aae8e2-0f45-4feb-8ee4-4c9b4f839e38" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204313Z:5d2092dc-0b6b-4424-9079-c8038dd54fc1" + "WESTUS2:20171109T235800Z:08aae8e2-0f45-4feb-8ee4-4c9b4f839e38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -478,14 +481,14 @@ "95" ], "x-ms-client-request-id": [ - "e83afc6a-cb4d-4a3a-a78f-3bccef0cee46" + "e0ba0c7a-b571-4fc5-b650-ead777239d31" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest\",\r\n \"name\": \"iotHubCSharpSDKSBNamespaceTest\",\r\n \"type\": \"Microsoft.ServiceBus/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Messaging\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdksbnamespacetest\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Messaging\",\r\n \"messagingSku\": 2\r\n }\r\n}", @@ -500,7 +503,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:14 GMT" + "Thu, 09 Nov 2017 23:58:02 GMT" ], "Pragma": [ "no-cache" @@ -516,19 +519,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "7db51147-1a5d-4b02-902d-c934e6ec707f_M0_M0" + "1fd6de52-2b55-4be7-b4e1-1a0e6f746337_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" + "1190" ], "x-ms-correlation-request-id": [ - "4c7e8448-6e87-4da8-8d91-6ae7ab7655f0" + "19ba4bb6-7943-491a-9127-408e287eaf78" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204315Z:4c7e8448-6e87-4da8-8d91-6ae7ab7655f0" + "WESTUS2:20171109T235802Z:19ba4bb6-7943-491a-9127-408e287eaf78" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -543,11 +546,11 @@ "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest\",\r\n \"name\": \"iotHubCSharpSDKSBNamespaceTest\",\r\n \"type\": \"Microsoft.ServiceBus/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Messaging\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdksbnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:43:15.78Z\",\r\n \"serviceBusEndpoint\": \"https://iotHubCSharpSDKSBNamespaceTest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-008\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-05-02T20:43:40.577Z\",\r\n \"namespaceType\": \"Messaging\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest\",\r\n \"name\": \"iotHubCSharpSDKSBNamespaceTest\",\r\n \"type\": \"Microsoft.ServiceBus/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Messaging\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdksbnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-09T23:58:01.08Z\",\r\n \"serviceBusEndpoint\": \"https://iotHubCSharpSDKSBNamespaceTest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-010\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-11-09T23:58:26.843Z\",\r\n \"namespaceType\": \"Messaging\",\r\n \"messagingSku\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -559,7 +562,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:44 GMT" + "Thu, 09 Nov 2017 23:58:32 GMT" ], "Pragma": [ "no-cache" @@ -575,19 +578,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "a3f6662d-590a-42e9-91e5-00be37aaeb70_M0_M0" + "3622830f-3e55-4a0a-9c02-f80af57e6d60_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14950" + "14904" ], "x-ms-correlation-request-id": [ - "1ebff666-dd06-4ccf-9936-a74acda8b75b" + "1f7e5262-fc6d-4c26-9926-4022aeb51f00" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204345Z:1ebff666-dd06-4ccf-9936-a74acda8b75b" + "WESTUS2:20171109T235833Z:1f7e5262-fc6d-4c26-9926-4022aeb51f00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -608,17 +611,17 @@ "28" ], "x-ms-client-request-id": [ - "d90feaf9-00d9-40ba-b8ab-309cada096ba" + "cdc9cd76-f44f-4eea-8c5f-6bbf014c49ef" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/queues/iotHubCSharpSDKSBTest\",\r\n \"name\": \"iotHubCSharpSDKSBTest\",\r\n \"type\": \"Microsoft.ServiceBus/Queues\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"lockDuration\": \"00:01:00\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"requiresSession\": false,\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"deadLetteringOnMessageExpiration\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"maxDeliveryCount\": 10,\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"messageCount\": 0,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:43:45.63Z\",\r\n \"updatedAt\": \"2017-05-02T20:43:45.77Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableExpress\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/queues/iotHubCSharpSDKSBTest\",\r\n \"name\": \"iotHubCSharpSDKSBTest\",\r\n \"type\": \"Microsoft.ServiceBus/Queues\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"iotHubCSharpSDKSBTest\",\r\n \"lockDuration\": \"00:01:00\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"requiresSession\": false,\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"deadLetteringOnMessageExpiration\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"maxDeliveryCount\": 10,\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"messageCount\": 0,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-09T23:58:33.787Z\",\r\n \"updatedAt\": \"2017-11-09T23:58:33.803Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableExpress\": false\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -630,7 +633,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:46 GMT" + "Thu, 09 Nov 2017 23:58:35 GMT" ], "Pragma": [ "no-cache" @@ -646,19 +649,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "17038d4f-7ccf-4350-900c-6b10c0462103_M0_M0" + "52a23269-4cdf-46ef-8819-f7b38843ea60_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1190" + "1189" ], "x-ms-correlation-request-id": [ - "d5d252e1-b401-45c9-b58d-abe42d18a2f2" + "623e7aef-66a4-41ab-be0a-e264a837f6c6" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204347Z:d5d252e1-b401-45c9-b58d-abe42d18a2f2" + "WESTUS2:20171109T235835Z:623e7aef-66a4-41ab-be0a-e264a837f6c6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -679,17 +682,17 @@ "28" ], "x-ms-client-request-id": [ - "5efbcda0-ccd8-44d6-93db-4738962d2eaa" + "4adac677-d038-4048-ad24-0feb1515e047" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/topics/iotHubCSharpSDKTopicTest\",\r\n \"name\": \"iotHubCSharpSDKTopicTest\",\r\n \"type\": \"Microsoft.ServiceBus/Topic\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"filteringMessagesBeforePublishing\": false,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:43:47.897Z\",\r\n \"updatedAt\": \"2017-05-02T20:43:47.927Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"isExpress\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableSubscriptionPartitioning\": false,\r\n \"enableExpress\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/topics/iotHubCSharpSDKTopicTest\",\r\n \"name\": \"iotHubCSharpSDKTopicTest\",\r\n \"type\": \"Microsoft.ServiceBus/Topic\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"iotHubCSharpSDKTopicTest\",\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"filteringMessagesBeforePublishing\": false,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-09T23:58:35.85Z\",\r\n \"updatedAt\": \"2017-11-09T23:58:35.927Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"isExpress\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableSubscriptionPartitioning\": false,\r\n \"enableExpress\": false\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -701,7 +704,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:48 GMT" + "Thu, 09 Nov 2017 23:58:37 GMT" ], "Pragma": [ "no-cache" @@ -717,19 +720,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "1ebefd28-6e60-48c1-a406-6e34a062d2ae_M0_M0" + "6e8ddba8-d2c0-4167-aa83-c88e16e458b5_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1189" + "1188" ], "x-ms-correlation-request-id": [ - "8609fbfb-556c-4707-9a6b-518ec2beca1e" + "c1501f50-32c6-4aec-9b13-fa65e9afe7bd" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204349Z:8609fbfb-556c-4707-9a6b-518ec2beca1e" + "WESTUS2:20171109T235837Z:c1501f50-32c6-4aec-9b13-fa65e9afe7bd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -750,14 +753,14 @@ "108" ], "x-ms-client-request-id": [ - "7b61a420-1988-4b50-bf34-bdf06778cf12" + "179cfb13-8cf7-47fc-9e50-d4be8d14d5cf" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/queues/iotHubCSharpSDKSBTest/authorizationRules/iotHubCSharpSDKSBTopicTestRule\",\r\n \"name\": \"iotHubCSharpSDKSBTopicTestRule\",\r\n \"type\": \"Microsoft.ServiceBus/AuthorizationRules\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\",\r\n \"Listen\"\r\n ]\r\n }\r\n}", @@ -772,7 +775,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:43:53 GMT" + "Thu, 09 Nov 2017 23:58:42 GMT" ], "Pragma": [ "no-cache" @@ -788,19 +791,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "74a0fd6b-6f9e-4fa7-91b0-2ab0d3fe1f27_M0_M0" + "797a5614-1134-4993-88b9-1c233cc73f75_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1188" + "1187" ], "x-ms-correlation-request-id": [ - "5ab77d6a-7a42-4023-8f3e-4174ef1cd393" + "c66e201c-9006-4733-9e90-84f229afd54c" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204354Z:5ab77d6a-7a42-4023-8f3e-4174ef1cd393" + "WESTUS2:20171109T235843Z:c66e201c-9006-4733-9e90-84f229afd54c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -821,14 +824,14 @@ "108" ], "x-ms-client-request-id": [ - "a34c6787-8d89-4be5-bffa-f4de2e2fef0c" + "a0eb2b53-3ad0-4dba-a98f-16c4ce250bd3" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/topics/iotHubCSharpSDKTopicTest/authorizationRules/iotHubCSharpSDKSBTopicTestRule\",\r\n \"name\": \"iotHubCSharpSDKSBTopicTestRule\",\r\n \"type\": \"Microsoft.ServiceBus/AuthorizationRules\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\",\r\n \"Listen\"\r\n ]\r\n }\r\n}", @@ -843,7 +846,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:44:00 GMT" + "Thu, 09 Nov 2017 23:58:48 GMT" ], "Pragma": [ "no-cache" @@ -859,19 +862,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "3ea58ff9-399b-418c-ae62-034a11caec75_M0_M0" + "a04022c2-1e25-46a0-bc2c-c02192d184cf_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1187" + "1186" ], "x-ms-correlation-request-id": [ - "c7acc14a-9d1d-4aae-b0e2-215ef1789713" + "a911d9ad-56d5-4fd7-891a-a556bf9209e1" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204400Z:c7acc14a-9d1d-4aae-b0e2-215ef1789713" + "WESTUS2:20171109T235849Z:a911d9ad-56d5-4fd7-891a-a556bf9209e1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -886,17 +889,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "53dd7eb2-5a0c-43ae-971f-93e39d83022b" + "6214cb9e-280f-4dec-834e-d5f6386f0f3d" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=WrE24PkIL0JjKoYC8mzKRWqVGUq8BPOoOZTxTedJ6PM=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=aI5Ax676IBrpX6gOoc6WPcqpzidcEa/OQTBMod+W8kY=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"primaryKey\": \"WrE24PkIL0JjKoYC8mzKRWqVGUq8BPOoOZTxTedJ6PM=\",\r\n \"secondaryKey\": \"aI5Ax676IBrpX6gOoc6WPcqpzidcEa/OQTBMod+W8kY=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=K0Y8nRACvEku1w1xxLGsVSa6Dp5zXIKI3eroWiV/imU=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=G1+H0hdRdNSsS9mStbzMHRG1tJ+i/flm8Q+0vbUU7A4=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"primaryKey\": \"K0Y8nRACvEku1w1xxLGsVSa6Dp5zXIKI3eroWiV/imU=\",\r\n \"secondaryKey\": \"G1+H0hdRdNSsS9mStbzMHRG1tJ+i/flm8Q+0vbUU7A4=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -908,7 +911,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:44:00 GMT" + "Thu, 09 Nov 2017 23:58:48 GMT" ], "Pragma": [ "no-cache" @@ -924,19 +927,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "d89cd383-88eb-46b9-b711-c449a8d5c03f_M0_M0" + "a1e561b9-3489-4388-935d-20cd43e3c275_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1186" + "1185" ], "x-ms-correlation-request-id": [ - "a104827a-d30b-4c64-9295-f67ee6db46aa" + "cf7389a1-0952-441d-bb58-77e8fb9ad43c" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204400Z:a104827a-d30b-4c64-9295-f67ee6db46aa" + "WESTUS2:20171109T235849Z:cf7389a1-0952-441d-bb58-77e8fb9ad43c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -951,17 +954,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "88ef2082-8299-48ee-b578-ca2316713b32" + "8f763f09-90ec-4023-9788-455cf52debde" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=5s04XbxU1gL8Y5MYQ45mktspzgt8hQ+VobCLN7DMDV0=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=y8QwMeNho7iCqSR7BcCWgVwpPCNW+kiiFpSoxkxaUkU=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"primaryKey\": \"5s04XbxU1gL8Y5MYQ45mktspzgt8hQ+VobCLN7DMDV0=\",\r\n \"secondaryKey\": \"y8QwMeNho7iCqSR7BcCWgVwpPCNW+kiiFpSoxkxaUkU=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ECOnT33s0uC0HjDdzmCWkAPzvU5mbKY5pUocbHGiZTQ=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=878XJnZUjJiqM89/9vENnqxdIqL9AtucYq8eVSRdnWs=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"primaryKey\": \"ECOnT33s0uC0HjDdzmCWkAPzvU5mbKY5pUocbHGiZTQ=\",\r\n \"secondaryKey\": \"878XJnZUjJiqM89/9vENnqxdIqL9AtucYq8eVSRdnWs=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -973,7 +976,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:44:00 GMT" + "Thu, 09 Nov 2017 23:58:49 GMT" ], "Pragma": [ "no-cache" @@ -989,19 +992,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "ec398d7c-3269-4158-853f-4f87ec0b8ecd_M0_M0" + "fa4122a2-f16f-488a-bcaf-10bf9146a68d_M3_M3" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1185" + "1184" ], "x-ms-correlation-request-id": [ - "d6f48f6e-c718-4dac-bceb-fb14f9739212" + "f441b4c6-4457-4474-aff7-227d60f4aea1" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204401Z:d6f48f6e-c718-4dac-bceb-fb14f9739212" + "WESTUS2:20171109T235849Z:f441b4c6-4457-4474-aff7-227d60f4aea1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1010,10 +1013,10 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"properties\": {\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=WrE24PkIL0JjKoYC8mzKRWqVGUq8BPOoOZTxTedJ6PM=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=5s04XbxU1gL8Y5MYQ45mktspzgt8hQ+VobCLN7DMDV0=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Bx3JHw9KjQ6Vfr7cDvIw/klp/Ji+COyNnZwfRfgqW8k=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ]\r\n }\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"WestUS\"\r\n}", + "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"properties\": {\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=K0Y8nRACvEku1w1xxLGsVSa6Dp5zXIKI3eroWiV/imU=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ECOnT33s0uC0HjDdzmCWkAPzvU5mbKY5pUocbHGiZTQ=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=O5sxnmMYZQsE6xkmBNcjz2/MUCK0+V0uCpvsteayRJ0=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ]\r\n }\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1022,20 +1025,20 @@ "2180" ], "x-ms-client-request-id": [ - "4121ef69-7194-4787-acd3-c486cbb83efa" + "63111b40-9b72-4254-a363-90093597fdaf" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"DotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"properties\": {\r\n \"state\": \"Activating\",\r\n \"provisioningState\": \"Accepted\",\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=WrE24PkIL0JjKoYC8mzKRWqVGUq8BPOoOZTxTedJ6PM=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"f9ff1d08-4f43-4fe6-bd23-168a8bc4f47c\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=5s04XbxU1gL8Y5MYQ45mktspzgt8hQ+VobCLN7DMDV0=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"8f05f087-c932-49cb-8b51-c21b5d2d0218\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Bx3JHw9KjQ6Vfr7cDvIw/klp/Ji+COyNnZwfRfgqW8k=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"87939828-abe5-47e3-9e09-6068af2d2d8a\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"DotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"properties\": {\r\n \"state\": \"Activating\",\r\n \"provisioningState\": \"Accepted\",\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=K0Y8nRACvEku1w1xxLGsVSa6Dp5zXIKI3eroWiV/imU=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"0c310504-f8d9-4087-8fab-e23640b42889\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ECOnT33s0uC0HjDdzmCWkAPzvU5mbKY5pUocbHGiZTQ=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"ef1d9e91-2edf-47eb-844d-d54c68b84a6a\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=O5sxnmMYZQsE6xkmBNcjz2/MUCK0+V0uCpvsteayRJ0=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"c5edfec5-1014-421b-b244-e7456f261850\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "2174" + "2176" ], "Content-Type": [ "application/json; charset=utf-8" @@ -1047,7 +1050,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:44:03 GMT" + "Thu, 09 Nov 2017 23:58:55 GMT" ], "Pragma": [ "no-cache" @@ -1056,19 +1059,19 @@ "Microsoft-HTTPAPI/2.0" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo" + "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "4999" ], "x-ms-request-id": [ - "c4922da0-c761-4daa-a0cf-fe2945e239c5" + "293e989d-96f1-471f-8e17-c140c1362594" ], "x-ms-correlation-request-id": [ - "c4922da0-c761-4daa-a0cf-fe2945e239c5" + "293e989d-96f1-471f-8e17-c140c1362594" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204404Z:c4922da0-c761-4daa-a0cf-fe2945e239c5" + "WESTUS2:20171109T235856Z:293e989d-96f1-471f-8e17-c140c1362594" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1077,14 +1080,14 @@ "StatusCode": 201 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmWkdVNVlqVTNaV010TVRZek9TMDBaVGN3TFdJM01qVXRaR1E1Wm1FM01UbG1ZVFpsP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -1099,7 +1102,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:44:34 GMT" + "Thu, 09 Nov 2017 23:59:25 GMT" ], "Pragma": [ "no-cache" @@ -1114,16 +1117,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14949" + "14934" ], "x-ms-request-id": [ - "722e0e13-c817-48c8-a13c-d6df30db30c7" + "6df49c45-848a-4dca-a221-10dee15c802f" ], "x-ms-correlation-request-id": [ - "722e0e13-c817-48c8-a13c-d6df30db30c7" + "6df49c45-848a-4dca-a221-10dee15c802f" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204434Z:722e0e13-c817-48c8-a13c-d6df30db30c7" + "WESTUS2:20171109T235926Z:6df49c45-848a-4dca-a221-10dee15c802f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1132,14 +1135,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmWkdVNVlqVTNaV010TVRZek9TMDBaVGN3TFdJM01qVXRaR1E1Wm1FM01UbG1ZVFpsP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -1154,7 +1157,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:45:04 GMT" + "Thu, 09 Nov 2017 23:59:55 GMT" ], "Pragma": [ "no-cache" @@ -1169,16 +1172,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14950" + "14933" ], "x-ms-request-id": [ - "560ac6ae-308c-4652-bdcc-2d8a74733005" + "685f9b18-3c32-46e1-904b-d26e97c12c9e" ], "x-ms-correlation-request-id": [ - "560ac6ae-308c-4652-bdcc-2d8a74733005" + "685f9b18-3c32-46e1-904b-d26e97c12c9e" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204504Z:560ac6ae-308c-4652-bdcc-2d8a74733005" + "WESTUS2:20171109T235956Z:685f9b18-3c32-46e1-904b-d26e97c12c9e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1187,14 +1190,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmWkdVNVlqVTNaV010TVRZek9TMDBaVGN3TFdJM01qVXRaR1E1Wm1FM01UbG1ZVFpsP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -1209,7 +1212,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:45:34 GMT" + "Fri, 10 Nov 2017 00:00:26 GMT" ], "Pragma": [ "no-cache" @@ -1224,16 +1227,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14949" + "14937" ], "x-ms-request-id": [ - "cfcf8af6-7840-459e-b7d8-9630ee8376e1" + "772fb1ef-f5ed-4dbd-a24f-feefeadb2163" ], "x-ms-correlation-request-id": [ - "cfcf8af6-7840-459e-b7d8-9630ee8376e1" + "772fb1ef-f5ed-4dbd-a24f-feefeadb2163" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204534Z:cfcf8af6-7840-459e-b7d8-9630ee8376e1" + "WESTUS2:20171110T000026Z:772fb1ef-f5ed-4dbd-a24f-feefeadb2163" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1242,14 +1245,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmWkdVNVlqVTNaV010TVRZek9TMDBaVGN3TFdJM01qVXRaR1E1Wm1FM01UbG1ZVFpsP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -1264,7 +1267,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:46:04 GMT" + "Fri, 10 Nov 2017 00:00:56 GMT" ], "Pragma": [ "no-cache" @@ -1279,16 +1282,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14947" + "14935" ], "x-ms-request-id": [ - "13d2d199-e064-4242-822d-7e24f71d49ff" + "262db9bc-34e2-4e6b-bf76-5e8098d733f3" ], "x-ms-correlation-request-id": [ - "13d2d199-e064-4242-822d-7e24f71d49ff" + "262db9bc-34e2-4e6b-bf76-5e8098d733f3" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204604Z:13d2d199-e064-4242-822d-7e24f71d49ff" + "WESTUS2:20171110T000056Z:262db9bc-34e2-4e6b-bf76-5e8098d733f3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1297,14 +1300,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmWkdVNVlqVTNaV010TVRZek9TMDBaVGN3TFdJM01qVXRaR1E1Wm1FM01UbG1ZVFpsP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -1319,7 +1322,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:46:34 GMT" + "Fri, 10 Nov 2017 00:01:26 GMT" ], "Pragma": [ "no-cache" @@ -1334,16 +1337,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14946" + "14932" ], "x-ms-request-id": [ - "0655f343-d9f0-461a-a801-d5894021d012" + "13988c91-f94c-4d0f-923e-34d0dd079994" ], "x-ms-correlation-request-id": [ - "0655f343-d9f0-461a-a801-d5894021d012" + "13988c91-f94c-4d0f-923e-34d0dd079994" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204634Z:0655f343-d9f0-461a-a801-d5894021d012" + "WESTUS2:20171110T000126Z:13988c91-f94c-4d0f-923e-34d0dd079994" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1352,17 +1355,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/b3NfaWhfZGU5YjU3ZWMtMTYzOS00ZTcwLWI3MjUtZGQ5ZmE3MTlmYTZl?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmWkdVNVlqVTNaV010TVRZek9TMDBaVGN3TFdJM01qVXRaR1E1Wm1FM01UbG1ZVFpsP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1374,7 +1377,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:47:04 GMT" + "Fri, 10 Nov 2017 00:01:56 GMT" ], "Pragma": [ "no-cache" @@ -1389,16 +1392,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14944" + "14931" ], "x-ms-request-id": [ - "7e48059c-11f0-4d74-9a28-32de07af15e9" + "3151187e-658d-466a-85ce-e8b13cdff42e" ], "x-ms-correlation-request-id": [ - "7e48059c-11f0-4d74-9a28-32de07af15e9" + "3151187e-658d-466a-85ce-e8b13cdff42e" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204705Z:7e48059c-11f0-4d74-9a28-32de07af15e9" + "WESTUS2:20171110T000157Z:3151187e-658d-466a-85ce-e8b13cdff42e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1407,17 +1410,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"DotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"etag\": \"AAAAAAFDsXM=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"DotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-262558-d61eb99485.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-262558-d61eb99485.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"0c310504-f8d9-4087-8fab-e23640b42889\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"ef1d9e91-2edf-47eb-844d-d54c68b84a6a\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"c5edfec5-1014-421b-b244-e7456f261850\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1429,7 +1432,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:47:35 GMT" + "Fri, 10 Nov 2017 00:01:57 GMT" ], "Pragma": [ "no-cache" @@ -1444,16 +1447,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14943" + "14930" ], "x-ms-request-id": [ - "ad14830e-fe60-431e-8ed5-0a4bbfd62c6b" + "a2137fdd-076c-4adc-94dc-20e4ec5d7610" ], "x-ms-correlation-request-id": [ - "ad14830e-fe60-431e-8ed5-0a4bbfd62c6b" + "a2137fdd-076c-4adc-94dc-20e4ec5d7610" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204735Z:ad14830e-fe60-431e-8ed5-0a4bbfd62c6b" + "WESTUS2:20171110T000157Z:a2137fdd-076c-4adc-94dc-20e4ec5d7610" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1462,72 +1465,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/quotaMetrics?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9xdW90YU1ldHJpY3M/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 02 May 2017 20:48:05 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14942" - ], - "x-ms-request-id": [ - "c17c0b28-a0e3-428c-a17e-64f7300a2e5f" - ], - "x-ms-correlation-request-id": [ - "c17c0b28-a0e3-428c-a17e-64f7300a2e5f" + "x-ms-client-request-id": [ + "c2c0c0b8-e0de-4032-8a25-38d3dbfe581d" ], - "x-ms-routing-request-id": [ - "WESTUS2:20170502T204805Z:c17c0b28-a0e3-428c-a17e-64f7300a2e5f" + "accept-language": [ + "en-US" ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"Name\": \"TotalMessages\",\r\n \"CurrentValue\": 0,\r\n \"MaxValue\": 400000\r\n },\r\n {\r\n \"Name\": \"TotalDeviceCount\",\r\n \"CurrentValue\": 0,\r\n \"MaxValue\": 500000\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1539,7 +1493,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:48:35 GMT" + "Fri, 10 Nov 2017 00:01:57 GMT" ], "Pragma": [ "no-cache" @@ -1554,16 +1508,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14941" + "14929" ], "x-ms-request-id": [ - "e96569d7-185b-46c7-85e8-aefe835c2866" + "f36e2140-b61d-490f-aa65-ddf6d264a265" ], "x-ms-correlation-request-id": [ - "e96569d7-185b-46c7-85e8-aefe835c2866" + "f36e2140-b61d-490f-aa65-ddf6d264a265" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204835Z:e96569d7-185b-46c7-85e8-aefe835c2866" + "WESTUS2:20171110T000157Z:f36e2140-b61d-490f-aa65-ddf6d264a265" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1572,72 +1526,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/operationResults/MWYwNzc5MzktYmVhMy00ODk4LThmNjYtMTFjNWJhNTc1ZTAz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL01XWXdOemM1TXprdFltVmhNeTAwT0RrNExUaG1Oall0TVRGak5XSmhOVGMxWlRBej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzP2FwaS12ZXJzaW9uPTIwMTctMDctMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 02 May 2017 20:49:05 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14939" - ], - "x-ms-request-id": [ - "a6a2a2e4-cee8-4ca1-bbcc-b5bf970ae750" - ], - "x-ms-correlation-request-id": [ - "a6a2a2e4-cee8-4ca1-bbcc-b5bf970ae750" + "x-ms-client-request-id": [ + "0f34211e-f297-496a-90d1-da4dd2fb4100" ], - "x-ms-routing-request-id": [ - "WESTUS2:20170502T204905Z:a6a2a2e4-cee8-4ca1-bbcc-b5bf970ae750" + "accept-language": [ + "en-US" ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"DotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"etag\": \"AAAAAADqa4g=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"DotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-155813-ce05581c0c.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-155813-ce05581c0c.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"f9ff1d08-4f43-4fe6-bd23-168a8bc4f47c\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"8f05f087-c932-49cb-8b51-c21b5d2d0218\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"87939828-abe5-47e3-9e09-6068af2d2d8a\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"DotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"etag\": \"AAAAAAFDsXM=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"DotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-262558-d61eb99485.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-262558-d61eb99485.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"0c310504-f8d9-4087-8fab-e23640b42889\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"ef1d9e91-2edf-47eb-844d-d54c68b84a6a\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"c5edfec5-1014-421b-b244-e7456f261850\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1649,7 +1554,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:05 GMT" + "Fri, 10 Nov 2017 00:01:57 GMT" ], "Pragma": [ "no-cache" @@ -1664,16 +1569,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14938" + "14928" ], "x-ms-request-id": [ - "13de6bfc-724a-4254-bee8-3a110ff78c4f" + "73959e7d-f1de-411d-9246-29daebbf4401" ], "x-ms-correlation-request-id": [ - "13de6bfc-724a-4254-bee8-3a110ff78c4f" + "73959e7d-f1de-411d-9246-29daebbf4401" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204905Z:13de6bfc-724a-4254-bee8-3a110ff78c4f" + "WESTUS2:20171110T000157Z:73959e7d-f1de-411d-9246-29daebbf4401" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1682,23 +1587,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/quotaMetrics?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9xdW90YU1ldHJpY3M/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/skus?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9za3VzP2FwaS12ZXJzaW9uPTIwMTctMDctMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "096f850d-1e1c-412b-b0d1-e1e7a46b8365" + "89fabf94-29af-45c1-90c3-822444a8add4" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"Name\": \"TotalMessages\",\r\n \"CurrentValue\": 0,\r\n \"MaxValue\": 400000\r\n },\r\n {\r\n \"Name\": \"TotalDeviceCount\",\r\n \"CurrentValue\": 0,\r\n \"MaxValue\": 500000\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"Microsoft.Devices/IotHubs\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"capacity\": {\r\n \"minimum\": 1,\r\n \"maximum\": 200,\r\n \"default\": 1,\r\n \"scaleType\": \"Manual\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.Devices/IotHubs\",\r\n \"sku\": {\r\n \"name\": \"S2\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"capacity\": {\r\n \"minimum\": 1,\r\n \"maximum\": 200,\r\n \"default\": 1,\r\n \"scaleType\": \"Manual\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.Devices/IotHubs\",\r\n \"sku\": {\r\n \"name\": \"S3\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"capacity\": {\r\n \"minimum\": 1,\r\n \"maximum\": 10,\r\n \"default\": 1,\r\n \"scaleType\": \"Manual\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1710,7 +1615,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:06 GMT" + "Fri, 10 Nov 2017 00:01:58 GMT" ], "Pragma": [ "no-cache" @@ -1725,16 +1630,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14937" + "14927" ], "x-ms-request-id": [ - "8f9eee28-a274-4fcb-b298-75b1cd21cb4d" + "42a9d102-8638-4f3a-b938-8533d21c7d2b" ], "x-ms-correlation-request-id": [ - "8f9eee28-a274-4fcb-b298-75b1cd21cb4d" + "42a9d102-8638-4f3a-b938-8533d21c7d2b" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204906Z:8f9eee28-a274-4fcb-b298-75b1cd21cb4d" + "WESTUS2:20171110T000158Z:42a9d102-8638-4f3a-b938-8533d21c7d2b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1743,23 +1648,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzP2FwaS12ZXJzaW9uPTIwMTctMDEtMTk=", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/listkeys?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9saXN0a2V5cz9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", + "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "022e2bfb-c165-4ebd-ad92-766203a44266" + "c518c304-8cbb-4bfa-b87a-9b1eefc008e1" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"DotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"DotNetHubRG\",\r\n \"etag\": \"AAAAAADqa4g=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"DotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-155813-ce05581c0c.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"dotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-dotnethub-155813-ce05581c0c.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"f9ff1d08-4f43-4fe6-bd23-168a8bc4f47c\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"8f05f087-c932-49cb-8b51-c21b5d2d0218\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"87939828-abe5-47e3-9e09-6068af2d2d8a\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"jr3ME6lHoh7GbmaIQM80qhStKfiSz+eEml7soSK5ErA=\",\r\n \"secondaryKey\": \"gU4jvUpYhI1JE5xF7zszyNWdy9lqlEeBKyc7Q+zArVE=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"efEe+B4Ym6BgBF18R3+t5juryw8rz6HmHQZtEhZ2THE=\",\r\n \"secondaryKey\": \"0N084Ij1tKy3rP6TEb0mLk63ySEv/OP7afUnvl4LFU0=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"MQPcVGkrcIz2xO+P6h3MGAhNrOyL1iw4vVYJ55QzbTo=\",\r\n \"secondaryKey\": \"EmGwzjbLSV90fnt5IK7oXXYT3JXBTYRDlhigPC+9wO4=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"eKyedZPmmt7Ga9YwjOBdVFUGP9cuqDG0QZsB0G7h5T4=\",\r\n \"secondaryKey\": \"jiP0kZy77HFUVCZ7IEnZtxjnO3ZLdSY3Evwp6/RCM/w=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"E8Ul/BucQqfOBptwiTufJCR5TS2tMM0S5MdmdUnhY64=\",\r\n \"secondaryKey\": \"cimq96slrNdTl/ocdE7pLITOnrAofP3YToIFLZEfoMA=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1771,7 +1676,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:06 GMT" + "Fri, 10 Nov 2017 00:01:58 GMT" ], "Pragma": [ "no-cache" @@ -1785,17 +1690,17 @@ "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14936" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" ], "x-ms-request-id": [ - "21e1b6e4-0811-4233-bca1-e9a1ef9651cc" + "3815e662-edf3-4968-b9a9-88573d0114d3" ], "x-ms-correlation-request-id": [ - "21e1b6e4-0811-4233-bca1-e9a1ef9651cc" + "3815e662-edf3-4968-b9a9-88573d0114d3" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204906Z:21e1b6e4-0811-4233-bca1-e9a1ef9651cc" + "WESTUS2:20171110T000158Z:3815e662-edf3-4968-b9a9-88573d0114d3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1804,23 +1709,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/skus?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9za3VzP2FwaS12ZXJzaW9uPTIwMTctMDEtMTk=", - "RequestMethod": "GET", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/IotHubKeys/iothubowner/listkeys?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9Jb3RIdWJLZXlzL2lvdGh1Ym93bmVyL2xpc3RrZXlzP2FwaS12ZXJzaW9uPTIwMTctMDctMDE=", + "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "414ba3aa-8f93-41db-a153-2c0c10c580e0" + "39ae37c7-df89-4746-860b-713313e1d6c7" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"Microsoft.Devices/IotHubs\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"capacity\": {\r\n \"minimum\": 1,\r\n \"maximum\": 200,\r\n \"default\": 1,\r\n \"scaleType\": \"Manual\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.Devices/IotHubs\",\r\n \"sku\": {\r\n \"name\": \"S2\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"capacity\": {\r\n \"minimum\": 1,\r\n \"maximum\": 200,\r\n \"default\": 1,\r\n \"scaleType\": \"Manual\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.Devices/IotHubs\",\r\n \"sku\": {\r\n \"name\": \"S3\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"capacity\": {\r\n \"minimum\": 1,\r\n \"maximum\": 10,\r\n \"default\": 1,\r\n \"scaleType\": \"Manual\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"jr3ME6lHoh7GbmaIQM80qhStKfiSz+eEml7soSK5ErA=\",\r\n \"secondaryKey\": \"gU4jvUpYhI1JE5xF7zszyNWdy9lqlEeBKyc7Q+zArVE=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1832,7 +1737,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:06 GMT" + "Fri, 10 Nov 2017 00:01:59 GMT" ], "Pragma": [ "no-cache" @@ -1846,17 +1751,17 @@ "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14935" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" ], "x-ms-request-id": [ - "25f992b1-c7eb-4303-ad90-d15ea24db0dc" + "3d66c113-d7de-4777-afaf-2755f41e88f1" ], "x-ms-correlation-request-id": [ - "25f992b1-c7eb-4303-ad90-d15ea24db0dc" + "3d66c113-d7de-4777-afaf-2755f41e88f1" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204906Z:25f992b1-c7eb-4303-ad90-d15ea24db0dc" + "WESTUS2:20171110T000159Z:3d66c113-d7de-4777-afaf-2755f41e88f1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1865,23 +1770,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/listkeys?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9saXN0a2V5cz9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", - "RequestMethod": "POST", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHM/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "24244876-90a1-4e07-9721-0b801066d759" + "450f3699-aa9f-4277-bea7-3e5fa3b00321" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"avpeXiFNvLmeYZyVnjlXzJBrWUsh/tN6FmXJzGeagOA=\",\r\n \"secondaryKey\": \"2IAZMVYyjsxr6hf9S9s+ed3YwU+LoF3nTnwBTJo7KUM=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"5UIGpFCSu2IaEBd7I7T04U7t95RNQa/GpIzLF3zGf6I=\",\r\n \"secondaryKey\": \"BJEjDAJ81iM8N8+3wckFCtd2WhcXhr+s0SN8Wk6KIZo=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"T0inxPpSgmn0c+XVNamL4Lr7737HDnqbspXAUts3iEw=\",\r\n \"secondaryKey\": \"b70yRdwufEaliBHtvNroVN2oZBW2f4XphHxpC70sARk=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"Q3QLIlx/MQetpD8U/U0NDHjGjc1G2IrriL7e9ttk/9c=\",\r\n \"secondaryKey\": \"N6bVZs9DZJV5hEnG6WxULQzDx2ABoUuc92OP3Qestyo=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"DHZGl8qgK7BG3t46xQpNfDbuQJQqmuLXQIsF4YuEn7o=\",\r\n \"secondaryKey\": \"TOf8N+eJnXJx56Zk/8jFXrDveKTQApB7UUL2skljWsw=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n \"$Default\"\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1893,7 +1798,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:07 GMT" + "Fri, 10 Nov 2017 00:02:02 GMT" ], "Pragma": [ "no-cache" @@ -1907,17 +1812,17 @@ "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14926" ], "x-ms-request-id": [ - "36623a95-b08f-47de-9ce2-69baf637eacc" + "9651cbd0-94d6-4fa6-98a1-43df3db5aa2f" ], "x-ms-correlation-request-id": [ - "36623a95-b08f-47de-9ce2-69baf637eacc" + "9651cbd0-94d6-4fa6-98a1-43df3db5aa2f" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204907Z:36623a95-b08f-47de-9ce2-69baf637eacc" + "WESTUS2:20171110T000202Z:9651cbd0-94d6-4fa6-98a1-43df3db5aa2f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1926,23 +1831,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/IotHubKeys/iothubowner/listkeys?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9Jb3RIdWJLZXlzL2lvdGh1Ym93bmVyL2xpc3RrZXlzP2FwaS12ZXJzaW9uPTIwMTctMDEtMTk=", - "RequestMethod": "POST", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups/testConsumerGroup?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHMvdGVzdENvbnN1bWVyR3JvdXA/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "PUT", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "e3fb4dd3-1c39-4bbe-94a6-cfffedfd2359" + "e2ba8e7b-146f-4306-b825-51b07f13a1dc" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"avpeXiFNvLmeYZyVnjlXzJBrWUsh/tN6FmXJzGeagOA=\",\r\n \"secondaryKey\": \"2IAZMVYyjsxr6hf9S9s+ed3YwU+LoF3nTnwBTJo7KUM=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n}", + "ResponseBody": "{\r\n \"tags\": null,\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"testConsumerGroup\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1954,7 +1859,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:07 GMT" + "Fri, 10 Nov 2017 00:02:10 GMT" ], "Pragma": [ "no-cache" @@ -1969,16 +1874,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1190" + "1194" ], "x-ms-request-id": [ - "d1ed8fbe-bffc-46fc-82d2-1563ab19aad0" + "0a10383b-a3be-45aa-a1f4-bcf6527ea9ab" ], "x-ms-correlation-request-id": [ - "d1ed8fbe-bffc-46fc-82d2-1563ab19aad0" + "0a10383b-a3be-45aa-a1f4-bcf6527ea9ab" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204907Z:d1ed8fbe-bffc-46fc-82d2-1563ab19aad0" + "WESTUS2:20171110T000210Z:0a10383b-a3be-45aa-a1f4-bcf6527ea9ab" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1987,23 +1892,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHM/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups/testConsumerGroup?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHMvdGVzdENvbnN1bWVyR3JvdXA/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f57cab7e-bbdf-49a4-88ed-6acc1c7b3686" + "006c8b24-0b96-44b6-8408-527920e91c11" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n \"$Default\"\r\n ]\r\n}", + "ResponseBody": "{\r\n \"tags\": null,\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"testConsumerGroup\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -2015,7 +1920,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:07 GMT" + "Fri, 10 Nov 2017 00:02:10 GMT" ], "Pragma": [ "no-cache" @@ -2030,16 +1935,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14934" + "14925" ], "x-ms-request-id": [ - "7f67fd8c-9870-4fdb-be45-7e01d894b406" + "6a0e266a-e68b-4866-a506-e12646883fef" ], "x-ms-correlation-request-id": [ - "7f67fd8c-9870-4fdb-be45-7e01d894b406" + "6a0e266a-e68b-4866-a506-e12646883fef" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204907Z:7f67fd8c-9870-4fdb-be45-7e01d894b406" + "WESTUS2:20171110T000211Z:6a0e266a-e68b-4866-a506-e12646883fef" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2048,26 +1953,26 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups/testConsumerGroup?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHMvdGVzdENvbnN1bWVyR3JvdXA/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", - "RequestMethod": "PUT", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups/testConsumerGroup?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHMvdGVzdENvbnN1bWVyR3JvdXA/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", + "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "4cff0ba9-9159-4d24-94c4-f671c8617a89" + "4cc7fe47-f1d6-4d77-8019-34a0c9fe0eed" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"tags\": null,\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"testConsumerGroup\"\r\n}", + "ResponseBody": "", "ResponseHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" + "Content-Length": [ + "0" ], "Expires": [ "-1" @@ -2076,31 +1981,25 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:12 GMT" + "Fri, 10 Nov 2017 00:02:10 GMT" ], "Pragma": [ "no-cache" ], - "Transfer-Encoding": [ - "chunked" - ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "Vary": [ - "Accept-Encoding" - ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1189" + "1193" ], "x-ms-request-id": [ - "bff0031f-1caf-44ec-b1a7-ac18dda8f285" + "420a50b4-9ce8-49cb-a2a9-056901ac8a24" ], "x-ms-correlation-request-id": [ - "bff0031f-1caf-44ec-b1a7-ac18dda8f285" + "420a50b4-9ce8-49cb-a2a9-056901ac8a24" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204912Z:bff0031f-1caf-44ec-b1a7-ac18dda8f285" + "WESTUS2:20171110T000211Z:420a50b4-9ce8-49cb-a2a9-056901ac8a24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2109,23 +2008,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups/testConsumerGroup?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHMvdGVzdENvbnN1bWVyR3JvdXA/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", + "RequestUri": "/providers/Microsoft.Devices/operations?api-version=2017-07-01", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDctMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f08dd83f-d083-4bc6-b0e8-7891a1a785f7" + "dd8c61a1-85ae-4e17-8e95-937707b76646" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"tags\": null,\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub\",\r\n \"name\": \"testConsumerGroup\"\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.Devices/register/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubs\",\r\n \"operation\": \"Register Resource Provider\",\r\n \"description\": \"Register the subscription for the IotHub resource provider and enables the creation of IotHub resources\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/IotHubs/diagnosticSettings/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubs\",\r\n \"operation\": \"Get Diagnostic Setting\",\r\n \"description\": \"Gets the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/IotHubs/diagnosticSettings/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubs\",\r\n \"operation\": \"Set Diagnostic Setting\",\r\n \"description\": \"Creates or updates the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/IotHubs/metricDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubs\",\r\n \"operation\": \"Read IotHub service metric definitions\",\r\n \"description\": \"Gets the available metrics for the IotHub service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"metricSpecifications\": [\r\n {\r\n \"name\": \"d2c.telemetry.ingress.allProtocol\",\r\n \"displayName\": \"Telemetry message send attempts\",\r\n \"displayDescription\": \"Number of device-to-cloud telemetry messages attempted to be sent to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.ingress.success\",\r\n \"displayName\": \"Telemetry messages sent\",\r\n \"displayDescription\": \"Number of device-to-cloud telemetry messages sent successfully to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.commands.egress.complete.success\",\r\n \"displayName\": \"Commands completed\",\r\n \"displayDescription\": \"Number of cloud-to-device commands completed successfully by the device\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.commands.egress.abandon.success\",\r\n \"displayName\": \"Commands abandoned\",\r\n \"displayDescription\": \"Number of cloud-to-device commands abandoned by the device\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.commands.egress.reject.success\",\r\n \"displayName\": \"Commands rejected\",\r\n \"displayDescription\": \"Number of cloud-to-device commands rejected by the device\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"devices.totalDevices\",\r\n \"displayName\": \"Total devices\",\r\n \"displayDescription\": \"Number of devices registered to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"devices.connectedDevices.allProtocol\",\r\n \"displayName\": \"Connected devices\",\r\n \"displayDescription\": \"Number of devices connected to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.success\",\r\n \"displayName\": \"Telemetry messages delivered\",\r\n \"displayDescription\": \"Number of times messages were successfully written to endpoints (total)\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.dropped\",\r\n \"displayName\": \"Dropped messages\",\r\n \"displayDescription\": \"Number of messages dropped because the delivery endpoint was dead\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.orphaned\",\r\n \"displayName\": \"Orphaned messages\",\r\n \"displayDescription\": \"The count of messages not matching any routes including the fallback route\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.invalid\",\r\n \"displayName\": \"Invalid messages\",\r\n \"displayDescription\": \"The count of messages not delivered due to incompatibility with the endpoint\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.fallback\",\r\n \"displayName\": \"Messages matching fallback condition\",\r\n \"displayDescription\": \"Number of messages written to the fallback endpoint\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.eventHubs\",\r\n \"displayName\": \"Messages delivered to Event Hub endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to Event Hub endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.eventHubs\",\r\n \"displayName\": \"Message latency for Event Hub endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into an Event Hub endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.serviceBusQueues\",\r\n \"displayName\": \"Messages delivered to Service Bus Queue endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to Service Bus Queue endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.serviceBusQueues\",\r\n \"displayName\": \"Message latency for Service Bus Queue endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into a Service Bus Queue endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.serviceBusTopics\",\r\n \"displayName\": \"Messages delivered to Service Bus Topic endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to Service Bus Topic endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.serviceBusTopics\",\r\n \"displayName\": \"Message latency for Service Bus Topic endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into a Service Bus Topic endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.builtIn.events\",\r\n \"displayName\": \"Messages delivered to the built-in endpoint (messages/events)\",\r\n \"displayDescription\": \"Number of times messages were successfully written to the built-in endpoint (messages/events)\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.builtIn.events\",\r\n \"displayName\": \"Message latency for the built-in endpoint (messages/events)\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into the built-in endpoint (messages/events), in milliseconds \",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.storage\",\r\n \"displayName\": \"Messages delivered to storage endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to storage endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.storage\",\r\n \"displayName\": \"Message latency for storage endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into a storage endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.storage.bytes\",\r\n \"displayName\": \"Data written to storage\",\r\n \"displayDescription\": \"Amount of data, in bytes, written to storage endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.storage.blobs\",\r\n \"displayName\": \"Blobs written to storage\",\r\n \"displayDescription\": \"Number of blobs written to storage endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.read.success\",\r\n \"displayName\": \"Successful twin reads from devices\",\r\n \"displayDescription\": \"The count of all successful device-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.read.failure\",\r\n \"displayName\": \"Failed twin reads from devices\",\r\n \"displayDescription\": \"The count of all failed device-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.read.size\",\r\n \"displayName\": \"Response size of twin reads from devices\",\r\n \"displayDescription\": \"The average, min, and max of all successful device-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.update.success\",\r\n \"displayName\": \"Successful twin updates from devices\",\r\n \"displayDescription\": \"The count of all successful device-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.update.failure\",\r\n \"displayName\": \"Failed twin updates from devices\",\r\n \"displayDescription\": \"The count of all failed device-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.update.size\",\r\n \"displayName\": \"Size of twin updates from devices\",\r\n \"displayDescription\": \"The average, min, and max size of all successful device-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.success\",\r\n \"displayName\": \"Successful direct method invocations\",\r\n \"displayDescription\": \"The count of all successful direct method calls.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.failure\",\r\n \"displayName\": \"Failed direct method invocations\",\r\n \"displayDescription\": \"The count of all failed direct method calls.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.requestSize\",\r\n \"displayName\": \"Request size of direct method invocations\",\r\n \"displayDescription\": \"The average, min, and max of all successful direct method requests.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.responseSize\",\r\n \"displayName\": \"Response size of direct method invocations\",\r\n \"displayDescription\": \"The average, min, and max of all successful direct method responses.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.read.success\",\r\n \"displayName\": \"Successful twin reads from back end\",\r\n \"displayDescription\": \"The count of all successful back-end-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.read.failure\",\r\n \"displayName\": \"Failed twin reads from back end\",\r\n \"displayDescription\": \"The count of all failed back-end-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.read.size\",\r\n \"displayName\": \"Response size of twin reads from back end\",\r\n \"displayDescription\": \"The average, min, and max of all successful back-end-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.update.success\",\r\n \"displayName\": \"Successful twin updates from back end\",\r\n \"displayDescription\": \"The count of all successful back-end-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.update.failure\",\r\n \"displayName\": \"Failed twin updates from back end\",\r\n \"displayDescription\": \"The count of all failed back-end-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.update.size\",\r\n \"displayName\": \"Size of twin updates from back end\",\r\n \"displayDescription\": \"The average, min, and max size of all successful back-end-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"twinQueries.success\",\r\n \"displayName\": \"Successful twin queries\",\r\n \"displayDescription\": \"The count of all successful twin queries.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"twinQueries.failure\",\r\n \"displayName\": \"Failed twin queries\",\r\n \"displayDescription\": \"The count of all failed twin queries.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"twinQueries.resultSize\",\r\n \"displayName\": \"Twin queries result size\",\r\n \"displayDescription\": \"The average, min, and max of the result size of all successful twin queries.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createTwinUpdateJob.success\",\r\n \"displayName\": \"Successful creations of twin update jobs\",\r\n \"displayDescription\": \"The count of all successful creation of twin update jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createTwinUpdateJob.failure\",\r\n \"displayName\": \"Failed creations of twin update jobs\",\r\n \"displayDescription\": \"The count of all failed creation of twin update jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createDirectMethodJob.success\",\r\n \"displayName\": \"Successful creations of method invocation jobs\",\r\n \"displayDescription\": \"The count of all successful creation of direct method invocation jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createDirectMethodJob.failure\",\r\n \"displayName\": \"Failed creations of method invocation jobs\",\r\n \"displayDescription\": \"The count of all failed creation of direct method invocation jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.listJobs.success\",\r\n \"displayName\": \"Successful calls to list jobs\",\r\n \"displayDescription\": \"The count of all successful calls to list jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.listJobs.failure\",\r\n \"displayName\": \"Failed calls to list jobs\",\r\n \"displayDescription\": \"The count of all failed calls to list jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.cancelJob.success\",\r\n \"displayName\": \"Successful job cancellations\",\r\n \"displayDescription\": \"The count of all successful calls to cancel a job.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.cancelJob.failure\",\r\n \"displayName\": \"Failed job cancellations\",\r\n \"displayDescription\": \"The count of all failed calls to cancel a job.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.queryJobs.success\",\r\n \"displayName\": \"Successful job queries\",\r\n \"displayDescription\": \"The count of all successful calls to query jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.queryJobs.failure\",\r\n \"displayName\": \"Failed job queries\",\r\n \"displayDescription\": \"The count of all failed calls to query jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.completed\",\r\n \"displayName\": \"Completed jobs\",\r\n \"displayDescription\": \"The count of all completed jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.failed\",\r\n \"displayName\": \"Failed jobs\",\r\n \"displayDescription\": \"The count of all failed jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.ingress.sendThrottle\",\r\n \"displayName\": \"Number of throttling errors\",\r\n \"displayDescription\": \"Number of throttling errors due to device throughput throttles\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"dailyMessageQuotaUsed\",\r\n \"displayName\": \"Total number of messages used\",\r\n \"displayDescription\": \"Number of total messages used today\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/IotHubs/logDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubs\",\r\n \"operation\": \"Read IotHub service log definitions\",\r\n \"description\": \"Gets the available log definitions for the IotHub Service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"logSpecifications\": [\r\n {\r\n \"name\": \"Connections\",\r\n \"displayName\": \"Connections\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"DeviceTelemetry\",\r\n \"displayName\": \"Device Telemetry\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"C2DCommands\",\r\n \"displayName\": \"C2D Commands\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"DeviceIdentityOperations\",\r\n \"displayName\": \"Device Identity Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"FileUploadOperations\",\r\n \"displayName\": \"File Upload Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"Routes\",\r\n \"displayName\": \"Routes\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"D2CTwinOperations\",\r\n \"displayName\": \"D2CTwinOperations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"C2DTwinOperations\",\r\n \"displayName\": \"C2D Twin Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"TwinQueries\",\r\n \"displayName\": \"Twin Queries\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"JobsOperations\",\r\n \"displayName\": \"Jobs Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"DirectMethods\",\r\n \"displayName\": \"Direct Methods\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHub(s)\",\r\n \"description\": \"Gets the IotHub resource(s)\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/Write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Create or update IotHub Resource\",\r\n \"description\": \"Create or update IotHub Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Delete IotHub Resource\",\r\n \"description\": \"Delete IotHub Resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/iotHubStats/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHub Statistics\",\r\n \"description\": \"Get IotHub Statistics\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/skus/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get valid IotHub Skus\",\r\n \"description\": \"Get valid IotHub Skus\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/listkeys/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get all IotHub Keys\",\r\n \"description\": \"Get all IotHub Keys\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/iotHubKeys/listkeys/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHub Key for the given name\",\r\n \"description\": \"Get IotHub Key for the given name\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Create EventHub Consumer Group\",\r\n \"description\": \"Create EventHub Consumer Group\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get EventHub Consumer Group(s)\",\r\n \"description\": \"Get EventHub Consumer Group(s)\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Delete EventHub Consumer Group\",\r\n \"description\": \"Delete EventHub Consumer Group\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/exportDevices/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Export Devices\",\r\n \"description\": \"Export Devices\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/importDevices/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Import Devices\",\r\n \"description\": \"Import Devices\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/jobs/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get the Job(s) on IotHub\",\r\n \"description\": \"Get Job(s) details submitted on given IotHub\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/quotaMetrics/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get Quota Metrics\",\r\n \"description\": \"Get Quota Metrics\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/routing/routes/$testall/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Routing Rule Test All\",\r\n \"description\": \"Test a message against all existing Routes\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/routing/routes/$testnew/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Routing Rule Test Route\",\r\n \"description\": \"Test a message against a provided test Route\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/iotHubs/routingEndpointsHealth/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get Endpoint Health\",\r\n \"description\": \"Gets the health of all routing Endpoints for an IotHub\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/operations/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get All ResourceProvider Operations\",\r\n \"description\": \"Get All ResourceProvider Operations\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/checkNameAvailability/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Check If IotHub name is available\",\r\n \"description\": \"Check If IotHub name is available\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/checkProvisioningServiceNameAvailability/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Check If IotHub name is available\",\r\n \"description\": \"Check If IotHub name is available\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/usages/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get Subscription Usages\",\r\n \"description\": \"Get subscription usage details for this provider.\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/provisioningServices/diagnosticSettings/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"provisioningServices\",\r\n \"operation\": \"Get Diagnostic Setting\",\r\n \"description\": \"Gets the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/provisioningServices/diagnosticSettings/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"provisioningServices\",\r\n \"operation\": \"Set Diagnostic Setting\",\r\n \"description\": \"Creates or updates the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/provisioningServices/metricDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"provisioningServices\",\r\n \"operation\": \"Read provisioning service metric definitions\",\r\n \"description\": \"Gets the available metrics for the provisioning service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"metricSpecifications\": [\r\n {\r\n \"name\": \"RegistrationAttempts\",\r\n \"displayName\": \"Registration attempts\",\r\n \"displayDescription\": \"Number of device registrations attempted\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"ProvisioningServiceName\",\r\n \"displayName\": \"Provisioning service name\"\r\n },\r\n {\r\n \"name\": \"IotHubName\",\r\n \"displayName\": \"IoT hub name\"\r\n },\r\n {\r\n \"name\": \"Status\",\r\n \"displayName\": \"Status\"\r\n }\r\n ],\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"DeviceAssignments\",\r\n \"displayName\": \"Devices assigned\",\r\n \"displayDescription\": \"Number of devices assigned to an IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"ProvisioningServiceName\",\r\n \"displayName\": \"Provisioning service name\"\r\n },\r\n {\r\n \"name\": \"IotHubName\",\r\n \"displayName\": \"IoT hub name\"\r\n }\r\n ],\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"AttestationAttempts\",\r\n \"displayName\": \"Attestation attempts\",\r\n \"displayDescription\": \"Number of device attestations attempted\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"dimensions\": [\r\n {\r\n \"name\": \"ProvisioningServiceName\",\r\n \"displayName\": \"Provisioning service name\"\r\n },\r\n {\r\n \"name\": \"Status\",\r\n \"displayName\": \"Status\"\r\n },\r\n {\r\n \"name\": \"Protocol\",\r\n \"displayName\": \"Protocol\"\r\n }\r\n ],\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/provisioningServices/logDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"provisioningServices\",\r\n \"operation\": \"Read provisioning service log definitions\",\r\n \"description\": \"Gets the available log definitions for the provisioning Service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"logSpecifications\": [\r\n {\r\n \"name\": \"DeviceOperations\",\r\n \"displayName\": \"Device Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"ServiceOperations\",\r\n \"displayName\": \"Service Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/diagnosticSettings/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"ElasticPools\",\r\n \"operation\": \"Get Diagnostic Setting\",\r\n \"description\": \"Gets the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/diagnosticSettings/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"ElasticPools\",\r\n \"operation\": \"Set Diagnostic Setting\",\r\n \"description\": \"Creates or updates the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/metricDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"ElasticPools\",\r\n \"operation\": \"Read IotHub service metric definitions\",\r\n \"description\": \"Gets the available metrics for the IotHub service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"metricSpecifications\": [\r\n {\r\n \"name\": \"elasticPool.requestedUsageRate\",\r\n \"displayName\": \"requested usage rate\",\r\n \"displayDescription\": \"requested usage rate\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Percent\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/register/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubTenants\",\r\n \"operation\": \"Register Resource Provider\",\r\n \"description\": \"Register the subscription for the IotHub resource provider and enables the creation of IotHub resources\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/IotHubTenants/diagnosticSettings/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubTenants\",\r\n \"operation\": \"Get Diagnostic Setting\",\r\n \"description\": \"Gets the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/IotHubTenants/diagnosticSettings/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubTenants\",\r\n \"operation\": \"Set Diagnostic Setting\",\r\n \"description\": \"Creates or updates the diagnostic setting for the resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/IotHubTenants/metricDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubTenants\",\r\n \"operation\": \"Read IotHub service metric definitions\",\r\n \"description\": \"Gets the available metrics for the IotHub service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"metricSpecifications\": [\r\n {\r\n \"name\": \"tenantHub.requestedUsageRate\",\r\n \"displayName\": \"requested usage rate\",\r\n \"displayDescription\": \"requested usage rate\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Percent\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"deviceDataUsage\",\r\n \"displayName\": \"Total devicedata usage\",\r\n \"displayDescription\": \"Bytes transferred to and from any devices connected to IotHub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.ingress.allProtocol\",\r\n \"displayName\": \"Telemetry message send attempts\",\r\n \"displayDescription\": \"Number of device-to-cloud telemetry messages attempted to be sent to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.ingress.success\",\r\n \"displayName\": \"Telemetry messages sent\",\r\n \"displayDescription\": \"Number of device-to-cloud telemetry messages sent successfully to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.commands.egress.complete.success\",\r\n \"displayName\": \"Commands completed\",\r\n \"displayDescription\": \"Number of cloud-to-device commands completed successfully by the device\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.commands.egress.abandon.success\",\r\n \"displayName\": \"Commands abandoned\",\r\n \"displayDescription\": \"Number of cloud-to-device commands abandoned by the device\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.commands.egress.reject.success\",\r\n \"displayName\": \"Commands rejected\",\r\n \"displayDescription\": \"Number of cloud-to-device commands rejected by the device\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"devices.totalDevices\",\r\n \"displayName\": \"Total devices\",\r\n \"displayDescription\": \"Number of devices registered to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"devices.connectedDevices.allProtocol\",\r\n \"displayName\": \"Connected devices\",\r\n \"displayDescription\": \"Number of devices connected to your IoT hub\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.success\",\r\n \"displayName\": \"Telemetry messages delivered\",\r\n \"displayDescription\": \"Number of times messages were successfully written to endpoints (total)\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.dropped\",\r\n \"displayName\": \"Dropped messages\",\r\n \"displayDescription\": \"Number of messages dropped because the delivery endpoint was dead\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.orphaned\",\r\n \"displayName\": \"Orphaned messages\",\r\n \"displayDescription\": \"The count of messages not matching any routes including the fallback route\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.invalid\",\r\n \"displayName\": \"Invalid messages\",\r\n \"displayDescription\": \"The count of messages not delivered due to incompatibility with the endpoint\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.egress.fallback\",\r\n \"displayName\": \"Messages matching fallback condition\",\r\n \"displayDescription\": \"Number of messages written to the fallback endpoint\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.eventHubs\",\r\n \"displayName\": \"Messages delivered to Event Hub endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to Event Hub endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.eventHubs\",\r\n \"displayName\": \"Message latency for Event Hub endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into an Event Hub endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.serviceBusQueues\",\r\n \"displayName\": \"Messages delivered to Service Bus Queue endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to Service Bus Queue endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.serviceBusQueues\",\r\n \"displayName\": \"Message latency for Service Bus Queue endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into a Service Bus Queue endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.serviceBusTopics\",\r\n \"displayName\": \"Messages delivered to Service Bus Topic endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to Service Bus Topic endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.serviceBusTopics\",\r\n \"displayName\": \"Message latency for Service Bus Topic endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into a Service Bus Topic endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.builtIn.events\",\r\n \"displayName\": \"Messages delivered to the built-in endpoint (messages/events)\",\r\n \"displayDescription\": \"Number of times messages were successfully written to the built-in endpoint (messages/events)\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.builtIn.events\",\r\n \"displayName\": \"Message latency for the built-in endpoint (messages/events)\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into the built-in endpoint (messages/events), in milliseconds \",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.storage\",\r\n \"displayName\": \"Messages delivered to storage endpoints\",\r\n \"displayDescription\": \"Number of times messages were successfully written to storage endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.latency.storage\",\r\n \"displayName\": \"Message latency for storage endpoints\",\r\n \"displayDescription\": \"The average latency between message ingress to the IoT hub and message ingress into a storage endpoint, in milliseconds\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Milliseconds\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.storage.bytes\",\r\n \"displayName\": \"Data written to storage\",\r\n \"displayDescription\": \"Amount of data, in bytes, written to storage endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.endpoints.egress.storage.blobs\",\r\n \"displayName\": \"Blobs written to storage\",\r\n \"displayDescription\": \"Number of blobs written to storage endpoints\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.read.success\",\r\n \"displayName\": \"Successful twin reads from devices\",\r\n \"displayDescription\": \"The count of all successful device-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.read.failure\",\r\n \"displayName\": \"Failed twin reads from devices\",\r\n \"displayDescription\": \"The count of all failed device-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.read.size\",\r\n \"displayName\": \"Response size of twin reads from devices\",\r\n \"displayDescription\": \"The average, min, and max of all successful device-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.update.success\",\r\n \"displayName\": \"Successful twin updates from devices\",\r\n \"displayDescription\": \"The count of all successful device-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.update.failure\",\r\n \"displayName\": \"Failed twin updates from devices\",\r\n \"displayDescription\": \"The count of all failed device-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.twin.update.size\",\r\n \"displayName\": \"Size of twin updates from devices\",\r\n \"displayDescription\": \"The average, min, and max size of all successful device-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.success\",\r\n \"displayName\": \"Successful direct method invocations\",\r\n \"displayDescription\": \"The count of all successful direct method calls.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.failure\",\r\n \"displayName\": \"Failed direct method invocations\",\r\n \"displayDescription\": \"The count of all failed direct method calls.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.requestSize\",\r\n \"displayName\": \"Request size of direct method invocations\",\r\n \"displayDescription\": \"The average, min, and max of all successful direct method requests.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.methods.responseSize\",\r\n \"displayName\": \"Response size of direct method invocations\",\r\n \"displayDescription\": \"The average, min, and max of all successful direct method responses.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.read.success\",\r\n \"displayName\": \"Successful twin reads from back end\",\r\n \"displayDescription\": \"The count of all successful back-end-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.read.failure\",\r\n \"displayName\": \"Failed twin reads from back end\",\r\n \"displayDescription\": \"The count of all failed back-end-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.read.size\",\r\n \"displayName\": \"Response size of twin reads from back end\",\r\n \"displayDescription\": \"The average, min, and max of all successful back-end-initiated twin reads.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.update.success\",\r\n \"displayName\": \"Successful twin updates from back end\",\r\n \"displayDescription\": \"The count of all successful back-end-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.update.failure\",\r\n \"displayName\": \"Failed twin updates from back end\",\r\n \"displayDescription\": \"The count of all failed back-end-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"c2d.twin.update.size\",\r\n \"displayName\": \"Size of twin updates from back end\",\r\n \"displayDescription\": \"The average, min, and max size of all successful back-end-initiated twin updates.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"twinQueries.success\",\r\n \"displayName\": \"Successful twin queries\",\r\n \"displayDescription\": \"The count of all successful twin queries.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"twinQueries.failure\",\r\n \"displayName\": \"Failed twin queries\",\r\n \"displayDescription\": \"The count of all failed twin queries.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"twinQueries.resultSize\",\r\n \"displayName\": \"Twin queries result size\",\r\n \"displayDescription\": \"The average, min, and max of the result size of all successful twin queries.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createTwinUpdateJob.success\",\r\n \"displayName\": \"Successful creations of twin update jobs\",\r\n \"displayDescription\": \"The count of all successful creation of twin update jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createTwinUpdateJob.failure\",\r\n \"displayName\": \"Failed creations of twin update jobs\",\r\n \"displayDescription\": \"The count of all failed creation of twin update jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createDirectMethodJob.success\",\r\n \"displayName\": \"Successful creations of method invocation jobs\",\r\n \"displayDescription\": \"The count of all successful creation of direct method invocation jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.createDirectMethodJob.failure\",\r\n \"displayName\": \"Failed creations of method invocation jobs\",\r\n \"displayDescription\": \"The count of all failed creation of direct method invocation jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.listJobs.success\",\r\n \"displayName\": \"Successful calls to list jobs\",\r\n \"displayDescription\": \"The count of all successful calls to list jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.listJobs.failure\",\r\n \"displayName\": \"Failed calls to list jobs\",\r\n \"displayDescription\": \"The count of all failed calls to list jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.cancelJob.success\",\r\n \"displayName\": \"Successful job cancellations\",\r\n \"displayDescription\": \"The count of all successful calls to cancel a job.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.cancelJob.failure\",\r\n \"displayName\": \"Failed job cancellations\",\r\n \"displayDescription\": \"The count of all failed calls to cancel a job.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.queryJobs.success\",\r\n \"displayName\": \"Successful job queries\",\r\n \"displayDescription\": \"The count of all successful calls to query jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.queryJobs.failure\",\r\n \"displayName\": \"Failed job queries\",\r\n \"displayDescription\": \"The count of all failed calls to query jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.completed\",\r\n \"displayName\": \"Completed jobs\",\r\n \"displayDescription\": \"The count of all completed jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"jobs.failed\",\r\n \"displayName\": \"Failed jobs\",\r\n \"displayDescription\": \"The count of all failed jobs.\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"d2c.telemetry.ingress.sendThrottle\",\r\n \"displayName\": \"Number of throttling errors\",\r\n \"displayDescription\": \"Number of throttling errors due to device throughput throttles\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Total\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"dailyMessageQuotaUsed\",\r\n \"displayName\": \"Total number of messages used\",\r\n \"displayDescription\": \"Number of total messages used today\",\r\n \"fillGapWithZero\": true,\r\n \"unit\": \"Count\",\r\n \"aggregationType\": \"Average\",\r\n \"availabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/ElasticPools/IotHubTenants/logDefinitions/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": \"IotHubTenants\",\r\n \"operation\": \"Read IotHub service log definitions\",\r\n \"description\": \"Gets the available log definitions for the IotHub Service\"\r\n },\r\n \"properties\": {\r\n \"serviceSpecification\": {\r\n \"logSpecifications\": [\r\n {\r\n \"name\": \"Connections\",\r\n \"displayName\": \"Connections\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"DeviceTelemetry\",\r\n \"displayName\": \"Device Telemetry\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"C2DCommands\",\r\n \"displayName\": \"C2D Commands\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"DeviceIdentityOperations\",\r\n \"displayName\": \"Device Identity Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"FileUploadOperations\",\r\n \"displayName\": \"File Upload Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"Routes\",\r\n \"displayName\": \"Routes\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"D2CTwinOperations\",\r\n \"displayName\": \"D2CTwinOperations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"C2DTwinOperations\",\r\n \"displayName\": \"C2D Twin Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"TwinQueries\",\r\n \"displayName\": \"Twin Queries\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"JobsOperations\",\r\n \"displayName\": \"Jobs Operations\",\r\n \"blobDuration\": \"PT1H\"\r\n },\r\n {\r\n \"name\": \"DirectMethods\",\r\n \"displayName\": \"Direct Methods\",\r\n \"blobDuration\": \"PT1H\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/Write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Create or Update IotHubTenant\",\r\n \"description\": \"Create or Update the IotHub tenant resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHubTenant\",\r\n \"description\": \"Gets the IotHub tenant resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Delete IotHubTenant\",\r\n \"description\": \"Delete the IotHub tenant resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/getStats/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHubTenant Stats\",\r\n \"description\": \"Gets the IotHub tenant stats resource\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/listKeys/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHubTenant Keys\",\r\n \"description\": \"Gets IotHub tenant keys\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/iotHubKeys/listkeys/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get IotHubTenant tenant key\",\r\n \"description\": \"Gets the IotHub tenant key\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/eventHubEndpoints/consumerGroups/Write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Create EventHub Consumer Group\",\r\n \"description\": \"Create EventHub Consumer Group\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/eventHubEndpoints/consumerGroups/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get EventHub Consumer Group(s)\",\r\n \"description\": \"Get EventHub Consumer Group(s)\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/eventHubEndpoints/consumerGroups/Delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Delete EventHub Consumer Group\",\r\n \"description\": \"Delete EventHub Consumer Group\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/exportDevices/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Export Devices\",\r\n \"description\": \"Export Devices\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/importDevices/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Import Devices\",\r\n \"description\": \"Import Devices\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/jobs/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get the Job(s) on IotHub\",\r\n \"description\": \"Get Job(s) details submitted on given IotHub\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/quotaMetrics/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get Quota Metrics\",\r\n \"description\": \"Get Quota Metrics\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/routing/routes/$testall/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Routing Rule Test All\",\r\n \"description\": \"Test a message against all existing Routes\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/routing/routes/$testnew/Action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Routing Rule Test Route\",\r\n \"description\": \"Test a message against a provided test Route\"\r\n },\r\n \"properties\": null\r\n },\r\n {\r\n \"name\": \"Microsoft.Devices/elasticPools/iotHubTenants/routingEndpointsHealth/Read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft Devices\",\r\n \"resource\": null,\r\n \"operation\": \"Get Endpoint Health\",\r\n \"description\": \"Gets the health of all routing Endpoints for an IotHub\"\r\n },\r\n \"properties\": null\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -2137,7 +2036,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:12 GMT" + "Fri, 10 Nov 2017 00:02:10 GMT" ], "Pragma": [ "no-cache" @@ -2151,72 +2050,17 @@ "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14933" - ], - "x-ms-request-id": [ - "70ecdc36-f86f-4863-a3ff-42beb6b3c400" - ], - "x-ms-correlation-request-id": [ - "70ecdc36-f86f-4863-a3ff-42beb6b3c400" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20170502T204912Z:70ecdc36-f86f-4863-a3ff-42beb6b3c400" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/DotNetHubRG/providers/Microsoft.Devices/IotHubs/DotNetHub/eventHubEndpoints/events/ConsumerGroups/testConsumerGroup?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL0RvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL0RvdE5ldEh1Yi9ldmVudEh1YkVuZHBvaW50cy9ldmVudHMvQ29uc3VtZXJHcm91cHMvdGVzdENvbnN1bWVyR3JvdXA/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "56d7499f-8119-4e30-ac7c-a237d5b679bf" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" - ] - }, - "ResponseBody": "", - "ResponseHeaders": { - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 02 May 2017 20:49:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-HTTPAPI/2.0" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1188" + "x-ms-ratelimit-remaining-tenant-reads": [ + "14999" ], "x-ms-request-id": [ - "55215131-3b58-4bb3-a240-cbfc5e40b8c7" + "1f7d47a2-bd88-49ef-84ca-81ea7c1d7473" ], "x-ms-correlation-request-id": [ - "55215131-3b58-4bb3-a240-cbfc5e40b8c7" + "1f7d47a2-bd88-49ef-84ca-81ea7c1d7473" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T204913Z:55215131-3b58-4bb3-a240-cbfc5e40b8c7" + "WESTUS2:20171110T000211Z:1f7d47a2-bd88-49ef-84ca-81ea7c1d7473" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" diff --git a/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubUpdateLifeCycle.json b/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubUpdateLifeCycle.json index f365af2236d26..0e27aee597469 100644 --- a/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubUpdateLifeCycle.json +++ b/src/SDKs/IotHub/IotHub.Tests/SessionRecords/IotHub.Tests.ScenarioTests.IotHubLifeCycleTests/TestIotHubUpdateLifeCycle.json @@ -1,8 +1,8 @@ -{ +{ "Entries": [ { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/UpdateDotNetHubRG?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlZ3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/UpdateDotNetHubRG?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlZ3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHP2FwaS12ZXJzaW9uPTIwMTctMDUtMTA=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { @@ -13,14 +13,14 @@ "28" ], "x-ms-client-request-id": [ - "d3826128-cd56-4af7-ad0d-196a5c8ee143" + "9b1319f1-a74b-4609-bf22-e000543cc869" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG\",\r\n \"name\": \"UpdateDotNetHubRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", @@ -38,22 +38,22 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:20 GMT" + "Fri, 10 Nov 2017 00:15:07 GMT" ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" + "1186" ], "x-ms-request-id": [ - "17a5f454-b4e5-4942-affa-9522b968dd5a" + "cf304346-e99c-4031-94ef-deea27790985" ], "x-ms-correlation-request-id": [ - "17a5f454-b4e5-4942-affa-9522b968dd5a" + "cf304346-e99c-4031-94ef-deea27790985" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T204920Z:17a5f454-b4e5-4942-affa-9522b968dd5a" + "WESTUS2:20171110T001507Z:cf304346-e99c-4031-94ef-deea27790985" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -62,8 +62,8 @@ "StatusCode": 201 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkNameAvailability?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNy0wMS0xOQ==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkNameAvailability?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNy0wNy0wMQ==", "RequestMethod": "POST", "RequestBody": "{\r\n \"Name\": \"UpdateDotNetHub\"\r\n}", "RequestHeaders": { @@ -74,14 +74,14 @@ "33" ], "x-ms-client-request-id": [ - "b43ff3f9-186f-43e8-8e2f-ec42370da3cf" + "69daf95a-7cdb-4ea1-a83b-067bc1d04d30" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"Invalid\",\r\n \"message\": null\r\n}", @@ -96,7 +96,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:20 GMT" + "Fri, 10 Nov 2017 00:15:08 GMT" ], "Pragma": [ "no-cache" @@ -111,16 +111,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" + "1192" ], "x-ms-request-id": [ - "cbbe72e6-a7c1-4d5f-a7f6-b681cb18930e" + "6619c692-3ccd-440e-a0f1-78d060465c85" ], "x-ms-correlation-request-id": [ - "cbbe72e6-a7c1-4d5f-a7f6-b681cb18930e" + "6619c692-3ccd-440e-a0f1-78d060465c85" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T204921Z:cbbe72e6-a7c1-4d5f-a7f6-b681cb18930e" + "WESTUS2:20171110T001508Z:6619c692-3ccd-440e-a0f1-78d060465c85" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -129,8 +129,8 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "PUT", "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { @@ -141,20 +141,20 @@ "186" ], "x-ms-client-request-id": [ - "6f46785a-5b1b-4282-a507-1c6e9453d8c7" + "06805d99-d88a-41c4-a21d-82dd89418ffd" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"properties\": {\r\n \"state\": \"Activating\",\r\n \"provisioningState\": \"Accepted\",\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"properties\": {\r\n \"state\": \"Activating\",\r\n \"provisioningState\": \"Accepted\",\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "679" + "658" ], "Content-Type": [ "application/json; charset=utf-8" @@ -166,7 +166,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:23 GMT" + "Fri, 10 Nov 2017 00:15:13 GMT" ], "Pragma": [ "no-cache" @@ -175,19 +175,19 @@ "Microsoft-HTTPAPI/2.0" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo" + "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "4999" ], "x-ms-request-id": [ - "70195ca7-2e7f-4184-9133-67010b22c59c" + "f9e6adbf-e123-45f9-8b41-834ff2238edb" ], "x-ms-correlation-request-id": [ - "70195ca7-2e7f-4184-9133-67010b22c59c" + "f9e6adbf-e123-45f9-8b41-834ff2238edb" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T204923Z:70195ca7-2e7f-4184-9133-67010b22c59c" + "WESTUS2:20171110T001513Z:f9e6adbf-e123-45f9-8b41-834ff2238edb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -196,32 +196,32 @@ "StatusCode": 201 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbQE=\",\r\n \"properties\": {\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true,\r\n \"source\": \"DeviceMessages\"\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 2\r\n },\r\n \"location\": \"WestUS\",\r\n \"tags\": {}\r\n}", + "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDxvs=\",\r\n \"properties\": {\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": [],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true,\r\n \"source\": \"DeviceMessages\"\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 2\r\n },\r\n \"location\": \"WestUS\",\r\n \"tags\": {}\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "1846" + "1880" ], "x-ms-client-request-id": [ - "4c1a898d-2738-436a-aec7-7e406c976079" + "b013fde6-1c2e-4afb-af8b-fb5058552d07" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbQE=\",\r\n \"properties\": {\r\n \"provisioningState\": \"Accepted\",\r\n \"authorizationPolicies\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"YGmG2FByKSzV8V5LFsG/XPoU3n+H/XdRlF7nLtOW1+U=\",\r\n \"secondaryKey\": \"jN/kPPYul4ZyI7zgiEFZRkGaNTNF0M1P6na9JuwyWdU=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"eWd38CQSISSSaG1v1amm1bB0nFHpZGMza2gmzV7Bu/U=\",\r\n \"secondaryKey\": \"ufB1yUWUIj+1zToxLYzm0aalyLq6UB6T1K7SgwK43lk=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"7iCmn1musyBRZ6pqC+x0Ys5b6RspAhasZzK4yRHzD94=\",\r\n \"secondaryKey\": \"5SOURBF3eo7JX9Bd6J/DxIlzKZqgGe0BnyoMVnIi2jE=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"5+fcGakY1ZNQZCxyYjQDc4ENt6FrYJcS6Sq3lbQwKsI=\",\r\n \"secondaryKey\": \"+3DRbiueFbmcOHqyua+0OlALEMuv6Y8ljDfx+avKwzM=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"TR2Y//ye0aM2Qiy6MQeioGVhRYpBReHtBL1+evb+H6o=\",\r\n \"secondaryKey\": \"vRJcL5oLYd1WkmeR84+6PiTWYSdh3IP7SCxP/QU+MdQ=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ],\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDxvs=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"provisioningState\": \"Accepted\",\r\n \"authorizationPolicies\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"touFgoZ0bQ3UZ6GrI8UJ1XzaIsg9TZ3TW0NuO4/Lbxw=\",\r\n \"secondaryKey\": \"vjjQ9NWEMBmXKAS+wfeYTz4aTDXx2GihsTeQjH5IrxY=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"3aJDG6acXtZpHK5heR1f8o+1kApHwMscvT77SOquWZQ=\",\r\n \"secondaryKey\": \"sMhyG3YDE8vmPvHYZpOWK2raAkFn4TgCNoEaogWy3yg=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"TcQuIQpAScl4mSKDwokNqMEdYPgl9qVpjd6N71LvysA=\",\r\n \"secondaryKey\": \"rGA5AXWoR+yWb3Vwkjfib6mJqRuGBW3LSW5nYDTf7DE=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"r/oQ3Pam5omNUu4VbwTLQpauG2qA2CLjc/rDRbStD2U=\",\r\n \"secondaryKey\": \"19v4dQfxfdmPBK6EzSUsYhCZRrobk+trJsIh7mAK7G0=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"f35T1ClV2kEhvxP5f1ev/tsRTVyCqXVjQ9a4gaGNMFw=\",\r\n \"secondaryKey\": \"BT6TkRovys6wDcCKvTV1RjvnSlh9pIoz+FpoyuowFEU=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ],\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": [],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "2419" + "2421" ], "Content-Type": [ "application/json; charset=utf-8" @@ -233,7 +233,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:52:54 GMT" + "Fri, 10 Nov 2017 00:18:16 GMT" ], "Pragma": [ "no-cache" @@ -242,19 +242,19 @@ "Microsoft-HTTPAPI/2.0" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/ZTczMjJjMTgtNDU1NC00MTkzLTk5MjMtNjFmYWY0NTBkYzEy?api-version=2017-01-19&asyncinfo" + "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfOTA1ZGExMGMtNWJkOS00OGE1LWEyZGYtZmNhMGJkMmYxNzZh?api-version=2017-07-01&asyncinfo" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "4998" ], "x-ms-request-id": [ - "fc954014-05de-4485-b51e-09fc4ffd804c" + "efe260de-fcbe-4922-9c32-ef7197794a0b" ], "x-ms-correlation-request-id": [ - "fc954014-05de-4485-b51e-09fc4ffd804c" + "efe260de-fcbe-4922-9c32-ef7197794a0b" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205255Z:fc954014-05de-4485-b51e-09fc4ffd804c" + "WESTUS2:20171110T001817Z:efe260de-fcbe-4922-9c32-ef7197794a0b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -263,10 +263,10 @@ "StatusCode": 201 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbQE=\",\r\n \"properties\": {\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=6Sz3CdLg/m6y/Dg5SBT6TlCISlpsWO9a3AH93KGVtJ8=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=jLKeSwiYxpx3NjFpUAFPEBYMpcWmmFwUB5slpgor/eI=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Y6BzlVLtoBRlbLVPJllBApEYJ/Vzr3U3GI4s/xCNsXA=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ]\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 2\r\n },\r\n \"location\": \"WestUS\",\r\n \"tags\": {}\r\n}", + "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDxvs=\",\r\n \"properties\": {\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=S0O2d/+UxpQOOrnGuCQPzALtOhIPdw5aTPsX1wau1gE=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ApZQA55jdID4Enn932fAeFqcY7TaiWt3ih10ejoDx3U=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=QfXiJ1YrnQce81yYPKVFlsyREH5ykNZ3QS9bq8/gTKc=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ]\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 2\r\n },\r\n \"location\": \"WestUS\",\r\n \"tags\": {}\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -275,20 +275,20 @@ "3463" ], "x-ms-client-request-id": [ - "4a6e67e4-8e02-4344-9242-d9bf37fac662" + "71343604-680c-4654-95da-64f009bd2fe0" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbQE=\",\r\n \"properties\": {\r\n \"provisioningState\": \"Accepted\",\r\n \"authorizationPolicies\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"YGmG2FByKSzV8V5LFsG/XPoU3n+H/XdRlF7nLtOW1+U=\",\r\n \"secondaryKey\": \"jN/kPPYul4ZyI7zgiEFZRkGaNTNF0M1P6na9JuwyWdU=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"eWd38CQSISSSaG1v1amm1bB0nFHpZGMza2gmzV7Bu/U=\",\r\n \"secondaryKey\": \"ufB1yUWUIj+1zToxLYzm0aalyLq6UB6T1K7SgwK43lk=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"7iCmn1musyBRZ6pqC+x0Ys5b6RspAhasZzK4yRHzD94=\",\r\n \"secondaryKey\": \"5SOURBF3eo7JX9Bd6J/DxIlzKZqgGe0BnyoMVnIi2jE=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"5+fcGakY1ZNQZCxyYjQDc4ENt6FrYJcS6Sq3lbQwKsI=\",\r\n \"secondaryKey\": \"+3DRbiueFbmcOHqyua+0OlALEMuv6Y8ljDfx+avKwzM=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"TR2Y//ye0aM2Qiy6MQeioGVhRYpBReHtBL1+evb+H6o=\",\r\n \"secondaryKey\": \"vRJcL5oLYd1WkmeR84+6PiTWYSdh3IP7SCxP/QU+MdQ=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ],\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=6Sz3CdLg/m6y/Dg5SBT6TlCISlpsWO9a3AH93KGVtJ8=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"90e2138d-7429-4646-86bb-a2a64b9fcad9\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=jLKeSwiYxpx3NjFpUAFPEBYMpcWmmFwUB5slpgor/eI=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"744f8151-5789-4fbe-a836-820cbdc62fb0\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Y6BzlVLtoBRlbLVPJllBApEYJ/Vzr3U3GI4s/xCNsXA=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"f5e1de26-16ab-4f7c-b8d1-7fabe6bbf6a9\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDxvs=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"provisioningState\": \"Accepted\",\r\n \"authorizationPolicies\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"touFgoZ0bQ3UZ6GrI8UJ1XzaIsg9TZ3TW0NuO4/Lbxw=\",\r\n \"secondaryKey\": \"vjjQ9NWEMBmXKAS+wfeYTz4aTDXx2GihsTeQjH5IrxY=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"3aJDG6acXtZpHK5heR1f8o+1kApHwMscvT77SOquWZQ=\",\r\n \"secondaryKey\": \"sMhyG3YDE8vmPvHYZpOWK2raAkFn4TgCNoEaogWy3yg=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"TcQuIQpAScl4mSKDwokNqMEdYPgl9qVpjd6N71LvysA=\",\r\n \"secondaryKey\": \"rGA5AXWoR+yWb3Vwkjfib6mJqRuGBW3LSW5nYDTf7DE=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"r/oQ3Pam5omNUu4VbwTLQpauG2qA2CLjc/rDRbStD2U=\",\r\n \"secondaryKey\": \"19v4dQfxfdmPBK6EzSUsYhCZRrobk+trJsIh7mAK7G0=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"f35T1ClV2kEhvxP5f1ev/tsRTVyCqXVjQ9a4gaGNMFw=\",\r\n \"secondaryKey\": \"BT6TkRovys6wDcCKvTV1RjvnSlh9pIoz+FpoyuowFEU=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ],\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=S0O2d/+UxpQOOrnGuCQPzALtOhIPdw5aTPsX1wau1gE=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"99cd63ea-bbf2-456d-9cd7-aca8d6a5f8b5\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ApZQA55jdID4Enn932fAeFqcY7TaiWt3ih10ejoDx3U=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"335044d2-70ce-4be7-89ea-13cb77fd4456\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=QfXiJ1YrnQce81yYPKVFlsyREH5ykNZ3QS9bq8/gTKc=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"009acb90-5f1e-4fa0-b2a6-9ba25132431f\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "3715" + "3717" ], "Content-Type": [ "application/json; charset=utf-8" @@ -300,7 +300,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:33 GMT" + "Fri, 10 Nov 2017 00:21:29 GMT" ], "Pragma": [ "no-cache" @@ -309,19 +309,19 @@ "Microsoft-HTTPAPI/2.0" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/NjM3OTkyMGItNDAwZC00YWU5LWFiMjItODEyMDMxYWQxNTM0?api-version=2017-01-19&asyncinfo" + "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNDUzOTk0N2MtMDk0Ni00MzlhLTk5ODEtNTc0MWIxNTY3NzQw?api-version=2017-07-01&asyncinfo" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "4997" + "4999" ], "x-ms-request-id": [ - "a444bd2d-91ce-450d-bbf5-925eb05a7d5a" + "c5be160a-7ae0-44e4-a138-d61ddef50f5d" ], "x-ms-correlation-request-id": [ - "a444bd2d-91ce-450d-bbf5-925eb05a7d5a" + "c5be160a-7ae0-44e4-a138-d61ddef50f5d" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205533Z:a444bd2d-91ce-450d-bbf5-925eb05a7d5a" + "WESTUS2:20171110T002130Z:c5be160a-7ae0-44e4-a138-d61ddef50f5d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -330,32 +330,32 @@ "StatusCode": 201 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbaY=\",\r\n \"properties\": {\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"resourceGroup\": \"1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false,\r\n \"source\": \"DeviceMessages\"\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 2\r\n },\r\n \"location\": \"WestUS\",\r\n \"tags\": {}\r\n}", + "RequestBody": "{\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDzuU=\",\r\n \"properties\": {\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"resourceGroup\": \"1\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false,\r\n \"source\": \"DeviceMessages\"\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"capacity\": 2\r\n },\r\n \"location\": \"WestUS\",\r\n \"tags\": {}\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "3584" + "3618" ], "x-ms-client-request-id": [ - "1b94f60d-920d-4bdb-a5a5-ca3c3aabdf7f" + "aff1a35a-e6da-4c3d-914b-65ce67a28a8c" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbaY=\",\r\n \"properties\": {\r\n \"provisioningState\": \"Accepted\",\r\n \"authorizationPolicies\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"YGmG2FByKSzV8V5LFsG/XPoU3n+H/XdRlF7nLtOW1+U=\",\r\n \"secondaryKey\": \"jN/kPPYul4ZyI7zgiEFZRkGaNTNF0M1P6na9JuwyWdU=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"eWd38CQSISSSaG1v1amm1bB0nFHpZGMza2gmzV7Bu/U=\",\r\n \"secondaryKey\": \"ufB1yUWUIj+1zToxLYzm0aalyLq6UB6T1K7SgwK43lk=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"7iCmn1musyBRZ6pqC+x0Ys5b6RspAhasZzK4yRHzD94=\",\r\n \"secondaryKey\": \"5SOURBF3eo7JX9Bd6J/DxIlzKZqgGe0BnyoMVnIi2jE=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"5+fcGakY1ZNQZCxyYjQDc4ENt6FrYJcS6Sq3lbQwKsI=\",\r\n \"secondaryKey\": \"+3DRbiueFbmcOHqyua+0OlALEMuv6Y8ljDfx+avKwzM=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"TR2Y//ye0aM2Qiy6MQeioGVhRYpBReHtBL1+evb+H6o=\",\r\n \"secondaryKey\": \"vRJcL5oLYd1WkmeR84+6PiTWYSdh3IP7SCxP/QU+MdQ=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ],\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=6Sz3CdLg/m6y/Dg5SBT6TlCISlpsWO9a3AH93KGVtJ8=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"90e2138d-7429-4646-86bb-a2a64b9fcad9\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=jLKeSwiYxpx3NjFpUAFPEBYMpcWmmFwUB5slpgor/eI=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"744f8151-5789-4fbe-a836-820cbdc62fb0\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Y6BzlVLtoBRlbLVPJllBApEYJ/Vzr3U3GI4s/xCNsXA=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"f5e1de26-16ab-4f7c-b8d1-7fabe6bbf6a9\",\r\n \"resourceGroup\": \"1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDzuU=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"provisioningState\": \"Accepted\",\r\n \"authorizationPolicies\": [\r\n {\r\n \"keyName\": \"iothubowner\",\r\n \"primaryKey\": \"touFgoZ0bQ3UZ6GrI8UJ1XzaIsg9TZ3TW0NuO4/Lbxw=\",\r\n \"secondaryKey\": \"vjjQ9NWEMBmXKAS+wfeYTz4aTDXx2GihsTeQjH5IrxY=\",\r\n \"rights\": \"RegistryWrite, ServiceConnect, DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"service\",\r\n \"primaryKey\": \"3aJDG6acXtZpHK5heR1f8o+1kApHwMscvT77SOquWZQ=\",\r\n \"secondaryKey\": \"sMhyG3YDE8vmPvHYZpOWK2raAkFn4TgCNoEaogWy3yg=\",\r\n \"rights\": \"ServiceConnect\"\r\n },\r\n {\r\n \"keyName\": \"device\",\r\n \"primaryKey\": \"TcQuIQpAScl4mSKDwokNqMEdYPgl9qVpjd6N71LvysA=\",\r\n \"secondaryKey\": \"rGA5AXWoR+yWb3Vwkjfib6mJqRuGBW3LSW5nYDTf7DE=\",\r\n \"rights\": \"DeviceConnect\"\r\n },\r\n {\r\n \"keyName\": \"registryRead\",\r\n \"primaryKey\": \"r/oQ3Pam5omNUu4VbwTLQpauG2qA2CLjc/rDRbStD2U=\",\r\n \"secondaryKey\": \"19v4dQfxfdmPBK6EzSUsYhCZRrobk+trJsIh7mAK7G0=\",\r\n \"rights\": \"RegistryRead\"\r\n },\r\n {\r\n \"keyName\": \"registryReadWrite\",\r\n \"primaryKey\": \"f35T1ClV2kEhvxP5f1ev/tsRTVyCqXVjQ9a4gaGNMFw=\",\r\n \"secondaryKey\": \"BT6TkRovys6wDcCKvTV1RjvnSlh9pIoz+FpoyuowFEU=\",\r\n \"rights\": \"RegistryWrite\"\r\n }\r\n ],\r\n \"ipFilterRules\": [],\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=S0O2d/+UxpQOOrnGuCQPzALtOhIPdw5aTPsX1wau1gE=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"99cd63ea-bbf2-456d-9cd7-aca8d6a5f8b5\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ApZQA55jdID4Enn932fAeFqcY7TaiWt3ih10ejoDx3U=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"335044d2-70ce-4be7-89ea-13cb77fd4456\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=QfXiJ1YrnQce81yYPKVFlsyREH5ykNZ3QS9bq8/gTKc=;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"009acb90-5f1e-4fa0-b2a6-9ba25132431f\",\r\n \"resourceGroup\": \"1\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ - "3735" + "3737" ], "Content-Type": [ "application/json; charset=utf-8" @@ -367,7 +367,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:57:05 GMT" + "Fri, 10 Nov 2017 00:23:02 GMT" ], "Pragma": [ "no-cache" @@ -376,19 +376,19 @@ "Microsoft-HTTPAPI/2.0" ], "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/NjBlM2MzNjMtOGNmMC00NWMzLWE4N2ItYTBiOTQwNDZmMDIz?api-version=2017-01-19&asyncinfo" + "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNjdkOGVlYWUtNDc1MS00NDVmLTlhMzktMGRmOTkyNmFmOWQ2?api-version=2017-07-01&asyncinfo" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "4996" + "4998" ], "x-ms-request-id": [ - "a2483b1d-29c2-4004-8dc1-34b7d812d614" + "f2af24d0-f3f2-4954-8852-1b74164e72f0" ], "x-ms-correlation-request-id": [ - "a2483b1d-29c2-4004-8dc1-34b7d812d614" + "f2af24d0-f3f2-4954-8852-1b74164e72f0" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205705Z:a2483b1d-29c2-4004-8dc1-34b7d812d614" + "WESTUS2:20171110T002303Z:f2af24d0-f3f2-4954-8852-1b74164e72f0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -397,14 +397,14 @@ "StatusCode": 201 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTjJNeE9UUTFaR0V0WlRKbU5pMDBZekUzTFRsbVl6UXRZakUwTXpjMFlXTmtaV05rP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -419,7 +419,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:49:53 GMT" + "Fri, 10 Nov 2017 00:15:44 GMT" ], "Pragma": [ "no-cache" @@ -434,16 +434,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14037" + "14929" ], "x-ms-request-id": [ - "5b037d35-40ca-4b1d-a82d-e3a99e02b611" + "b07bec81-e4e3-4051-bc48-884ddc23dc65" ], "x-ms-correlation-request-id": [ - "5b037d35-40ca-4b1d-a82d-e3a99e02b611" + "b07bec81-e4e3-4051-bc48-884ddc23dc65" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T204954Z:5b037d35-40ca-4b1d-a82d-e3a99e02b611" + "WESTUS2:20171110T001544Z:b07bec81-e4e3-4051-bc48-884ddc23dc65" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -452,14 +452,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTjJNeE9UUTFaR0V0WlRKbU5pMDBZekUzTFRsbVl6UXRZakUwTXpjMFlXTmtaV05rP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -474,7 +474,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:50:23 GMT" + "Fri, 10 Nov 2017 00:16:13 GMT" ], "Pragma": [ "no-cache" @@ -489,16 +489,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14066" + "14928" ], "x-ms-request-id": [ - "0f4b4b27-7755-45d0-9895-9b7aa544cac4" + "0aaaba26-427c-4d04-bfae-90aee3da0ae4" ], "x-ms-correlation-request-id": [ - "0f4b4b27-7755-45d0-9895-9b7aa544cac4" + "0aaaba26-427c-4d04-bfae-90aee3da0ae4" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205024Z:0f4b4b27-7755-45d0-9895-9b7aa544cac4" + "WESTUS2:20171110T001614Z:0aaaba26-427c-4d04-bfae-90aee3da0ae4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -507,14 +507,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTjJNeE9UUTFaR0V0WlRKbU5pMDBZekUzTFRsbVl6UXRZakUwTXpjMFlXTmtaV05rP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -529,7 +529,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:50:54 GMT" + "Fri, 10 Nov 2017 00:16:43 GMT" ], "Pragma": [ "no-cache" @@ -544,16 +544,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14061" + "14927" ], "x-ms-request-id": [ - "098d1603-b62d-4858-a495-44bbfa20569b" + "63d5bd8c-71ce-4872-be04-27b6e361da0c" ], "x-ms-correlation-request-id": [ - "098d1603-b62d-4858-a495-44bbfa20569b" + "63d5bd8c-71ce-4872-be04-27b6e361da0c" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205054Z:098d1603-b62d-4858-a495-44bbfa20569b" + "WESTUS2:20171110T001644Z:63d5bd8c-71ce-4872-be04-27b6e361da0c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -562,14 +562,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTjJNeE9UUTFaR0V0WlRKbU5pMDBZekUzTFRsbVl6UXRZakUwTXpjMFlXTmtaV05rP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -584,7 +584,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:51:24 GMT" + "Fri, 10 Nov 2017 00:17:14 GMT" ], "Pragma": [ "no-cache" @@ -599,16 +599,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14049" + "14925" ], "x-ms-request-id": [ - "704c0c22-2136-4f1c-b596-0eed53cbab66" + "448b7170-22be-4f67-9ea7-0edf54e69f76" ], "x-ms-correlation-request-id": [ - "704c0c22-2136-4f1c-b596-0eed53cbab66" + "448b7170-22be-4f67-9ea7-0edf54e69f76" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205124Z:704c0c22-2136-4f1c-b596-0eed53cbab66" + "WESTUS2:20171110T001714Z:448b7170-22be-4f67-9ea7-0edf54e69f76" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -617,14 +617,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTjJNeE9UUTFaR0V0WlRKbU5pMDBZekUzTFRsbVl6UXRZakUwTXpjMFlXTmtaV05rP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -639,7 +639,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:51:54 GMT" + "Fri, 10 Nov 2017 00:17:44 GMT" ], "Pragma": [ "no-cache" @@ -654,16 +654,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14043" + "14924" ], "x-ms-request-id": [ - "2fec14f8-10e0-45ed-9ddf-54ba90a48696" + "b393c4ef-d86e-4a94-b2a3-d802cc12a1fc" ], "x-ms-correlation-request-id": [ - "2fec14f8-10e0-45ed-9ddf-54ba90a48696" + "b393c4ef-d86e-4a94-b2a3-d802cc12a1fc" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205154Z:2fec14f8-10e0-45ed-9ddf-54ba90a48696" + "WESTUS2:20171110T001744Z:b393c4ef-d86e-4a94-b2a3-d802cc12a1fc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -672,17 +672,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfN2MxOTQ1ZGEtZTJmNi00YzE3LTlmYzQtYjE0Mzc0YWNkZWNk?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTjJNeE9UUTFaR0V0WlRKbU5pMDBZekUzTFRsbVl6UXRZakUwTXpjMFlXTmtaV05rP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -694,7 +694,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:52:24 GMT" + "Fri, 10 Nov 2017 00:18:14 GMT" ], "Pragma": [ "no-cache" @@ -709,16 +709,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14029" + "14923" ], "x-ms-request-id": [ - "73d6db29-17e7-4a9e-b0a4-9d462e5faf04" + "8ffa93d6-b395-402e-8efb-1897ea63d19b" ], "x-ms-correlation-request-id": [ - "73d6db29-17e7-4a9e-b0a4-9d462e5faf04" + "8ffa93d6-b395-402e-8efb-1897ea63d19b" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205224Z:73d6db29-17e7-4a9e-b0a4-9d462e5faf04" + "WESTUS2:20171110T001814Z:8ffa93d6-b395-402e-8efb-1897ea63d19b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -727,17 +727,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/YTQ0YTM3MGMtN2I1ZS00YzdiLTlkYWEtZDQyNGI2YTAwZDdj?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1lUUTBZVE0zTUdNdE4ySTFaUzAwWXpkaUxUbGtZV0V0WkRReU5HSTJZVEF3WkRkaj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDxvs=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": [],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -749,7 +749,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:52:53 GMT" + "Fri, 10 Nov 2017 00:18:15 GMT" ], "Pragma": [ "no-cache" @@ -764,16 +764,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14024" + "14922" ], "x-ms-request-id": [ - "8c55a0af-2ab6-4a1e-9958-106fd81b7e89" + "bd9f472a-1403-40ad-ba27-00c1df10a4e9" ], "x-ms-correlation-request-id": [ - "8c55a0af-2ab6-4a1e-9958-106fd81b7e89" + "bd9f472a-1403-40ad-ba27-00c1df10a4e9" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205254Z:8c55a0af-2ab6-4a1e-9958-106fd81b7e89" + "WESTUS2:20171110T001815Z:bd9f472a-1403-40ad-ba27-00c1df10a4e9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -782,17 +782,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbQE=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDyTU=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": [],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -804,7 +804,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:52:53 GMT" + "Fri, 10 Nov 2017 00:19:17 GMT" ], "Pragma": [ "no-cache" @@ -819,16 +819,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14023" + "14917" ], "x-ms-request-id": [ - "bbcadce2-26a5-42d7-9add-d46f68457d64" + "ddb5d43d-ed56-46a3-aaf9-db4330dc7639" ], "x-ms-correlation-request-id": [ - "bbcadce2-26a5-42d7-9add-d46f68457d64" + "ddb5d43d-ed56-46a3-aaf9-db4330dc7639" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205254Z:bbcadce2-26a5-42d7-9add-d46f68457d64" + "WESTUS2:20171110T001917Z:ddb5d43d-ed56-46a3-aaf9-db4330dc7639" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -837,17 +837,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbR0=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [],\r\n \"serviceBusTopics\": [],\r\n \"eventHubs\": []\r\n },\r\n \"routes\": [],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDzuU=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"99cd63ea-bbf2-456d-9cd7-aca8d6a5f8b5\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"335044d2-70ce-4be7-89ea-13cb77fd4456\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"009acb90-5f1e-4fa0-b2a6-9ba25132431f\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -859,7 +859,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:53:55 GMT" + "Fri, 10 Nov 2017 00:23:00 GMT" ], "Pragma": [ "no-cache" @@ -874,16 +874,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14004" + "14920" ], "x-ms-request-id": [ - "f0743b4f-9e18-45cf-af25-9ad63e1a516f" + "809adfb5-1e42-4f51-8309-8d76be13bf3d" ], "x-ms-correlation-request-id": [ - "f0743b4f-9e18-45cf-af25-9ad63e1a516f" + "809adfb5-1e42-4f51-8309-8d76be13bf3d" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205356Z:f0743b4f-9e18-45cf-af25-9ad63e1a516f" + "WESTUS2:20171110T002301Z:809adfb5-1e42-4f51-8309-8d76be13bf3d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -892,17 +892,23 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { + "x-ms-client-request-id": [ + "f63ffd78-7436-4cf8-995c-3dc75506de85" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbaY=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"90e2138d-7429-4646-86bb-a2a64b9fcad9\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"744f8151-5789-4fbe-a836-820cbdc62fb0\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"f5e1de26-16ab-4f7c-b8d1-7fabe6bbf6a9\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFDzuU=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"99cd63ea-bbf2-456d-9cd7-aca8d6a5f8b5\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"335044d2-70ce-4be7-89ea-13cb77fd4456\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"009acb90-5f1e-4fa0-b2a6-9ba25132431f\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -914,7 +920,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:57:04 GMT" + "Fri, 10 Nov 2017 00:23:01 GMT" ], "Pragma": [ "no-cache" @@ -929,16 +935,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14040" + "14919" ], "x-ms-request-id": [ - "111d7a5e-b18a-4a76-b2a8-393b005215d6" + "0926b78a-493c-43c9-8c18-a4a9b2989308" ], "x-ms-correlation-request-id": [ - "111d7a5e-b18a-4a76-b2a8-393b005215d6" + "0926b78a-493c-43c9-8c18-a4a9b2989308" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205704Z:111d7a5e-b18a-4a76-b2a8-393b005215d6" + "WESTUS2:20171110T002301Z:0926b78a-493c-43c9-8c18-a4a9b2989308" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -947,23 +953,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-07-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTA3LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { - "x-ms-client-request-id": [ - "bfe17257-db5c-4c9d-b633-2440a496e311" - ], - "accept-language": [ - "en-US" - ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqbaY=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"90e2138d-7429-4646-86bb-a2a64b9fcad9\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"744f8151-5789-4fbe-a836-820cbdc62fb0\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"f5e1de26-16ab-4f7c-b8d1-7fabe6bbf6a9\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAAFD0Gg=\",\r\n \"properties\": {\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-262778-7d633aca4f.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"99cd63ea-bbf2-456d-9cd7-aca8d6a5f8b5\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"335044d2-70ce-4be7-89ea-13cb77fd4456\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"009acb90-5f1e-4fa0-b2a6-9ba25132431f\",\r\n \"resourceGroup\": \"1\"\r\n }\r\n ],\r\n \"storageContainers\": []\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"features\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -975,7 +975,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:57:04 GMT" + "Fri, 10 Nov 2017 00:24:04 GMT" ], "Pragma": [ "no-cache" @@ -990,16 +990,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14039" + "14914" ], "x-ms-request-id": [ - "990b768b-f318-4e6c-b31a-db79459d9589" + "d06af78d-4b1b-4b39-babe-890a443dcc28" ], "x-ms-correlation-request-id": [ - "990b768b-f318-4e6c-b31a-db79459d9589" + "d06af78d-4b1b-4b39-babe-890a443dcc28" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205704Z:990b768b-f318-4e6c-b31a-db79459d9589" + "WESTUS2:20171110T002405Z:d06af78d-4b1b-4b39-babe-890a443dcc28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1008,17 +1008,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub?api-version=2017-01-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yj9hcGktdmVyc2lvbj0yMDE3LTAxLTE5", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfOTA1ZGExMGMtNWJkOS00OGE1LWEyZGYtZmNhMGJkMmYxNzZh?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmT1RBMVpHRXhNR010TldKa09TMDBPR0UxTFdFeVpHWXRabU5oTUdKa01tWXhOelpoP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub\",\r\n \"name\": \"UpdateDotNetHub\",\r\n \"type\": \"Microsoft.Devices/IotHubs\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {},\r\n \"subscriptionid\": \"91d12660-3dec-467a-be2a-213b5544ddc0\",\r\n \"resourcegroup\": \"UpdateDotNetHubRG\",\r\n \"etag\": \"AAAAAADqba0=\",\r\n \"properties\": {\r\n \"state\": \"Active\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipFilterRules\": [],\r\n \"hostName\": \"UpdateDotNetHub.azure-devices.net\",\r\n \"eventHubEndpoints\": {\r\n \"events\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n },\r\n \"operationsMonitoringEvents\": {\r\n \"retentionTimeInDays\": 1,\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ],\r\n \"path\": \"updatedotnethub-operationmonitoring\",\r\n \"endpoint\": \"sb://iothub-ns-updatedotn-155819-f4eb9f45d1.servicebus.windows.net/\"\r\n }\r\n },\r\n \"routing\": {\r\n \"endpoints\": {\r\n \"serviceBusQueues\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"name\": \"sb1\",\r\n \"id\": \"90e2138d-7429-4646-86bb-a2a64b9fcad9\"\r\n }\r\n ],\r\n \"serviceBusTopics\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=****;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"name\": \"tp1\",\r\n \"id\": \"744f8151-5789-4fbe-a836-820cbdc62fb0\"\r\n }\r\n ],\r\n \"eventHubs\": [\r\n {\r\n \"connectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net:5671/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=****;EntityPath=iothubcsharpsdkehtest\",\r\n \"name\": \"eh1\",\r\n \"id\": \"f5e1de26-16ab-4f7c-b8d1-7fabe6bbf6a9\",\r\n \"resourceGroup\": \"1\"\r\n }\r\n ]\r\n },\r\n \"routes\": [\r\n {\r\n \"name\": \"route1\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route2\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"eh1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route3\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"sb1\"\r\n ],\r\n \"isEnabled\": true\r\n },\r\n {\r\n \"name\": \"route4\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"tp1\"\r\n ],\r\n \"isEnabled\": true\r\n }\r\n ],\r\n \"fallbackRoute\": {\r\n \"name\": \"$fallback\",\r\n \"source\": \"DeviceMessages\",\r\n \"condition\": \"true\",\r\n \"endpointNames\": [\r\n \"events\"\r\n ],\r\n \"isEnabled\": false\r\n }\r\n },\r\n \"storageEndpoints\": {\r\n \"$default\": {\r\n \"sasTtlAsIso8601\": \"PT1H\",\r\n \"connectionString\": \"\",\r\n \"containerName\": \"\"\r\n }\r\n },\r\n \"messagingEndpoints\": {\r\n \"fileNotifications\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"enableFileUploadNotifications\": false,\r\n \"cloudToDevice\": {\r\n \"maxDeliveryCount\": 10,\r\n \"defaultTtlAsIso8601\": \"PT1H\",\r\n \"feedback\": {\r\n \"lockDurationAsIso8601\": \"PT1M\",\r\n \"ttlAsIso8601\": \"PT1H\",\r\n \"maxDeliveryCount\": 10\r\n }\r\n },\r\n \"operationsMonitoringProperties\": {\r\n \"events\": {\r\n \"None\": \"None\",\r\n \"Connections\": \"None\",\r\n \"DeviceTelemetry\": \"None\",\r\n \"C2DCommands\": \"None\",\r\n \"DeviceIdentityOperations\": \"None\",\r\n \"FileUploadOperations\": \"None\",\r\n \"Routes\": \"None\"\r\n }\r\n },\r\n \"features\": \"None\",\r\n \"generationNumber\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1030,7 +1030,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:57:36 GMT" + "Fri, 10 Nov 2017 00:18:46 GMT" ], "Pragma": [ "no-cache" @@ -1045,16 +1045,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14024" + "14921" ], "x-ms-request-id": [ - "97a65b0a-a1a2-4ecb-b9f4-e85862ba86ad" + "d9c7d10e-5f3f-4aeb-b9f7-1419625ab694" ], "x-ms-correlation-request-id": [ - "97a65b0a-a1a2-4ecb-b9f4-e85862ba86ad" + "d9c7d10e-5f3f-4aeb-b9f7-1419625ab694" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205736Z:97a65b0a-a1a2-4ecb-b9f4-e85862ba86ad" + "WESTUS2:20171110T001847Z:d9c7d10e-5f3f-4aeb-b9f7-1419625ab694" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1063,17 +1063,17 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/ZTczMjJjMTgtNDU1NC00MTkzLTk5MjMtNjFmYWY0NTBkYzEy?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1pUY3pNakpqTVRndE5EVTFOQzAwTVRrekxUazVNak10TmpGbVlXWTBOVEJrWXpFeT9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfOTA1ZGExMGMtNWJkOS00OGE1LWEyZGYtZmNhMGJkMmYxNzZh?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmT1RBMVpHRXhNR010TldKa09TMDBPR0UxTFdFeVpHWXRabU5oTUdKa01tWXhOelpoP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1085,7 +1085,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:53:25 GMT" + "Fri, 10 Nov 2017 00:19:17 GMT" ], "Pragma": [ "no-cache" @@ -1100,16 +1100,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14014" + "14918" ], "x-ms-request-id": [ - "37b361bb-af79-4aed-ab1e-fae8d3248876" + "b23971b5-16fe-481f-bed0-3a7a36b15ffc" ], "x-ms-correlation-request-id": [ - "37b361bb-af79-4aed-ab1e-fae8d3248876" + "b23971b5-16fe-481f-bed0-3a7a36b15ffc" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205326Z:37b361bb-af79-4aed-ab1e-fae8d3248876" + "WESTUS2:20171110T001917Z:b23971b5-16fe-481f-bed0-3a7a36b15ffc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1118,17 +1118,29 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/ZTczMjJjMTgtNDU1NC00MTkzLTk5MjMtNjFmYWY0NTBkYzEy?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL1pUY3pNakpqTVRndE5EVTFOQzAwTVRrekxUazVNak10TmpGbVlXWTBOVEJrWXpFeT9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", - "RequestMethod": "GET", - "RequestBody": "", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRXZlbnRIdWIvbmFtZXNwYWNlcy9pb3RodWJjc2hhcnBzZGtlaG5hbWVzcGFjZXRlc3Q/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"WestUS\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n }\r\n}", "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "95" + ], + "x-ms-client-request-id": [ + "6563e8c1-e91b-4c18-b700-f291cbf12854" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1140,7 +1152,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:53:55 GMT" + "Fri, 10 Nov 2017 00:19:22 GMT" ], "Pragma": [ "no-cache" @@ -1149,22 +1161,26 @@ "chunked" ], "Server": [ + "Service-Bus-Resource-Provider/SN1", "Microsoft-HTTPAPI/2.0" ], "Vary": [ "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14005" - ], "x-ms-request-id": [ - "63c8495c-b9bc-44d1-a4ce-6a982bb3c64a" + "bedd1433-1616-4eba-a3b2-d240d7ab99b1_M4_M4" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" ], "x-ms-correlation-request-id": [ - "63c8495c-b9bc-44d1-a4ce-6a982bb3c64a" + "96575e13-d724-48c4-8dc4-5337927f36d0" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205356Z:63c8495c-b9bc-44d1-a4ce-6a982bb3c64a" + "WESTUS2:20171110T001922Z:96575e13-d724-48c4-8dc4-5337927f36d0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1175,27 +1191,15 @@ { "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest?api-version=2015-08-01", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRXZlbnRIdWIvbmFtZXNwYWNlcy9pb3RodWJjc2hhcnBzZGtlaG5hbWVzcGFjZXRlc3Q/YXBpLXZlcnNpb249MjAxNS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"WestUS\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n }\r\n}", + "RequestMethod": "GET", + "RequestBody": "", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "95" - ], - "x-ms-client-request-id": [ - "eef415eb-4a9f-4e22-a126-1f3139a6ff14" - ], - "accept-language": [ - "en-US" - ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Created\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"status\": \"Created\",\r\n \"createdAt\": \"2017-11-10T00:19:20.387Z\",\r\n \"serviceBusEndpoint\": \"https://iothubcsharpsdkehnamespacetest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-508\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-11-10T00:19:20.387Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1207,7 +1211,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:53:58 GMT" + "Fri, 10 Nov 2017 00:19:51 GMT" ], "Pragma": [ "no-cache" @@ -1223,19 +1227,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "09b1ccc3-781e-4323-9e72-e8836ce9298b_M6_M6" + "e392ff70-feea-4e49-b6be-f055b25a60f9_M4_M4" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1186" + "x-ms-ratelimit-remaining-subscription-reads": [ + "14934" ], "x-ms-correlation-request-id": [ - "da1b07b2-f8ee-4651-b9dc-5c763f9f6d6a" + "c951f284-941c-4f9c-87ec-65abb3982887" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205358Z:da1b07b2-f8ee-4651-b9dc-5c763f9f6d6a" + "WESTUS2:20171110T001952Z:c951f284-941c-4f9c-87ec-65abb3982887" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1250,11 +1254,11 @@ "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:53:58.63Z\",\r\n \"serviceBusEndpoint\": \"https://iothubcsharpsdkehnamespacetest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-506\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-05-02T20:54:21.877Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest\",\r\n \"name\": \"iothubcsharpsdkehnamespacetest\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"EventHub\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdkehnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-10T00:19:20.387Z\",\r\n \"serviceBusEndpoint\": \"https://iothubcsharpsdkehnamespacetest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-508\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-11-10T00:20:04.063Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1266,7 +1270,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:54:27 GMT" + "Fri, 10 Nov 2017 00:20:22 GMT" ], "Pragma": [ "no-cache" @@ -1282,19 +1286,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "4cc16c1c-191e-4ca2-8267-f498f46c0372_M6_M6" + "bd30e601-d5bc-4369-8249-b569453af374_M4_M4" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14950" + "14935" ], "x-ms-correlation-request-id": [ - "ec8c0461-2ee0-40a1-bdad-4566ffae004c" + "58984621-987b-4687-960c-3e4cc1ef0b86" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205428Z:ec8c0461-2ee0-40a1-bdad-4566ffae004c" + "WESTUS2:20171110T002023Z:58984621-987b-4687-960c-3e4cc1ef0b86" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1315,17 +1319,17 @@ "28" ], "x-ms-client-request-id": [ - "f3622049-c682-4f1a-988d-bbb4d29dfcdb" + "6dac3185-f9f4-4519-bfe5-24d05640e5ce" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest/eventhubs/iothubcsharpsdkehtest\",\r\n \"name\": \"iothubcsharpsdkehtest\",\r\n \"type\": \"Microsoft.EventHub/EventHubs\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"messageRetentionInDays\": 7,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:54:28.233Z\",\r\n \"updatedAt\": \"2017-05-02T20:54:28.467Z\",\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest/eventhubs/iothubcsharpsdkehtest\",\r\n \"name\": \"iothubcsharpsdkehtest\",\r\n \"type\": \"Microsoft.EventHub/EventHubs\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"iothubcsharpsdkehtest\",\r\n \"messageRetentionInDays\": 7,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-10T00:20:28.613Z\",\r\n \"updatedAt\": \"2017-11-10T00:20:29.003Z\",\r\n \"partitionCount\": 4,\r\n \"partitionIds\": [\r\n \"0\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1337,7 +1341,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:54:35 GMT" + "Fri, 10 Nov 2017 00:20:31 GMT" ], "Pragma": [ "no-cache" @@ -1353,19 +1357,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "41a71ba4-83bf-42f5-9651-520d40cd64c8_M6_M6" + "20454b49-8196-442f-a0bc-234af15045b8_M4_M4" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1185" + "1190" ], "x-ms-correlation-request-id": [ - "09aa325b-2606-4d21-b744-6b313f40770b" + "e6d4c611-48c8-4d43-adad-887b28dd2db8" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205436Z:09aa325b-2606-4d21-b744-6b313f40770b" + "WESTUS2:20171110T002032Z:e6d4c611-48c8-4d43-adad-887b28dd2db8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1386,14 +1390,14 @@ "108" ], "x-ms-client-request-id": [ - "7d9d7992-51d8-4fcb-812f-703b242683af" + "9e385261-9b98-4466-a4fc-8c100f06fad1" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.EventHub/namespaces/iothubcsharpsdkehnamespacetest/eventhubs/iothubcsharpsdkehtest/authorizationRules/iothubcsharpsdkehtestrule\",\r\n \"name\": \"iothubcsharpsdkehtestrule\",\r\n \"type\": \"Microsoft.EventHub/AuthorizationRules\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\",\r\n \"Listen\"\r\n ]\r\n }\r\n}", @@ -1408,7 +1412,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:54:40 GMT" + "Fri, 10 Nov 2017 00:20:36 GMT" ], "Pragma": [ "no-cache" @@ -1424,19 +1428,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "848ef3e8-9717-4c38-afc5-a9f5e0ee0fff_M6_M6" + "1debc973-0014-406a-a013-ac15471f5f97_M4_M4" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1184" + "1189" ], "x-ms-correlation-request-id": [ - "36b5514a-f826-4717-815f-0f10c2996415" + "7cf5070c-6e54-4ffc-9dd2-68768175677b" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205441Z:36b5514a-f826-4717-815f-0f10c2996415" + "WESTUS2:20171110T002037Z:7cf5070c-6e54-4ffc-9dd2-68768175677b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1451,17 +1455,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "c4ab65c4-2178-4b13-8b86-8db45beada03" + "3ece1bc9-8434-4331-b2f2-7174a76c41b2" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.EventHub.EventHubManagementClient/0.0.1-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" ] }, - "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=Y6BzlVLtoBRlbLVPJllBApEYJ/Vzr3U3GI4s/xCNsXA=;EntityPath=iothubcsharpsdkehtest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=qd6ucdERK2FQjXzmT8nxI+datOZpfKMu7ED4oRxgZgo=;EntityPath=iothubcsharpsdkehtest\",\r\n \"primaryKey\": \"Y6BzlVLtoBRlbLVPJllBApEYJ/Vzr3U3GI4s/xCNsXA=\",\r\n \"secondaryKey\": \"qd6ucdERK2FQjXzmT8nxI+datOZpfKMu7ED4oRxgZgo=\",\r\n \"keyName\": \"iothubcsharpsdkehtestrule\"\r\n}", + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=QfXiJ1YrnQce81yYPKVFlsyREH5ykNZ3QS9bq8/gTKc=;EntityPath=iothubcsharpsdkehtest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdkehnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iothubcsharpsdkehtestrule;SharedAccessKey=K9x20yS/R8ehr9uJuip+4pux0+mmfexBpEIStegG+MA=;EntityPath=iothubcsharpsdkehtest\",\r\n \"primaryKey\": \"QfXiJ1YrnQce81yYPKVFlsyREH5ykNZ3QS9bq8/gTKc=\",\r\n \"secondaryKey\": \"K9x20yS/R8ehr9uJuip+4pux0+mmfexBpEIStegG+MA=\",\r\n \"keyName\": \"iothubcsharpsdkehtestrule\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1473,7 +1477,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:54:41 GMT" + "Fri, 10 Nov 2017 00:20:36 GMT" ], "Pragma": [ "no-cache" @@ -1489,19 +1493,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "3e5c91f1-1492-47f1-b94f-4e96c45149bd_M6_M6" + "5a7a7c24-cfbc-48da-b81f-d304e2b172e2_M4_M4" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1183" + "1188" ], "x-ms-correlation-request-id": [ - "ffa4b818-a66f-4d12-b747-7b95fe3d8ba9" + "a0723b22-b635-45d3-af6b-8070b45ca438" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205441Z:ffa4b818-a66f-4d12-b747-7b95fe3d8ba9" + "WESTUS2:20171110T002037Z:a0723b22-b635-45d3-af6b-8070b45ca438" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1522,14 +1526,14 @@ "95" ], "x-ms-client-request-id": [ - "e8640a6b-1316-487c-9091-c88f98643a35" + "d16155fd-eaec-4123-bc93-34127422d241" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest\",\r\n \"name\": \"iotHubCSharpSDKSBNamespaceTest\",\r\n \"type\": \"Microsoft.ServiceBus/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Messaging\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdksbnamespacetest\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"Messaging\",\r\n \"messagingSku\": 2\r\n }\r\n}", @@ -1544,7 +1548,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:54:42 GMT" + "Fri, 10 Nov 2017 00:20:39 GMT" ], "Pragma": [ "no-cache" @@ -1560,19 +1564,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "4a31a90a-e414-4f33-94c5-e9f7bba603cc_M0_M0" + "f21bc35c-c9c5-4cca-bf94-87bb2afb8d4b_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" + "1189" ], "x-ms-correlation-request-id": [ - "7a1faae5-4e36-4a5a-8580-c3feda2eb75e" + "03236461-8a7b-4fba-a69d-eed35f85143d" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205442Z:7a1faae5-4e36-4a5a-8580-c3feda2eb75e" + "WESTUS2:20171110T002040Z:03236461-8a7b-4fba-a69d-eed35f85143d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1587,11 +1591,11 @@ "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest\",\r\n \"name\": \"iotHubCSharpSDKSBNamespaceTest\",\r\n \"type\": \"Microsoft.ServiceBus/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Messaging\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdksbnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:54:43.913Z\",\r\n \"serviceBusEndpoint\": \"https://iotHubCSharpSDKSBNamespaceTest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-008\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-05-02T20:55:11.593Z\",\r\n \"namespaceType\": \"Messaging\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest\",\r\n \"name\": \"iotHubCSharpSDKSBNamespaceTest\",\r\n \"type\": \"Microsoft.ServiceBus/namespaces\",\r\n \"location\": \"West US\",\r\n \"kind\": \"Messaging\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"metricId\": \"91d12660-3dec-467a-be2a-213b5544ddc0:iothubcsharpsdksbnamespacetest\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-10T00:20:38.433Z\",\r\n \"serviceBusEndpoint\": \"https://iotHubCSharpSDKSBNamespaceTest.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"BY3-010\",\r\n \"dataCenter\": \"BY3\",\r\n \"updatedAt\": \"2017-11-10T00:21:05.907Z\",\r\n \"namespaceType\": \"Messaging\",\r\n \"messagingSku\": 2\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1603,7 +1607,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:12 GMT" + "Fri, 10 Nov 2017 00:21:10 GMT" ], "Pragma": [ "no-cache" @@ -1619,19 +1623,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "54f621e1-6e89-4b12-99df-ab8c595ac664_M0_M0" + "58a77dcb-0ed3-4c75-965a-1b90052ecb58_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14953" + "14920" ], "x-ms-correlation-request-id": [ - "5c1bdf11-2a06-4137-999f-785fe544c3fb" + "3bb3c4d7-07e7-4169-8c1b-c38971d232ed" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205513Z:5c1bdf11-2a06-4137-999f-785fe544c3fb" + "WESTUS2:20171110T002110Z:3bb3c4d7-07e7-4169-8c1b-c38971d232ed" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1652,17 +1656,17 @@ "28" ], "x-ms-client-request-id": [ - "7a1721aa-bdaa-4fa9-a9cf-6489c171cfa2" + "1a3da93d-5cd3-4733-87d9-545f1f360a61" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/queues/iotHubCSharpSDKSBTest\",\r\n \"name\": \"iotHubCSharpSDKSBTest\",\r\n \"type\": \"Microsoft.ServiceBus/Queues\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"lockDuration\": \"00:01:00\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"requiresSession\": false,\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"deadLetteringOnMessageExpiration\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"maxDeliveryCount\": 10,\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"messageCount\": 0,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:55:13.777Z\",\r\n \"updatedAt\": \"2017-05-02T20:55:13.887Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableExpress\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/queues/iotHubCSharpSDKSBTest\",\r\n \"name\": \"iotHubCSharpSDKSBTest\",\r\n \"type\": \"Microsoft.ServiceBus/Queues\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"iotHubCSharpSDKSBTest\",\r\n \"lockDuration\": \"00:01:00\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"requiresSession\": false,\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"deadLetteringOnMessageExpiration\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"maxDeliveryCount\": 10,\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"messageCount\": 0,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-10T00:21:11.453Z\",\r\n \"updatedAt\": \"2017-11-10T00:21:11.563Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableExpress\": false\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1674,7 +1678,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:14 GMT" + "Fri, 10 Nov 2017 00:21:12 GMT" ], "Pragma": [ "no-cache" @@ -1690,19 +1694,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "548dc6f4-9ce6-4efa-b778-5916dab0e645_M0_M0" + "49646a33-bbd1-47e7-aaaf-c1f9ee7d3fc4_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" + "1188" ], "x-ms-correlation-request-id": [ - "2747d0bd-ed83-4d69-975a-b470c6cc07d7" + "463ebe02-779c-4849-9845-fdbaa3ffaf0d" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205515Z:2747d0bd-ed83-4d69-975a-b470c6cc07d7" + "WESTUS2:20171110T002113Z:463ebe02-779c-4849-9845-fdbaa3ffaf0d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1723,17 +1727,17 @@ "28" ], "x-ms-client-request-id": [ - "8813bacd-9781-433d-831c-f53b6784d4d0" + "e43b330a-2111-402e-bb00-c31d080654a6" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/topics/iotHubCSharpSDKTopicTest\",\r\n \"name\": \"iotHubCSharpSDKTopicTest\",\r\n \"type\": \"Microsoft.ServiceBus/Topic\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"filteringMessagesBeforePublishing\": false,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-05-02T20:55:15.713Z\",\r\n \"updatedAt\": \"2017-05-02T20:55:15.777Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"isExpress\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableSubscriptionPartitioning\": false,\r\n \"enableExpress\": false\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/topics/iotHubCSharpSDKTopicTest\",\r\n \"name\": \"iotHubCSharpSDKTopicTest\",\r\n \"type\": \"Microsoft.ServiceBus/Topic\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"path\": \"iotHubCSharpSDKTopicTest\",\r\n \"defaultMessageTimeToLive\": \"10675199.02:48:05.4775807\",\r\n \"maxSizeInMegabytes\": 1024,\r\n \"requiresDuplicateDetection\": false,\r\n \"duplicateDetectionHistoryTimeWindow\": \"00:10:00\",\r\n \"enableBatchedOperations\": true,\r\n \"sizeInBytes\": 0,\r\n \"filteringMessagesBeforePublishing\": false,\r\n \"isAnonymousAccessible\": false,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-11-10T00:21:13.517Z\",\r\n \"updatedAt\": \"2017-11-10T00:21:13.563Z\",\r\n \"supportOrdering\": true,\r\n \"autoDeleteOnIdle\": \"10675199.02:48:05.4775807\",\r\n \"enablePartitioning\": false,\r\n \"isExpress\": false,\r\n \"entityAvailabilityStatus\": \"Available\",\r\n \"enableSubscriptionPartitioning\": false,\r\n \"enableExpress\": false\r\n }\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1745,7 +1749,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:17 GMT" + "Fri, 10 Nov 2017 00:21:14 GMT" ], "Pragma": [ "no-cache" @@ -1761,19 +1765,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "4a75a2c7-d06e-40dc-b96e-25e714078fd6_M0_M0" + "57311a75-2452-4701-b9de-bf5eea7a06af_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1193" + "1187" ], "x-ms-correlation-request-id": [ - "0a7b6ba2-a4a8-4308-b67a-55d251675a5f" + "6fbdbf42-8b4e-43f9-8087-243b8f363c41" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205517Z:0a7b6ba2-a4a8-4308-b67a-55d251675a5f" + "WESTUS2:20171110T002115Z:6fbdbf42-8b4e-43f9-8087-243b8f363c41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1794,14 +1798,14 @@ "108" ], "x-ms-client-request-id": [ - "54dc4066-32ed-4ba8-80fd-afea65f176d5" + "a12f5b33-88a0-41df-b352-0cfe85c8580d" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/queues/iotHubCSharpSDKSBTest/authorizationRules/iotHubCSharpSDKSBTopicTestRule\",\r\n \"name\": \"iotHubCSharpSDKSBTopicTestRule\",\r\n \"type\": \"Microsoft.ServiceBus/AuthorizationRules\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\",\r\n \"Listen\"\r\n ]\r\n }\r\n}", @@ -1816,7 +1820,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:22 GMT" + "Fri, 10 Nov 2017 00:21:19 GMT" ], "Pragma": [ "no-cache" @@ -1832,19 +1836,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "ade4951d-3054-419f-92bf-c6b9b452d034_M0_M0" + "715a2bf3-0b8d-46da-8c0c-5fe1365a68c1_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1192" + "1186" ], "x-ms-correlation-request-id": [ - "744c7314-fd5c-4e4d-9c33-fc5e04309c2b" + "f50b0726-1b70-425c-97db-3936341069a9" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205522Z:744c7314-fd5c-4e4d-9c33-fc5e04309c2b" + "WESTUS2:20171110T002120Z:f50b0726-1b70-425c-97db-3936341069a9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1865,14 +1869,14 @@ "108" ], "x-ms-client-request-id": [ - "07abf036-be65-4d59-953a-1175e873063f" + "a80df566-c4e3-4470-bdb4-0097f03ad11c" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, "ResponseBody": "{\r\n \"id\": \"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.ServiceBus/namespaces/iotHubCSharpSDKSBNamespaceTest/topics/iotHubCSharpSDKTopicTest/authorizationRules/iotHubCSharpSDKSBTopicTestRule\",\r\n \"name\": \"iotHubCSharpSDKSBTopicTestRule\",\r\n \"type\": \"Microsoft.ServiceBus/AuthorizationRules\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\",\r\n \"Listen\"\r\n ]\r\n }\r\n}", @@ -1887,7 +1891,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:28 GMT" + "Fri, 10 Nov 2017 00:21:26 GMT" ], "Pragma": [ "no-cache" @@ -1903,19 +1907,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "c81d9d75-4cdb-4849-b9e6-2485db898b81_M0_M0" + "58b1a077-3cc8-4e54-a34a-ae91be3da364_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1191" + "1185" ], "x-ms-correlation-request-id": [ - "669cfe91-24f6-44fa-9823-61f3ff806912" + "3cc61cd8-90d1-4cee-a154-28aa2813d2c7" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205528Z:669cfe91-24f6-44fa-9823-61f3ff806912" + "WESTUS2:20171110T002126Z:3cc61cd8-90d1-4cee-a154-28aa2813d2c7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1930,17 +1934,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "d37a4838-20e3-4867-a9b4-10850a197c5e" + "121bad0f-bdf8-4874-b3e7-619f52ac8242" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=6Sz3CdLg/m6y/Dg5SBT6TlCISlpsWO9a3AH93KGVtJ8=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=RYmYqVP7vvR9J2F4xHt+yPU54CIiXt5677pZhmDUyB0=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"primaryKey\": \"6Sz3CdLg/m6y/Dg5SBT6TlCISlpsWO9a3AH93KGVtJ8=\",\r\n \"secondaryKey\": \"RYmYqVP7vvR9J2F4xHt+yPU54CIiXt5677pZhmDUyB0=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=S0O2d/+UxpQOOrnGuCQPzALtOhIPdw5aTPsX1wau1gE=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=FSjAKDjvWT7oJdJU84Lqzyd3IgJjRx6cZQCfxe8DSV0=;EntityPath=iotHubCSharpSDKSBTest\",\r\n \"primaryKey\": \"S0O2d/+UxpQOOrnGuCQPzALtOhIPdw5aTPsX1wau1gE=\",\r\n \"secondaryKey\": \"FSjAKDjvWT7oJdJU84Lqzyd3IgJjRx6cZQCfxe8DSV0=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -1952,7 +1956,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:28 GMT" + "Fri, 10 Nov 2017 00:21:26 GMT" ], "Pragma": [ "no-cache" @@ -1968,19 +1972,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "77b66db3-0143-4a85-9311-0cf1b84d3a10_M0_M0" + "58a6bef0-d0b3-4336-a0c1-095a98ae6f88_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1190" + "1184" ], "x-ms-correlation-request-id": [ - "582f606d-2045-49cd-8d83-7f32c7fd57ee" + "3be3d757-7b4d-4798-b568-113cc6e5db21" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205528Z:582f606d-2045-49cd-8d83-7f32c7fd57ee" + "WESTUS2:20171110T002127Z:3be3d757-7b4d-4798-b568-113cc6e5db21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -1995,17 +1999,17 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "9ff61873-2f91-4993-8146-bc5f32910daf" + "4b63fdfb-7680-4e82-b072-096933b698c1" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.0.2-preview" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.ServiceBus.ServiceBusManagementClient/0.2.0.0" ] }, - "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=jLKeSwiYxpx3NjFpUAFPEBYMpcWmmFwUB5slpgor/eI=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=/Wf1OTCh4BEVHpTZF61KTHXUoUCyOcD7oldh/zt2VGk=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"primaryKey\": \"jLKeSwiYxpx3NjFpUAFPEBYMpcWmmFwUB5slpgor/eI=\",\r\n \"secondaryKey\": \"/Wf1OTCh4BEVHpTZF61KTHXUoUCyOcD7oldh/zt2VGk=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=ApZQA55jdID4Enn932fAeFqcY7TaiWt3ih10ejoDx3U=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://iothubcsharpsdksbnamespacetest.servicebus.windows.net/;SharedAccessKeyName=iotHubCSharpSDKSBTopicTestRule;SharedAccessKey=VDb7eT53hweBcrlCZof+/s1SeNsyOpnaqK1sbpydZlA=;EntityPath=iotHubCSharpSDKTopicTest\",\r\n \"primaryKey\": \"ApZQA55jdID4Enn932fAeFqcY7TaiWt3ih10ejoDx3U=\",\r\n \"secondaryKey\": \"VDb7eT53hweBcrlCZof+/s1SeNsyOpnaqK1sbpydZlA=\",\r\n \"keyName\": \"iotHubCSharpSDKSBTopicTestRule\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -2017,7 +2021,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:55:28 GMT" + "Fri, 10 Nov 2017 00:21:26 GMT" ], "Pragma": [ "no-cache" @@ -2033,19 +2037,19 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "296e28eb-5230-420d-8dc3-e8d8e4db9060_M0_M0" + "98fb8d26-ad50-4720-8369-490247858625_M2_M2" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1189" + "1183" ], "x-ms-correlation-request-id": [ - "c295ee44-ef64-4e65-9be9-2c0f83567dee" + "0f283e66-1f6d-4237-9275-6f71e97b579a" ], "x-ms-routing-request-id": [ - "WESTUS2:20170502T205529Z:c295ee44-ef64-4e65-9be9-2c0f83567dee" + "WESTUS2:20171110T002127Z:0f283e66-1f6d-4237-9275-6f71e97b579a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2054,14 +2058,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/NjM3OTkyMGItNDAwZC00YWU5LWFiMjItODEyMDMxYWQxNTM0?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL05qTTNPVGt5TUdJdE5EQXdaQzAwWVdVNUxXRmlNakl0T0RFeU1ETXhZV1F4TlRNMD9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNDUzOTk0N2MtMDk0Ni00MzlhLTk5ODEtNTc0MWIxNTY3NzQw?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTkRVek9UazBOMk10TURrME5pMDBNemxoTFRrNU9ERXROVGMwTVdJeE5UWTNOelF3P2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -2076,7 +2080,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:56:03 GMT" + "Fri, 10 Nov 2017 00:21:59 GMT" ], "Pragma": [ "no-cache" @@ -2091,16 +2095,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14061" + "14925" ], "x-ms-request-id": [ - "dfd4b301-42c1-4e39-885b-173fd05b48f7" + "89e17c18-a8e1-47ec-81f9-af5cc39f26c4" ], "x-ms-correlation-request-id": [ - "dfd4b301-42c1-4e39-885b-173fd05b48f7" + "89e17c18-a8e1-47ec-81f9-af5cc39f26c4" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205604Z:dfd4b301-42c1-4e39-885b-173fd05b48f7" + "WESTUS2:20171110T002200Z:89e17c18-a8e1-47ec-81f9-af5cc39f26c4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2109,14 +2113,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/NjM3OTkyMGItNDAwZC00YWU5LWFiMjItODEyMDMxYWQxNTM0?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL05qTTNPVGt5TUdJdE5EQXdaQzAwWVdVNUxXRmlNakl0T0RFeU1ETXhZV1F4TlRNMD9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNDUzOTk0N2MtMDk0Ni00MzlhLTk5ODEtNTc0MWIxNTY3NzQw?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTkRVek9UazBOMk10TURrME5pMDBNemxoTFRrNU9ERXROVGMwTVdJeE5UWTNOelF3P2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", @@ -2131,7 +2135,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:56:33 GMT" + "Fri, 10 Nov 2017 00:22:30 GMT" ], "Pragma": [ "no-cache" @@ -2146,16 +2150,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14056" + "14922" ], "x-ms-request-id": [ - "3eb6bd06-01af-48be-9c70-ea0f28536951" + "15f143ba-bb88-4f56-9c16-51bfbca11537" ], "x-ms-correlation-request-id": [ - "3eb6bd06-01af-48be-9c70-ea0f28536951" + "15f143ba-bb88-4f56-9c16-51bfbca11537" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205634Z:3eb6bd06-01af-48be-9c70-ea0f28536951" + "WESTUS2:20171110T002230Z:15f143ba-bb88-4f56-9c16-51bfbca11537" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2164,14 +2168,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/NjM3OTkyMGItNDAwZC00YWU5LWFiMjItODEyMDMxYWQxNTM0?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL05qTTNPVGt5TUdJdE5EQXdaQzAwWVdVNUxXRmlNakl0T0RFeU1ETXhZV1F4TlRNMD9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNDUzOTk0N2MtMDk0Ni00MzlhLTk5ODEtNTc0MWIxNTY3NzQw?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTkRVek9UazBOMk10TURrME5pMDBNemxoTFRrNU9ERXROVGMwTVdJeE5UWTNOelF3P2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", @@ -2186,7 +2190,62 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:57:04 GMT" + "Fri, 10 Nov 2017 00:23:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14921" + ], + "x-ms-request-id": [ + "033baa22-1249-41af-927b-b4eb59d40998" + ], + "x-ms-correlation-request-id": [ + "033baa22-1249-41af-927b-b4eb59d40998" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20171110T002301Z:033baa22-1249-41af-927b-b4eb59d40998" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNjdkOGVlYWUtNDc1MS00NDVmLTlhMzktMGRmOTkyNmFmOWQ2?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTmpka09HVmxZV1V0TkRjMU1TMDBORFZtTFRsaE16a3RNR1JtT1RreU5tRm1PV1EyP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Running\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Nov 2017 00:23:34 GMT" ], "Pragma": [ "no-cache" @@ -2201,16 +2260,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14041" + "14917" ], "x-ms-request-id": [ - "9c9317fc-c016-4472-9ea2-908c648bb513" + "8b3d0ebf-132e-4edf-9977-305915a7db24" ], "x-ms-correlation-request-id": [ - "9c9317fc-c016-4472-9ea2-908c648bb513" + "8b3d0ebf-132e-4edf-9977-305915a7db24" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205704Z:9c9317fc-c016-4472-9ea2-908c648bb513" + "WESTUS2:20171110T002334Z:8b3d0ebf-132e-4edf-9977-305915a7db24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -2219,14 +2278,14 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/NjBlM2MzNjMtOGNmMC00NWMzLWE4N2ItYTBiOTQwNDZmMDIz?api-version=2017-01-19&asyncinfo", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL05qQmxNMk16TmpNdE9HTm1NQzAwTldNekxXRTROMkl0WVRCaU9UUXdORFptTURJej9hcGktdmVyc2lvbj0yMDE3LTAxLTE5JmFzeW5jaW5mbw==", + "RequestUri": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/UpdateDotNetHubRG/providers/Microsoft.Devices/IotHubs/UpdateDotNetHub/operationResults/b3NfaWhfNjdkOGVlYWUtNDc1MS00NDVmLTlhMzktMGRmOTkyNmFmOWQ2?api-version=2017-07-01&asyncinfo", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOTFkMTI2NjAtM2RlYy00NjdhLWJlMmEtMjEzYjU1NDRkZGMwL3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldEh1YlJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGV2aWNlcy9Jb3RIdWJzL1VwZGF0ZURvdE5ldEh1Yi9vcGVyYXRpb25SZXN1bHRzL2IzTmZhV2hmTmpka09HVmxZV1V0TkRjMU1TMDBORFZtTFRsaE16a3RNR1JtT1RreU5tRm1PV1EyP2FwaS12ZXJzaW9uPTIwMTctMDctMDEmYXN5bmNpbmZv", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "User-Agent": [ - "FxVersion/4.6.24410.01", - "Microsoft.Azure.Management.IotHub.IotHubClient/1.0.0" + "FxVersion/4.6.25714.03", + "Microsoft.Azure.Management.IotHub.IotHubClient/1.1.3.0" ] }, "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", @@ -2241,7 +2300,7 @@ "no-cache" ], "Date": [ - "Tue, 02 May 2017 20:57:35 GMT" + "Fri, 10 Nov 2017 00:24:04 GMT" ], "Pragma": [ "no-cache" @@ -2256,16 +2315,16 @@ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14025" + "14915" ], "x-ms-request-id": [ - "f899c615-259a-4c5a-8731-5f042cc2292d" + "e7d78f5a-9778-403e-b5f9-3ed0711aed74" ], "x-ms-correlation-request-id": [ - "f899c615-259a-4c5a-8731-5f042cc2292d" + "e7d78f5a-9778-403e-b5f9-3ed0711aed74" ], "x-ms-routing-request-id": [ - "WESTUS:20170502T205736Z:f899c615-259a-4c5a-8731-5f042cc2292d" + "WESTUS2:20171110T002404Z:e7d78f5a-9778-403e-b5f9-3ed0711aed74" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" diff --git a/src/SDKs/IotHub/Management.IotHub.sln b/src/SDKs/IotHub/Management.IotHub.sln index dbb21c6660669..b66da439fe0e5 100644 --- a/src/SDKs/IotHub/Management.IotHub.sln +++ b/src/SDKs/IotHub/Management.IotHub.sln @@ -1,16 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +VisualStudioVersion = 15.0.26430.4 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IotHub.Tests", "IotHub.Tests\IotHub.Tests.csproj", "{DD48424F-23AE-4CAA-A8C6-78ED453201FF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.IotHub", "Management.IotHub\Microsoft.Azure.Management.IotHub.csproj", "{6D87768F-C148-4850-AA06-B6D0E0319462}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Rest.ClientRuntime", "..\..\SdkCommon\ClientRuntime\ClientRuntime\Microsoft.Rest.ClientRuntime.csproj", "{EEDA577E-5AD8-4594-9CE0-F794D5378D3A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Rest.ClientRuntime.Azure", "..\..\SdkCommon\ClientRuntime.Azure\ClientRuntime.Azure\Microsoft.Rest.ClientRuntime.Azure.csproj", "{91F64021-9177-4B51-9B0B-89BC11F3C37F}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -25,14 +21,6 @@ Global {6D87768F-C148-4850-AA06-B6D0E0319462}.Debug|Any CPU.Build.0 = Debug|Any CPU {6D87768F-C148-4850-AA06-B6D0E0319462}.Release|Any CPU.ActiveCfg = Release|Any CPU {6D87768F-C148-4850-AA06-B6D0E0319462}.Release|Any CPU.Build.0 = Release|Any CPU - {EEDA577E-5AD8-4594-9CE0-F794D5378D3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EEDA577E-5AD8-4594-9CE0-F794D5378D3A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EEDA577E-5AD8-4594-9CE0-F794D5378D3A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EEDA577E-5AD8-4594-9CE0-F794D5378D3A}.Release|Any CPU.Build.0 = Release|Any CPU - {91F64021-9177-4B51-9B0B-89BC11F3C37F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {91F64021-9177-4B51-9B0B-89BC11F3C37F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {91F64021-9177-4B51-9B0B-89BC11F3C37F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {91F64021-9177-4B51-9B0B-89BC11F3C37F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/CertificatesOperations.cs b/src/SDKs/IotHub/Management.IotHub/Generated/CertificatesOperations.cs new file mode 100644 index 0000000000000..ecc7e5807ccb8 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/CertificatesOperations.cs @@ -0,0 +1,1386 @@ +// +// 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.IotHub +{ + 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; + + /// + /// CertificatesOperations operations. + /// + internal partial class CertificatesOperations : IServiceOperations, ICertificatesOperations + { + /// + /// Initializes a new instance of the CertificatesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal CertificatesOperations(IotHubClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the IotHubClient + /// + public IotHubClient Client { get; private set; } + + /// + /// Get the certificate list. + /// + /// + /// Returns the list of certificates. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// 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> ListByIotHubWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByIotHub", 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.Devices/IotHubs/{resourceName}/certificates").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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 certificate. + /// + /// + /// Returns the certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// 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 resourceName, string certificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (certificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); + } + if (certificateName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateName, "^[A-Za-z0-9-._]{1,64}$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateName", "^[A-Za-z0-9-._]{1,64}$"); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("certificateName", certificateName); + 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.Devices/IotHubs/{resourceName}/certificates/{certificateName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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; + } + + /// + /// Upload the certificate to the IoT hub. + /// + /// + /// Adds new or replaces existing certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The certificate body. + /// + /// + /// ETag of the Certificate. Do not specify for creating a brand new + /// certificate. Required to update an existing certificate. + /// + /// + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CertificateBodyDescription certificateDescription, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (certificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); + } + if (certificateName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateName, "^[A-Za-z0-9-._]{1,64}$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateName", "^[A-Za-z0-9-._]{1,64}$"); + } + } + if (certificateDescription == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateDescription"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("certificateName", certificateName); + tracingParameters.Add("certificateDescription", certificateDescription); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", 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.Devices/IotHubs/{resourceName}/certificates/{certificateName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + 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 (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + 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(certificateDescription != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateDescription, 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 != 201 && (int)_statusCode != 200) + { + var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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 == 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); + } + } + // 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 an X509 certificate. + /// + /// + /// Deletes an existing X509 certificate or does nothing if it does not exist. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (certificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); + } + if (certificateName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateName, "^[A-Za-z0-9-._]{1,64}$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateName", "^[A-Za-z0-9-._]{1,64}$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("certificateName", certificateName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.Devices/IotHubs/{resourceName}/certificates/{certificateName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + 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 (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + 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 != 204) + { + var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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; + } + + /// + /// Generate verification code for proof of possession flow. + /// + /// + /// Generates verification code for proof of possession flow. The verification + /// code will be used to generate a leaf certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// 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> GenerateVerificationCodeWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (certificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); + } + if (certificateName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateName, "^[A-Za-z0-9-._]{1,64}$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateName", "^[A-Za-z0-9-._]{1,64}$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("certificateName", certificateName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GenerateVerificationCode", 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.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + 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("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 (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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; + } + + /// + /// Verify certificate's private key possession. + /// + /// + /// Verifies the certificate's private key possession by providing the leaf + /// cert issued by the verifying pre uploaded certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// 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> VerifyWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CertificateVerificationDescription certificateVerificationBody, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (certificateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); + } + if (certificateName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateName, "^[A-Za-z0-9-._]{1,64}$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateName", "^[A-Za-z0-9-._]{1,64}$"); + } + } + if (certificateVerificationBody == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateVerificationBody"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("certificateName", certificateName); + tracingParameters.Add("certificateVerificationBody", certificateVerificationBody); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Verify", 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.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + 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("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 (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + 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(certificateVerificationBody != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateVerificationBody, 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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/src/SDKs/IotHub/Management.IotHub/Generated/CertificatesOperationsExtensions.cs b/src/SDKs/IotHub/Management.IotHub/Generated/CertificatesOperationsExtensions.cs new file mode 100644 index 0000000000000..1d1557a386364 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/CertificatesOperationsExtensions.cs @@ -0,0 +1,370 @@ +// +// 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.IotHub +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for CertificatesOperations. + /// + public static partial class CertificatesOperationsExtensions + { + /// + /// Get the certificate list. + /// + /// + /// Returns the list of certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + public static CertificateListDescription ListByIotHub(this ICertificatesOperations operations, string resourceGroupName, string resourceName) + { + return operations.ListByIotHubAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Get the certificate list. + /// + /// + /// Returns the list of certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The cancellation token. + /// + public static async Task ListByIotHubAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByIotHubWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the certificate. + /// + /// + /// Returns the certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + public static CertificateDescription Get(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName) + { + return operations.GetAsync(resourceGroupName, resourceName, certificateName).GetAwaiter().GetResult(); + } + + /// + /// Get the certificate. + /// + /// + /// Returns the certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Upload the certificate to the IoT hub. + /// + /// + /// Adds new or replaces existing certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The certificate body. + /// + /// + /// ETag of the Certificate. Do not specify for creating a brand new + /// certificate. Required to update an existing certificate. + /// + public static CertificateDescription CreateOrUpdate(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateBodyDescription certificateDescription, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Upload the certificate to the IoT hub. + /// + /// + /// Adds new or replaces existing certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The certificate body. + /// + /// + /// ETag of the Certificate. Do not specify for creating a brand new + /// certificate. Required to update an existing certificate. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateBodyDescription certificateDescription, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete an X509 certificate. + /// + /// + /// Deletes an existing X509 certificate or does nothing if it does not exist. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + public static void Delete(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, resourceName, certificateName, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Delete an X509 certificate. + /// + /// + /// Deletes an existing X509 certificate or does nothing if it does not exist. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Generate verification code for proof of possession flow. + /// + /// + /// Generates verification code for proof of possession flow. The verification + /// code will be used to generate a leaf certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + public static CertificateWithNonceDescription GenerateVerificationCode(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch) + { + return operations.GenerateVerificationCodeAsync(resourceGroupName, resourceName, certificateName, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Generate verification code for proof of possession flow. + /// + /// + /// Generates verification code for proof of possession flow. The verification + /// code will be used to generate a leaf certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// The cancellation token. + /// + public static async Task GenerateVerificationCodeAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GenerateVerificationCodeWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Verify certificate's private key possession. + /// + /// + /// Verifies the certificate's private key possession by providing the leaf + /// cert issued by the verifying pre uploaded certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + public static CertificateDescription Verify(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateVerificationDescription certificateVerificationBody, string ifMatch) + { + return operations.VerifyAsync(resourceGroupName, resourceName, certificateName, certificateVerificationBody, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Verify certificate's private key possession. + /// + /// + /// Verifies the certificate's private key possession by providing the leaf + /// cert issued by the verifying pre uploaded certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// The cancellation token. + /// + public static async Task VerifyAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateVerificationDescription certificateVerificationBody, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.VerifyWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, certificateVerificationBody, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/ICertificatesOperations.cs b/src/SDKs/IotHub/Management.IotHub/Generated/ICertificatesOperations.cs new file mode 100644 index 0000000000000..aa2b3e2e6b23f --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/ICertificatesOperations.cs @@ -0,0 +1,229 @@ +// +// 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.IotHub +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// CertificatesOperations operations. + /// + public partial interface ICertificatesOperations + { + /// + /// Get the certificate list. + /// + /// + /// Returns the list of certificates. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// 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> ListByIotHubWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the certificate. + /// + /// + /// Returns the certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// 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 resourceName, string certificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upload the certificate to the IoT hub. + /// + /// + /// Adds new or replaces existing certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The certificate body. + /// + /// + /// ETag of the Certificate. Do not specify for creating a brand new + /// certificate. Required to update an existing certificate. + /// + /// + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CertificateBodyDescription certificateDescription, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete an X509 certificate. + /// + /// + /// Deletes an existing X509 certificate or does nothing if it does not + /// exist. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// 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 resourceName, string certificateName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Generate verification code for proof of possession flow. + /// + /// + /// Generates verification code for proof of possession flow. The + /// verification code will be used to generate a leaf certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// 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> GenerateVerificationCodeWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Verify certificate's private key possession. + /// + /// + /// Verifies the certificate's private key possession by providing the + /// leaf cert issued by the verifying pre uploaded certificate. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the certificate + /// + /// + /// The name of the certificate + /// + /// + /// ETag of the Certificate. + /// + /// + /// 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> VerifyWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CertificateVerificationDescription certificateVerificationBody, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubClient.cs b/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubClient.cs index 1c2bb3a62678b..1841e1e4c655d 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubClient.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubClient.cs @@ -1,32 +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.IotHub { - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - using Newtonsoft.Json; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using Newtonsoft.Json; /// /// Use this API to manage the IoT hubs in your Azure subscription. /// - public partial interface IIotHubClient : IDisposable + public partial interface IIotHubClient : System.IDisposable { /// /// The base URI of the service. /// - Uri BaseUri { get; set; } + System.Uri BaseUri { get; set; } /// /// Gets or sets json serialization settings. @@ -65,16 +62,26 @@ public partial interface IIotHubClient : IDisposable int? LongRunningOperationRetryTimeout { get; set; } /// - /// When set to true a unique x-ms-client-request-id value is - /// generated and included in each request. Default is true. + /// 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 IOperations. + /// + IOperations Operations { get; } + /// /// Gets the IIotHubResourceOperations. /// IIotHubResourceOperations IotHubResource { get; } + /// + /// Gets the ICertificatesOperations. + /// + ICertificatesOperations Certificates { get; } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubResourceOperations.cs b/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubResourceOperations.cs index 4987af140bb5b..8189ac9d5ed2b 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubResourceOperations.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/IIotHubResourceOperations.cs @@ -1,21 +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.IotHub { - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; /// /// IotHubResourceOperations operations. @@ -43,10 +44,10 @@ public partial interface IIotHubResourceOperations /// /// 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 resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -55,52 +56,22 @@ public partial interface IIotHubResourceOperations /// /// /// Create or update the metadata of an Iot hub. The usual pattern to - /// modify a property is to retrieve the IoT hub metadata and - /// security metadata, and then combine them with the modified values - /// in a new body to update the IoT hub. + /// modify a property is to retrieve the IoT hub metadata and security + /// metadata, and then combine them with the modified values in a new + /// body to update the IoT hub. /// /// /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to create or update. + /// The name of the IoT hub. /// /// /// The IoT hub metadata and security metadata. /// - /// - /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update the metadata of an IoT hub. - /// - /// - /// Create or update the metadata of an Iot hub. The usual pattern to - /// modify a property is to retrieve the IoT hub metadata and - /// security metadata, and then combine them with the modified values - /// in a new body to update the IoT hub. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to create or update. - /// - /// - /// The IoT hub metadata and security metadata. + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT + /// Hub. Required to update an existing IoT Hub. /// /// /// The headers that will be added to request. @@ -111,13 +82,13 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete an IoT hub. /// @@ -128,7 +99,7 @@ public partial interface IIotHubResourceOperations /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to delete. + /// The name of the IoT hub. /// /// /// The headers that will be added to request. @@ -139,42 +110,14 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete an IoT hub. - /// - /// - /// Delete an IoT hub. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to delete. - /// - /// - /// 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> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Get all the IoT hubs in a subscription. /// /// @@ -189,10 +132,10 @@ public partial interface IIotHubResourceOperations /// /// 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)); @@ -203,7 +146,7 @@ public partial interface IIotHubResourceOperations /// Get all the IoT hubs in a resource group. /// /// - /// The name of the resource group that contains the IoT hubs. + /// The name of the resource group that contains the IoT hub. /// /// /// The headers that will be added to request. @@ -214,10 +157,10 @@ public partial interface IIotHubResourceOperations /// /// 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)); @@ -242,10 +185,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> GetStatsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -270,10 +213,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> GetValidSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -303,10 +246,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> ListEventHubConsumerGroupsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -339,10 +282,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> GetEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -375,20 +318,20 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> CreateEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete a consumer group from an Event Hub-compatible endpoint in - /// an IoT hub. + /// Delete a consumer group from an Event Hub-compatible endpoint in an + /// IoT hub. /// /// - /// Delete a consumer group from an Event Hub-compatible endpoint in - /// an IoT hub. + /// Delete a consumer group from an Event Hub-compatible endpoint in an + /// IoT hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -411,7 +354,7 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// Task DeleteEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -440,10 +383,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> ListJobsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -475,10 +418,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> GetJobWithHttpMessagesAsync(string resourceGroupName, string resourceName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -503,10 +446,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> GetQuotaMetricsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -517,8 +460,8 @@ public partial interface IIotHubResourceOperations /// Check if an IoT hub name is available. /// /// - /// Set the name parameter in the OperationInputs structure to the - /// name of the IoT hub to check. + /// Set the name parameter in the OperationInputs structure to the name + /// of the IoT hub to check. /// /// /// The headers that will be added to request. @@ -529,10 +472,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> CheckNameAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -561,10 +504,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> ListKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -596,10 +539,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> GetKeysForKeyNameWithHttpMessagesAsync(string resourceGroupName, string resourceName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -631,21 +574,21 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> ExportDevicesWithHttpMessagesAsync(string resourceGroupName, string resourceName, ExportDevicesRequest exportDevicesParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Import, update, or delete device identities in the IoT hub - /// identity registry from a blob. For more information, see: + /// Import, update, or delete device identities in the IoT hub identity + /// registry from a blob. For more information, see: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. /// /// - /// Import, update, or delete device identities in the IoT hub - /// identity registry from a blob. For more information, see: + /// Import, update, or delete device identities in the IoT hub identity + /// registry from a blob. For more information, see: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. /// /// @@ -666,14 +609,80 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task> ImportDevicesWithHttpMessagesAsync(string resourceGroupName, string resourceName, ImportDevicesRequest importDevicesParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Create or update the metadata of an IoT hub. + /// + /// + /// Create or update the metadata of an Iot hub. The usual pattern to + /// modify a property is to retrieve the IoT hub metadata and security + /// metadata, and then combine them with the modified values in a new + /// body to update the IoT hub. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The IoT hub metadata and security metadata. + /// + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT + /// Hub. Required to update an existing IoT Hub. + /// + /// + /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete an IoT hub. + /// + /// + /// Delete an IoT hub. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// 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> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get all the IoT hubs in a subscription. /// /// @@ -691,10 +700,10 @@ public partial interface IIotHubResourceOperations /// /// 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)); @@ -716,10 +725,10 @@ public partial interface IIotHubResourceOperations /// /// 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)); @@ -741,10 +750,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> GetValidSkusNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -768,10 +777,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> ListEventHubConsumerGroupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -797,10 +806,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> ListJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -822,10 +831,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> GetQuotaMetricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -851,10 +860,10 @@ public partial interface IIotHubResourceOperations /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// Task>> ListKeysNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/IOperations.cs b/src/SDKs/IotHub/Management.IotHub/Generated/IOperations.cs new file mode 100644 index 0000000000000..362d9eb1b0223 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/IOperations.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.IotHub +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + public partial interface IOperations + { + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// 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)); + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// 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/src/SDKs/IotHub/Management.IotHub/Generated/IotHubClient.cs b/src/SDKs/IotHub/Management.IotHub/Generated/IotHubClient.cs index 6adae3868a51b..acce6945bcf81 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/IotHubClient.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/IotHubClient.cs @@ -1,29 +1,25 @@ +// // 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.IotHub { - using System; - using System.Linq; - using System.Collections.Generic; - using System.Diagnostics; - using System.Net; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Text; - using System.Text.RegularExpressions; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; 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; /// /// Use this API to manage the IoT hubs in your Azure subscription. @@ -33,7 +29,7 @@ public partial class IotHubClient : ServiceClient, IIotHubClient, /// /// The base URI of the service. /// - public Uri BaseUri { get; set; } + public System.Uri BaseUri { get; set; } /// /// Gets or sets json serialization settings. @@ -43,7 +39,7 @@ public partial class IotHubClient : ServiceClient, IIotHubClient, /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } + public JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. @@ -77,11 +73,21 @@ public partial class IotHubClient : ServiceClient, IIotHubClient, /// public bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IOperations. + /// + public virtual IOperations Operations { get; private set; } + /// /// Gets the IIotHubResourceOperations. /// public virtual IIotHubResourceOperations IotHubResource { get; private set; } + /// + /// Gets the ICertificatesOperations. + /// + public virtual ICertificatesOperations Certificates { get; private set; } + /// /// Initializes a new instance of the IotHubClient class. /// @@ -90,7 +96,7 @@ public partial class IotHubClient : ServiceClient, IIotHubClient, /// protected IotHubClient(params DelegatingHandler[] handlers) : base(handlers) { - this.Initialize(); + Initialize(); } /// @@ -104,7 +110,7 @@ protected IotHubClient(params DelegatingHandler[] handlers) : base(handlers) /// protected IotHubClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { - this.Initialize(); + Initialize(); } /// @@ -116,16 +122,16 @@ protected IotHubClient(HttpClientHandler rootHandler, params DelegatingHandler[] /// /// Optional. The delegating handlers to add to the http client pipeline. /// - /// + /// /// Thrown when a required parameter is null /// - protected IotHubClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected IotHubClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { - throw new ArgumentNullException("baseUri"); + throw new System.ArgumentNullException("baseUri"); } - this.BaseUri = baseUri; + BaseUri = baseUri; } /// @@ -140,16 +146,16 @@ protected IotHubClient(Uri baseUri, params DelegatingHandler[] handlers) : this( /// /// Optional. The delegating handlers to add to the http client pipeline. /// - /// + /// /// Thrown when a required parameter is null /// - protected IotHubClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected IotHubClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { - throw new ArgumentNullException("baseUri"); + throw new System.ArgumentNullException("baseUri"); } - this.BaseUri = baseUri; + BaseUri = baseUri; } /// @@ -161,19 +167,19 @@ protected IotHubClient(Uri baseUri, HttpClientHandler rootHandler, params Delega /// /// Optional. The delegating handlers to add to the http client pipeline. /// - /// + /// /// Thrown when a required parameter is null /// public IotHubClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { - throw new ArgumentNullException("credentials"); + throw new System.ArgumentNullException("credentials"); } - this.Credentials = credentials; - if (this.Credentials != null) + Credentials = credentials; + if (Credentials != null) { - this.Credentials.InitializeServiceClient(this); + Credentials.InitializeServiceClient(this); } } @@ -189,19 +195,19 @@ public IotHubClient(ServiceClientCredentials credentials, params DelegatingHandl /// /// Optional. The delegating handlers to add to the http client pipeline. /// - /// + /// /// Thrown when a required parameter is null /// public IotHubClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { - throw new ArgumentNullException("credentials"); + throw new System.ArgumentNullException("credentials"); } - this.Credentials = credentials; - if (this.Credentials != null) + Credentials = credentials; + if (Credentials != null) { - this.Credentials.InitializeServiceClient(this); + Credentials.InitializeServiceClient(this); } } @@ -217,24 +223,24 @@ public IotHubClient(ServiceClientCredentials credentials, HttpClientHandler root /// /// Optional. The delegating handlers to add to the http client pipeline. /// - /// + /// /// Thrown when a required parameter is null /// - public IotHubClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public IotHubClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { - throw new ArgumentNullException("baseUri"); + throw new System.ArgumentNullException("baseUri"); } if (credentials == null) { - throw new ArgumentNullException("credentials"); + throw new System.ArgumentNullException("credentials"); } - this.BaseUri = baseUri; - this.Credentials = credentials; - if (this.Credentials != null) + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) { - this.Credentials.InitializeServiceClient(this); + Credentials.InitializeServiceClient(this); } } @@ -253,24 +259,24 @@ public IotHubClient(Uri baseUri, ServiceClientCredentials credentials, params De /// /// Optional. The delegating handlers to add to the http client pipeline. /// - /// + /// /// Thrown when a required parameter is null /// - public IotHubClient(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public IotHubClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { - throw new ArgumentNullException("baseUri"); + throw new System.ArgumentNullException("baseUri"); } if (credentials == null) { - throw new ArgumentNullException("credentials"); + throw new System.ArgumentNullException("credentials"); } - this.BaseUri = baseUri; - this.Credentials = credentials; - if (this.Credentials != null) + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) { - this.Credentials.InitializeServiceClient(this); + Credentials.InitializeServiceClient(this); } } @@ -283,19 +289,21 @@ public IotHubClient(Uri baseUri, ServiceClientCredentials credentials, HttpClien /// private void Initialize() { - this.IotHubResource = new IotHubResourceOperations(this); - this.BaseUri = new Uri("https://management.azure.com"); - this.ApiVersion = "2017-01-19"; - this.AcceptLanguage = "en-US"; - this.LongRunningOperationRetryTimeout = 30; - this.GenerateClientRequestId = true; + Operations = new Operations(this); + IotHubResource = new IotHubResourceOperations(this); + Certificates = new CertificatesOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2017-07-01"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { - Formatting = Formatting.Indented, - DateFormatHandling = DateFormatHandling.IsoDateFormat, - DateTimeZoneHandling = DateTimeZoneHandling.Utc, - NullValueHandling = NullValueHandling.Ignore, - ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + 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 { @@ -304,10 +312,10 @@ private void Initialize() }; DeserializationSettings = new JsonSerializerSettings { - DateFormatHandling = DateFormatHandling.IsoDateFormat, - DateTimeZoneHandling = DateTimeZoneHandling.Utc, - NullValueHandling = NullValueHandling.Ignore, - ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + 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 { @@ -315,7 +323,7 @@ private void Initialize() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); - } + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperations.cs b/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperations.cs index e212c46476637..134ac4a86a4b3 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperations.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperations.cs @@ -1,28 +1,26 @@ +// // 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.IotHub { - using System; - using System.Linq; + 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.Net.Http.Headers; - using System.Text; - using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using Microsoft.Rest.Azure; - using Models; /// /// IotHubResourceOperations operations. @@ -35,16 +33,16 @@ internal partial class IotHubResourceOperations : IServiceOperations /// Reference to the service client. /// - /// + /// /// Thrown when a required parameter is null /// internal IotHubResourceOperations(IotHubClient client) { - if (client == null) + if (client == null) { - throw new ArgumentNullException("client"); + throw new System.ArgumentNullException("client"); } - this.Client = client; + Client = client; } /// @@ -79,16 +77,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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 resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -113,38 +114,40 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,10 +163,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -171,7 +174,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -185,7 +188,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -222,7 +225,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -247,52 +250,66 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and - /// then combine them with the modified values in a new body to update the - /// IoT hub. + /// then combine them with the modified values in a new body to update the IoT + /// hub. /// /// /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to create or update. + /// The name of the IoT hub. /// /// /// The IoT hub metadata and security metadata. /// + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. + /// Required to update an existing IoT Hub. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync( - resourceGroupName, resourceName, iotHubDescription, customHeaders, cancellationToken); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, - customHeaders, - cancellationToken); + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, iotHubDescription, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Create or update the metadata of an IoT hub. + /// Delete an IoT hub. /// /// - /// Create or update the metadata of an Iot hub. The usual pattern to modify a - /// property is to retrieve the IoT hub metadata and security metadata, and - /// then combine them with the modified values in a new body to update the - /// IoT hub. + /// Delete an IoT hub. /// /// /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to create or update. + /// The name of the IoT hub. /// - /// - /// The IoT hub metadata and security metadata. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. /// + public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get all the IoT hubs in a subscription. + /// + /// + /// Get all the IoT hubs in a subscription. + /// /// /// Headers that will be added to request. /// @@ -308,39 +325,22 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); - } - if (iotHubDescription == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "iotHubDescription"); - } - if (iotHubDescription != null) - { - iotHubDescription.Validate(); - } - if (iotHubDescription == null) - { - iotHubDescription = new IotHubDescription(); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -348,45 +348,42 @@ internal IotHubResourceOperations(IotHubClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("iotHubDescription", iotHubDescription); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -401,17 +398,11 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; - if(iotHubDescription != null) - { - _requestContent = SafeJsonConvert.SerializeObject(iotHubDescription, this.Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, Encoding.UTF8); - _httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -419,7 +410,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -427,13 +418,13 @@ internal IotHubResourceOperations(IotHubClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 200) + if ((int)_statusCode != 200) { var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -457,7 +448,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -465,30 +456,12 @@ internal IotHubResourceOperations(IotHubClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.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 == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -508,43 +481,14 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Delete an IoT hub. - /// - /// - /// Delete an IoT hub. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to delete. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync( - resourceGroupName, resourceName, customHeaders, cancellationToken); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken); - } - - /// - /// Delete an IoT hub. + /// Get all the IoT hubs in a resource group. /// /// - /// Delete an IoT hub. + /// Get all the IoT hubs in a resource group. /// /// /// The name of the resource group that contains the IoT hub. /// - /// - /// The name of the IoT hub to delete. - /// /// /// Headers that will be added to request. /// @@ -560,16 +504,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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 resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -577,10 +524,6 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (resourceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -589,43 +532,43 @@ internal IotHubResourceOperations(IotHubClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -641,10 +584,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -652,7 +595,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -660,13 +603,13 @@ internal IotHubResourceOperations(IotHubClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 202 && (int)_statusCode != 200 && (int)_statusCode != 204 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -690,7 +633,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -698,48 +641,12 @@ internal IotHubResourceOperations(IotHubClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.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 == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.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 == 404) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -759,11 +666,17 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get all the IoT hubs in a subscription. + /// Get the statistics from an IoT hub. /// /// - /// Get all the IoT hubs in a subscription. + /// Get the statistics from an IoT hub. /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// /// /// Headers that will be added to request. /// @@ -779,19 +692,30 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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)) + public async Task> GetStatsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -799,40 +723,46 @@ internal IotHubResourceOperations(IotHubClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetStats", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -848,10 +778,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -859,7 +789,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -873,7 +803,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -897,7 +827,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -910,7 +840,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -930,13 +860,16 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get all the IoT hubs in a resource group. + /// Get the list of valid SKUs for an IoT hub. /// /// - /// Get all the IoT hubs in a resource group. + /// Get the list of valid SKUs for an IoT hub. /// /// - /// The name of the resource group that contains the IoT hubs. + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. /// /// /// Headers that will be added to request. @@ -953,16 +886,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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)) + public async Task>> GetValidSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -970,6 +906,10 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -978,41 +918,45 @@ internal IotHubResourceOperations(IotHubClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetValidSkus", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1028,10 +972,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -1039,7 +983,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -1053,7 +997,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1077,7 +1021,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1090,7 +1034,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1110,10 +1054,12 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get the statistics from an IoT hub. + /// Get a list of the consumer groups in the Event Hub-compatible + /// device-to-cloud endpoint in an IoT hub. /// /// - /// Get the statistics from an IoT hub. + /// Get a list of the consumer groups in the Event Hub-compatible + /// device-to-cloud endpoint in an IoT hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -1121,6 +1067,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// + /// + /// The name of the Event Hub-compatible endpoint. + /// /// /// Headers that will be added to request. /// @@ -1136,16 +1085,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> GetStatsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListEventHubConsumerGroupsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -1157,6 +1109,10 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } + if (eventHubEndpointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "eventHubEndpointName"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1166,42 +1122,46 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("eventHubEndpointName", eventHubEndpointName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStats", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListEventHubConsumerGroups", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{eventHubEndpointName}", System.Uri.EscapeDataString(eventHubEndpointName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1217,10 +1177,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -1228,7 +1188,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -1242,7 +1202,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1266,7 +1226,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1279,7 +1239,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1299,10 +1259,12 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get the list of valid SKUs for an IoT hub. + /// Get a consumer group from the Event Hub-compatible device-to-cloud endpoint + /// for an IoT hub. /// /// - /// Get the list of valid SKUs for an IoT hub. + /// Get a consumer group from the Event Hub-compatible device-to-cloud endpoint + /// for an IoT hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -1310,6 +1272,12 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// + /// + /// The name of the Event Hub-compatible endpoint in the IoT hub. + /// + /// + /// The name of the consumer group to retrieve. + /// /// /// Headers that will be added to request. /// @@ -1325,16 +1293,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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>> GetValidSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -1346,6 +1317,14 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } + if (eventHubEndpointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "eventHubEndpointName"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1355,42 +1334,48 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("eventHubEndpointName", eventHubEndpointName); + tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetValidSkus", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetEventHubConsumerGroup", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{eventHubEndpointName}", System.Uri.EscapeDataString(eventHubEndpointName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1406,10 +1391,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -1417,7 +1402,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -1431,7 +1416,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1455,7 +1440,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1468,7 +1453,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1488,12 +1473,10 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get a list of the consumer groups in the Event Hub-compatible - /// device-to-cloud endpoint in an IoT hub. + /// Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. /// /// - /// Get a list of the consumer groups in the Event Hub-compatible - /// device-to-cloud endpoint in an IoT hub. + /// Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -1502,7 +1485,10 @@ internal IotHubResourceOperations(IotHubClient client) /// The name of the IoT hub. /// /// - /// The name of the Event Hub-compatible endpoint. + /// The name of the Event Hub-compatible endpoint in the IoT hub. + /// + /// + /// The name of the consumer group to add. /// /// /// Headers that will be added to request. @@ -1519,16 +1505,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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>> ListEventHubConsumerGroupsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -1544,6 +1533,10 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "eventHubEndpointName"); } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1554,43 +1547,47 @@ internal IotHubResourceOperations(IotHubClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("eventHubEndpointName", eventHubEndpointName); + tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListEventHubConsumerGroups", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateEventHubConsumerGroup", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{eventHubEndpointName}", Uri.EscapeDataString(eventHubEndpointName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{eventHubEndpointName}", System.Uri.EscapeDataString(eventHubEndpointName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1606,10 +1603,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -1617,7 +1614,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -1631,7 +1628,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1655,7 +1652,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1668,7 +1665,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1688,12 +1685,12 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get a consumer group from the Event Hub-compatible device-to-cloud - /// endpoint for an IoT hub. + /// Delete a consumer group from an Event Hub-compatible endpoint in an IoT + /// hub. /// /// - /// Get a consumer group from the Event Hub-compatible device-to-cloud - /// endpoint for an IoT hub. + /// Delete a consumer group from an Event Hub-compatible endpoint in an IoT + /// hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -1705,7 +1702,7 @@ internal IotHubResourceOperations(IotHubClient client) /// The name of the Event Hub-compatible endpoint in the IoT hub. /// /// - /// The name of the consumer group to retrieve. + /// The name of the consumer group to delete. /// /// /// Headers that will be added to request. @@ -1716,22 +1713,22 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> GetEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -1763,43 +1760,45 @@ internal IotHubResourceOperations(IotHubClient client) tracingParameters.Add("eventHubEndpointName", eventHubEndpointName); tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetEventHubConsumerGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "DeleteEventHubConsumerGroup", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{eventHubEndpointName}", Uri.EscapeDataString(eventHubEndpointName)); - _url = _url.Replace("{name}", Uri.EscapeDataString(name)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{eventHubEndpointName}", System.Uri.EscapeDataString(eventHubEndpointName)); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1815,10 +1814,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -1826,7 +1825,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -1840,7 +1839,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1864,31 +1863,13 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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 = SafeJsonConvert.DeserializeObject(_responseContent, this.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); @@ -1897,10 +1878,12 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + /// Get a list of all the jobs in an IoT hub. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. /// /// - /// Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + /// Get a list of all the jobs in an IoT hub. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. /// /// /// The name of the resource group that contains the IoT hub. @@ -1908,12 +1891,6 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// - /// - /// The name of the Event Hub-compatible endpoint in the IoT hub. - /// - /// - /// The name of the consumer group to add. - /// /// /// Headers that will be added to request. /// @@ -1929,16 +1906,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> CreateEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListJobsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -1950,14 +1930,6 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (eventHubEndpointName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "eventHubEndpointName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1967,46 +1939,44 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("eventHubEndpointName", eventHubEndpointName); - tracingParameters.Add("name", name); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateEventHubConsumerGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListJobs", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{eventHubEndpointName}", Uri.EscapeDataString(eventHubEndpointName)); - _url = _url.Replace("{name}", Uri.EscapeDataString(name)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2022,10 +1992,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -2033,7 +2003,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -2047,7 +2017,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2071,7 +2041,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2084,7 +2054,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2104,12 +2074,12 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Delete a consumer group from an Event Hub-compatible endpoint in an IoT - /// hub. + /// Get the details of a job from an IoT hub. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. /// /// - /// Delete a consumer group from an Event Hub-compatible endpoint in an IoT - /// hub. + /// Get the details of a job from an IoT hub. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. /// /// /// The name of the resource group that contains the IoT hub. @@ -2117,11 +2087,8 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// - /// - /// The name of the Event Hub-compatible endpoint in the IoT hub. - /// - /// - /// The name of the consumer group to delete. + /// + /// The job identifier. /// /// /// Headers that will be added to request. @@ -2132,19 +2099,25 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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 DeleteEventHubConsumerGroupWithHttpMessagesAsync(string resourceGroupName, string resourceName, string eventHubEndpointName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetJobWithHttpMessagesAsync(string resourceGroupName, string resourceName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -2156,13 +2129,9 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (eventHubEndpointName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "eventHubEndpointName"); - } - if (name == null) + if (jobId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); + throw new ValidationException(ValidationRules.CannotBeNull, "jobId"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2173,46 +2142,46 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("eventHubEndpointName", eventHubEndpointName); - tracingParameters.Add("name", name); + tracingParameters.Add("jobId", jobId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteEventHubConsumerGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetJob", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{eventHubEndpointName}", Uri.EscapeDataString(eventHubEndpointName)); - _url = _url.Replace("{name}", Uri.EscapeDataString(name)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{jobId}", System.Uri.EscapeDataString(jobId)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2228,10 +2197,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -2239,7 +2208,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -2253,7 +2222,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2277,13 +2246,31 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -2292,12 +2279,10 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get a list of all the jobs in an IoT hub. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + /// Get the quota metrics for an IoT hub. /// /// - /// Get a list of all the jobs in an IoT hub. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + /// Get the quota metrics for an IoT hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -2320,16 +2305,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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>> ListJobsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> GetQuotaMetricsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -2351,41 +2339,43 @@ internal IotHubResourceOperations(IotHubClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListJobs", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetQuotaMetrics", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2401,10 +2391,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -2412,7 +2402,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -2426,7 +2416,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2450,7 +2440,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2463,7 +2453,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2483,21 +2473,14 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get the details of a job from an IoT hub. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + /// Check if an IoT hub name is available. /// /// - /// Get the details of a job from an IoT hub. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + /// Check if an IoT hub name is available. /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub. - /// - /// - /// The job identifier. + /// + /// Set the name parameter in the OperationInputs structure to the name of the + /// IoT hub to check. /// /// /// Headers that will be added to request. @@ -2514,30 +2497,29 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> GetJobWithHttpMessagesAsync(string resourceGroupName, string resourceName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CheckNameAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceName == null) + if (operationInputs == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new ValidationException(ValidationRules.CannotBeNull, "operationInputs"); } - if (jobId == null) + if (operationInputs != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobId"); + operationInputs.Validate(); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2546,46 +2528,43 @@ internal IotHubResourceOperations(IotHubClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("jobId", jobId); + tracingParameters.Add("operationInputs", operationInputs); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetJob", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{jobId}", Uri.EscapeDataString(jobId)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2600,11 +2579,17 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; + if(operationInputs != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(operationInputs, 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 (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -2612,7 +2597,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -2626,7 +2611,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2650,7 +2635,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2663,7 +2648,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2683,10 +2668,12 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get the quota metrics for an IoT hub. + /// Get the security metadata for an IoT hub. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. /// /// - /// Get the quota metrics for an IoT hub. + /// Get the security metadata for an IoT hub. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. /// /// /// The name of the resource group that contains the IoT hub. @@ -2709,16 +2696,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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>> GetQuotaMetricsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -2740,41 +2730,43 @@ internal IotHubResourceOperations(IotHubClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetQuotaMetrics", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListKeys", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2790,10 +2782,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -2801,7 +2793,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -2815,7 +2807,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2839,7 +2831,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2852,7 +2844,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2872,14 +2864,21 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Check if an IoT hub name is available. + /// Get a shared access policy by name from an IoT hub. For more information, + /// see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. /// /// - /// Check if an IoT hub name is available. + /// Get a shared access policy by name from an IoT hub. For more information, + /// see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. /// - /// - /// Set the name parameter in the OperationInputs structure to the name of the - /// IoT hub to check. + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The name of the shared access policy. /// /// /// Headers that will be added to request. @@ -2896,26 +2895,33 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> CheckNameAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetKeysForKeyNameWithHttpMessagesAsync(string resourceGroupName, string resourceName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (operationInputs == null) + if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationInputs"); + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (operationInputs != null) + if (keyName == null) { - operationInputs.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -2924,41 +2930,48 @@ internal IotHubResourceOperations(IotHubClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("operationInputs", operationInputs); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("keyName", keyName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetKeysForKeyName", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2973,17 +2986,11 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; - if(operationInputs != null) - { - _requestContent = SafeJsonConvert.SerializeObject(operationInputs, this.Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, Encoding.UTF8); - _httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -2991,7 +2998,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -3005,7 +3012,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -3029,7 +3036,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3042,7 +3049,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3062,12 +3069,14 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get the security metadata for an IoT hub. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + /// Exports all the device identities in the IoT hub identity registry to an + /// Azure Storage blob container. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. /// /// - /// Get the security metadata for an IoT hub. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + /// Exports all the device identities in the IoT hub identity registry to an + /// Azure Storage blob container. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. /// /// /// The name of the resource group that contains the IoT hub. @@ -3075,6 +3084,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// + /// + /// The parameters that specify the export devices operation. + /// /// /// Headers that will be added to request. /// @@ -3090,16 +3102,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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>> ListKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ExportDevicesWithHttpMessagesAsync(string resourceGroupName, string resourceName, ExportDevicesRequest exportDevicesParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -3111,6 +3126,14 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } + if (exportDevicesParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "exportDevicesParameters"); + } + if (exportDevicesParameters != null) + { + exportDevicesParameters.Validate(); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3120,42 +3143,45 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("exportDevicesParameters", exportDevicesParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListKeys", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ExportDevices", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3170,11 +3196,17 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; + if(exportDevicesParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(exportDevicesParameters, 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 (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -3182,7 +3214,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -3196,7 +3228,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -3220,7 +3252,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3233,7 +3265,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3253,12 +3285,14 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Get a shared access policy by name from an IoT hub. For more information, - /// see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + /// Import, update, or delete device identities in the IoT hub identity + /// registry from a blob. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. /// /// - /// Get a shared access policy by name from an IoT hub. For more information, - /// see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + /// Import, update, or delete device identities in the IoT hub identity + /// registry from a blob. For more information, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. /// /// /// The name of the resource group that contains the IoT hub. @@ -3266,8 +3300,8 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// - /// - /// The name of the shared access policy. + /// + /// The parameters that specify the import devices operation. /// /// /// Headers that will be added to request. @@ -3284,16 +3318,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> GetKeysForKeyNameWithHttpMessagesAsync(string resourceGroupName, string resourceName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ImportDevicesWithHttpMessagesAsync(string resourceGroupName, string resourceName, ImportDevicesRequest importDevicesParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -3305,9 +3342,13 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (keyName == null) + if (importDevicesParameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); + throw new ValidationException(ValidationRules.CannotBeNull, "importDevicesParameters"); + } + if (importDevicesParameters != null) + { + importDevicesParameters.Validate(); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -3318,44 +3359,45 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("keyName", keyName); + tracingParameters.Add("importDevicesParameters", importDevicesParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetKeysForKeyName", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ImportDevices", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); - _url = _url.Replace("{keyName}", Uri.EscapeDataString(keyName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3370,11 +3412,17 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; + if(importDevicesParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(importDevicesParameters, 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 (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -3382,7 +3430,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -3396,7 +3444,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -3420,7 +3468,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3433,7 +3481,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3453,14 +3501,13 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Exports all the device identities in the IoT hub identity registry to an - /// Azure Storage blob container. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + /// Create or update the metadata of an IoT hub. /// /// - /// Exports all the device identities in the IoT hub identity registry to an - /// Azure Storage blob container. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + /// Create or update the metadata of an Iot hub. The usual pattern to modify a + /// property is to retrieve the IoT hub metadata and security metadata, and + /// then combine them with the modified values in a new body to update the IoT + /// hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -3468,8 +3515,12 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// - /// - /// The parameters that specify the export devices operation. + /// + /// The IoT hub metadata and security metadata. + /// + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. + /// Required to update an existing IoT Hub. /// /// /// Headers that will be added to request. @@ -3486,16 +3537,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> ExportDevicesWithHttpMessagesAsync(string resourceGroupName, string resourceName, ExportDevicesRequest exportDevicesParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -3507,13 +3561,13 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (exportDevicesParameters == null) + if (iotHubDescription == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "exportDevicesParameters"); + throw new ValidationException(ValidationRules.CannotBeNull, "iotHubDescription"); } - if (exportDevicesParameters != null) + if (iotHubDescription != null) { - exportDevicesParameters.Validate(); + iotHubDescription.Validate(); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -3524,43 +3578,54 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("exportDevicesParameters", exportDevicesParameters); + tracingParameters.Add("iotHubDescription", iotHubDescription); + tracingParameters.Add("ifMatch", ifMatch); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExportDevices", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3575,17 +3640,17 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; - if(exportDevicesParameters != null) + if(iotHubDescription != null) { - _requestContent = SafeJsonConvert.SerializeObject(exportDevicesParameters, this.Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, Encoding.UTF8); - _httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(iotHubDescription, 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 (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -3593,7 +3658,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -3601,13 +3666,13 @@ internal IotHubResourceOperations(IotHubClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 201 && (int)_statusCode != 200) { var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -3631,7 +3696,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3639,12 +3704,30 @@ internal IotHubResourceOperations(IotHubClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // 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); + } + } + // Deserialize Response if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3664,14 +3747,10 @@ internal IotHubResourceOperations(IotHubClient client) } /// - /// Import, update, or delete device identities in the IoT hub identity - /// registry from a blob. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + /// Delete an IoT hub. /// /// - /// Import, update, or delete device identities in the IoT hub identity - /// registry from a blob. For more information, see: - /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + /// Delete an IoT hub. /// /// /// The name of the resource group that contains the IoT hub. @@ -3679,9 +3758,6 @@ internal IotHubResourceOperations(IotHubClient client) /// /// The name of the IoT hub. /// - /// - /// The parameters that specify the import devices operation. - /// /// /// Headers that will be added to request. /// @@ -3697,16 +3773,19 @@ internal IotHubResourceOperations(IotHubClient client) /// /// 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> ImportDevicesWithHttpMessagesAsync(string resourceGroupName, string resourceName, ImportDevicesRequest importDevicesParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (this.Client.ApiVersion == null) + if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (this.Client.SubscriptionId == null) + if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } @@ -3718,14 +3797,6 @@ internal IotHubResourceOperations(IotHubClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); } - if (importDevicesParameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "importDevicesParameters"); - } - if (importDevicesParameters != null) - { - importDevicesParameters.Validate(); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3735,43 +3806,44 @@ internal IotHubResourceOperations(IotHubClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); - tracingParameters.Add("importDevicesParameters", importDevicesParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ImportDevices", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices").ToString(); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{resourceName}", Uri.EscapeDataString(resourceName)); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); List _queryParameters = new List(); - if (this.Client.ApiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3786,17 +3858,11 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; - if(importDevicesParameters != null) - { - _requestContent = SafeJsonConvert.SerializeObject(importDevicesParameters, this.Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, Encoding.UTF8); - _httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -3804,7 +3870,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -3812,13 +3878,13 @@ internal IotHubResourceOperations(IotHubClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 202 && (int)_statusCode != 200 && (int)_statusCode != 204 && (int)_statusCode != 404) { var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -3842,7 +3908,7 @@ internal IotHubResourceOperations(IotHubClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -3850,12 +3916,48 @@ internal IotHubResourceOperations(IotHubClient client) _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } // 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); + } + } + // Deserialize Response if ((int)_statusCode == 200) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _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 == 404) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -3898,6 +4000,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -3924,26 +4029,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3959,10 +4066,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -3970,7 +4077,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -3984,7 +4091,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -4021,7 +4128,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4064,6 +4171,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4090,26 +4200,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4125,10 +4237,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -4136,7 +4248,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -4150,7 +4262,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -4187,7 +4299,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4230,6 +4342,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4256,26 +4371,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4291,10 +4408,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -4302,7 +4419,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -4316,7 +4433,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -4353,7 +4470,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4398,6 +4515,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4424,26 +4544,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4459,10 +4581,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -4470,7 +4592,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -4484,7 +4606,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -4521,7 +4643,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4566,6 +4688,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4592,26 +4717,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4627,10 +4754,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -4638,7 +4765,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -4652,7 +4779,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -4689,7 +4816,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4732,6 +4859,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4758,26 +4888,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4793,10 +4925,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -4804,7 +4936,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -4818,7 +4950,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -4855,7 +4987,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -4900,6 +5032,9 @@ internal IotHubResourceOperations(IotHubClient client) /// /// Thrown when a required parameter is null /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// @@ -4926,26 +5061,28 @@ internal IotHubResourceOperations(IotHubClient client) List _queryParameters = new List(); if (_queryParameters.Count > 0) { - _url += "?" + string.Join("&", _queryParameters); + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); + var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new Uri(_url); + _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (this.Client.AcceptLanguage != null) + if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); } + + if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4961,10 +5098,10 @@ internal IotHubResourceOperations(IotHubClient client) // Serialize Request string _requestContent = null; // Set Credentials - if (this.Client.Credentials != null) + if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) @@ -4972,7 +5109,7 @@ internal IotHubResourceOperations(IotHubClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -4986,7 +5123,7 @@ internal IotHubResourceOperations(IotHubClient client) try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -5023,7 +5160,7 @@ internal IotHubResourceOperations(IotHubClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperationsExtensions.cs b/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperationsExtensions.cs index 474542bedacd1..83eb20e3b4c16 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperationsExtensions.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/IotHubResourceOperationsExtensions.cs @@ -1,21 +1,20 @@ +// // 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.IotHub { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Threading; + using System.Threading.Tasks; /// /// Extension methods for IotHubResourceOperations. @@ -39,7 +38,7 @@ public static partial class IotHubResourceOperationsExtensions /// public static IotHubDescription Get(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -74,34 +73,8 @@ public static IotHubDescription Get(this IIotHubResourceOperations operations, s /// /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and - /// then combine them with the modified values in a new body to update the - /// IoT hub. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to create or update. - /// - /// - /// The IoT hub metadata and security metadata. - /// - public static IotHubDescription CreateOrUpdate(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription) - { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).CreateOrUpdateAsync(resourceGroupName, resourceName, iotHubDescription), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); - } - - /// - /// Create or update the metadata of an IoT hub. - /// - /// - /// Create or update the metadata of an Iot hub. The usual pattern to modify a - /// property is to retrieve the IoT hub metadata and security metadata, and - /// then combine them with the modified values in a new body to update the - /// IoT hub. + /// then combine them with the modified values in a new body to update the IoT + /// hub. /// /// /// The operations group for this extension method. @@ -110,20 +83,18 @@ public static IotHubDescription CreateOrUpdate(this IIotHubResourceOperations op /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to create or update. + /// The name of the IoT hub. /// /// /// The IoT hub metadata and security metadata. /// - /// - /// The cancellation token. + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. + /// Required to update an existing IoT Hub. /// - public static async Task CreateOrUpdateAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, CancellationToken cancellationToken = default(CancellationToken)) + public static IotHubDescription CreateOrUpdate(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, iotHubDescription, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, iotHubDescription, ifMatch).GetAwaiter().GetResult(); } /// @@ -132,8 +103,8 @@ public static IotHubDescription CreateOrUpdate(this IIotHubResourceOperations op /// /// Create or update the metadata of an Iot hub. The usual pattern to modify a /// property is to retrieve the IoT hub metadata and security metadata, and - /// then combine them with the modified values in a new body to update the - /// IoT hub. + /// then combine them with the modified values in a new body to update the IoT + /// hub. /// /// /// The operations group for this extension method. @@ -142,43 +113,21 @@ public static IotHubDescription CreateOrUpdate(this IIotHubResourceOperations op /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to create or update. + /// The name of the IoT hub. /// /// /// The IoT hub metadata and security metadata. /// - public static IotHubDescription BeginCreateOrUpdate(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription) - { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, resourceName, iotHubDescription), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); - } - - /// - /// Create or update the metadata of an IoT hub. - /// - /// - /// Create or update the metadata of an Iot hub. The usual pattern to modify a - /// property is to retrieve the IoT hub metadata and security metadata, and - /// then combine them with the modified values in a new body to update the - /// IoT hub. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to create or update. - /// - /// - /// The IoT hub metadata and security metadata. + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. + /// Required to update an existing IoT Hub. /// /// /// The cancellation token. /// - public static async Task BeginCreateOrUpdateAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, iotHubDescription, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, iotHubDescription, ifMatch, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -197,11 +146,11 @@ public static IotHubDescription BeginCreateOrUpdate(this IIotHubResourceOperatio /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to delete. + /// The name of the IoT hub. /// public static object Delete(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).DeleteAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -217,7 +166,7 @@ public static object Delete(this IIotHubResourceOperations operations, string re /// The name of the resource group that contains the IoT hub. /// /// - /// The name of the IoT hub to delete. + /// The name of the IoT hub. /// /// /// The cancellation token. @@ -230,52 +179,6 @@ public static object Delete(this IIotHubResourceOperations operations, string re } } - /// - /// Delete an IoT hub. - /// - /// - /// Delete an IoT hub. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to delete. - /// - public static object BeginDelete(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) - { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).BeginDeleteAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); - } - - /// - /// Delete an IoT hub. - /// - /// - /// Delete an IoT hub. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the IoT hub. - /// - /// - /// The name of the IoT hub to delete. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Get all the IoT hubs in a subscription. /// @@ -287,7 +190,7 @@ public static object BeginDelete(this IIotHubResourceOperations operations, stri /// public static IPage ListBySubscription(this IIotHubResourceOperations operations) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListBySubscriptionAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); } /// @@ -320,11 +223,11 @@ public static IPage ListBySubscription(this IIotHubResourceOp /// The operations group for this extension method. /// /// - /// The name of the resource group that contains the IoT hubs. + /// The name of the resource group that contains the IoT hub. /// public static IPage ListByResourceGroup(this IIotHubResourceOperations operations, string resourceGroupName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListByResourceGroupAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); } /// @@ -337,7 +240,7 @@ public static IPage ListByResourceGroup(this IIotHubResourceO /// The operations group for this extension method. /// /// - /// The name of the resource group that contains the IoT hubs. + /// The name of the resource group that contains the IoT hub. /// /// /// The cancellation token. @@ -367,7 +270,7 @@ public static IPage ListByResourceGroup(this IIotHubResourceO /// public static RegistryStatistics GetStats(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetStatsAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetStatsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -413,7 +316,7 @@ public static RegistryStatistics GetStats(this IIotHubResourceOperations operati /// public static IPage GetValidSkus(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetValidSkusAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetValidSkusAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -464,7 +367,7 @@ public static IPage GetValidSkus(this IIotHubResourceOpera /// public static IPage ListEventHubConsumerGroups(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string eventHubEndpointName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListEventHubConsumerGroupsAsync(resourceGroupName, resourceName, eventHubEndpointName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListEventHubConsumerGroupsAsync(resourceGroupName, resourceName, eventHubEndpointName).GetAwaiter().GetResult(); } /// @@ -499,12 +402,12 @@ public static IPage ListEventHubConsumerGroups(this IIotHubResourceOpera } /// - /// Get a consumer group from the Event Hub-compatible device-to-cloud - /// endpoint for an IoT hub. + /// Get a consumer group from the Event Hub-compatible device-to-cloud endpoint + /// for an IoT hub. /// /// - /// Get a consumer group from the Event Hub-compatible device-to-cloud - /// endpoint for an IoT hub. + /// Get a consumer group from the Event Hub-compatible device-to-cloud endpoint + /// for an IoT hub. /// /// /// The operations group for this extension method. @@ -523,16 +426,16 @@ public static IPage ListEventHubConsumerGroups(this IIotHubResourceOpera /// public static EventHubConsumerGroupInfo GetEventHubConsumerGroup(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string eventHubEndpointName, string name) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name).GetAwaiter().GetResult(); } /// - /// Get a consumer group from the Event Hub-compatible device-to-cloud - /// endpoint for an IoT hub. + /// Get a consumer group from the Event Hub-compatible device-to-cloud endpoint + /// for an IoT hub. /// /// - /// Get a consumer group from the Event Hub-compatible device-to-cloud - /// endpoint for an IoT hub. + /// Get a consumer group from the Event Hub-compatible device-to-cloud endpoint + /// for an IoT hub. /// /// /// The operations group for this extension method. @@ -583,7 +486,7 @@ public static EventHubConsumerGroupInfo GetEventHubConsumerGroup(this IIotHubRes /// public static EventHubConsumerGroupInfo CreateEventHubConsumerGroup(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string eventHubEndpointName, string name) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).CreateEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.CreateEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name).GetAwaiter().GetResult(); } /// @@ -643,7 +546,7 @@ public static EventHubConsumerGroupInfo CreateEventHubConsumerGroup(this IIotHub /// public static void DeleteEventHubConsumerGroup(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string eventHubEndpointName, string name) { - Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).DeleteEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + operations.DeleteEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name).GetAwaiter().GetResult(); } /// @@ -674,7 +577,7 @@ public static void DeleteEventHubConsumerGroup(this IIotHubResourceOperations op /// public static async Task DeleteEventHubConsumerGroupAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string eventHubEndpointName, string name, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.DeleteEventHubConsumerGroupWithHttpMessagesAsync(resourceGroupName, resourceName, eventHubEndpointName, name, null, cancellationToken).ConfigureAwait(false); + (await operations.DeleteEventHubConsumerGroupWithHttpMessagesAsync(resourceGroupName, resourceName, eventHubEndpointName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -696,7 +599,7 @@ public static void DeleteEventHubConsumerGroup(this IIotHubResourceOperations op /// public static IPage ListJobs(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListJobsAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListJobsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -749,7 +652,7 @@ public static IPage ListJobs(this IIotHubResourceOperations operati /// public static JobResponse GetJob(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string jobId) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetJobAsync(resourceGroupName, resourceName, jobId), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetJobAsync(resourceGroupName, resourceName, jobId).GetAwaiter().GetResult(); } /// @@ -800,7 +703,7 @@ public static JobResponse GetJob(this IIotHubResourceOperations operations, stri /// public static IPage GetQuotaMetrics(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetQuotaMetricsAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetQuotaMetricsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -844,7 +747,7 @@ public static IPage GetQuotaMetrics(this IIotHubResourceO /// public static IotHubNameAvailabilityInfo CheckNameAvailability(this IIotHubResourceOperations operations, OperationInputs operationInputs) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).CheckNameAvailabilityAsync(operationInputs), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.CheckNameAvailabilityAsync(operationInputs).GetAwaiter().GetResult(); } /// @@ -890,7 +793,7 @@ public static IotHubNameAvailabilityInfo CheckNameAvailability(this IIotHubResou /// public static IPage ListKeys(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListKeysAsync(resourceGroupName, resourceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); } /// @@ -943,7 +846,7 @@ public static IPage ListKeys(this IIotHu /// public static SharedAccessSignatureAuthorizationRule GetKeysForKeyName(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, string keyName) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetKeysForKeyNameAsync(resourceGroupName, resourceName, keyName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetKeysForKeyNameAsync(resourceGroupName, resourceName, keyName).GetAwaiter().GetResult(); } /// @@ -1001,7 +904,7 @@ public static SharedAccessSignatureAuthorizationRule GetKeysForKeyName(this IIot /// public static JobResponse ExportDevices(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, ExportDevicesRequest exportDevicesParameters) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ExportDevicesAsync(resourceGroupName, resourceName, exportDevicesParameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ExportDevicesAsync(resourceGroupName, resourceName, exportDevicesParameters).GetAwaiter().GetResult(); } /// @@ -1061,7 +964,7 @@ public static JobResponse ExportDevices(this IIotHubResourceOperations operation /// public static JobResponse ImportDevices(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, ImportDevicesRequest importDevicesParameters) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ImportDevicesAsync(resourceGroupName, resourceName, importDevicesParameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ImportDevicesAsync(resourceGroupName, resourceName, importDevicesParameters).GetAwaiter().GetResult(); } /// @@ -1097,6 +1000,118 @@ public static JobResponse ImportDevices(this IIotHubResourceOperations operation } } + /// + /// Create or update the metadata of an IoT hub. + /// + /// + /// Create or update the metadata of an Iot hub. The usual pattern to modify a + /// property is to retrieve the IoT hub metadata and security metadata, and + /// then combine them with the modified values in a new body to update the IoT + /// hub. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The IoT hub metadata and security metadata. + /// + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. + /// Required to update an existing IoT Hub. + /// + public static IotHubDescription BeginCreateOrUpdate(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string)) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, iotHubDescription, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Create or update the metadata of an IoT hub. + /// + /// + /// Create or update the metadata of an Iot hub. The usual pattern to modify a + /// property is to retrieve the IoT hub metadata and security metadata, and + /// then combine them with the modified values in a new body to update the IoT + /// hub. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The IoT hub metadata and security metadata. + /// + /// + /// ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. + /// Required to update an existing IoT Hub. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, IotHubDescription iotHubDescription, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, iotHubDescription, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete an IoT hub. + /// + /// + /// Delete an IoT hub. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + public static object BeginDelete(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName) + { + return operations.BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Delete an IoT hub. + /// + /// + /// Delete an IoT hub. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the IoT hub. + /// + /// + /// The name of the IoT hub. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IIotHubResourceOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get all the IoT hubs in a subscription. /// @@ -1111,7 +1126,7 @@ public static JobResponse ImportDevices(this IIotHubResourceOperations operation /// public static IPage ListBySubscriptionNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListBySubscriptionNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// @@ -1151,7 +1166,7 @@ public static IPage ListBySubscriptionNext(this IIotHubResour /// public static IPage ListByResourceGroupNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListByResourceGroupNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// @@ -1191,7 +1206,7 @@ public static IPage ListByResourceGroupNext(this IIotHubResou /// public static IPage GetValidSkusNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetValidSkusNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetValidSkusNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// @@ -1233,7 +1248,7 @@ public static IPage GetValidSkusNext(this IIotHubResourceO /// public static IPage ListEventHubConsumerGroupsNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListEventHubConsumerGroupsNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListEventHubConsumerGroupsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// @@ -1277,7 +1292,7 @@ public static IPage ListEventHubConsumerGroupsNext(this IIotHubResourceO /// public static IPage ListJobsNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListJobsNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListJobsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// @@ -1319,7 +1334,7 @@ public static IPage ListJobsNext(this IIotHubResourceOperations ope /// public static IPage GetQuotaMetricsNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).GetQuotaMetricsNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.GetQuotaMetricsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// @@ -1361,7 +1376,7 @@ public static IPage GetQuotaMetricsNext(this IIotHubResou /// public static IPage ListKeysNext(this IIotHubResourceOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListKeysNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return operations.ListKeysNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/AccessRights.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/AccessRights.cs index 146bb27aabd11..9538cbb5d596f 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/AccessRights.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/AccessRights.cs @@ -1,15 +1,18 @@ +// // 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.IotHub.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; + using System.Runtime; using System.Runtime.Serialization; /// @@ -49,4 +52,87 @@ public enum AccessRights [EnumMember(Value = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect")] RegistryReadRegistryWriteServiceConnectDeviceConnect } + internal static class AccessRightsEnumExtension + { + internal static string ToSerializedValue(this AccessRights? value) + { + return value == null ? null : ((AccessRights)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this AccessRights value) + { + switch( value ) + { + case AccessRights.RegistryRead: + return "RegistryRead"; + case AccessRights.RegistryWrite: + return "RegistryWrite"; + case AccessRights.ServiceConnect: + return "ServiceConnect"; + case AccessRights.DeviceConnect: + return "DeviceConnect"; + case AccessRights.RegistryReadRegistryWrite: + return "RegistryRead, RegistryWrite"; + case AccessRights.RegistryReadServiceConnect: + return "RegistryRead, ServiceConnect"; + case AccessRights.RegistryReadDeviceConnect: + return "RegistryRead, DeviceConnect"; + case AccessRights.RegistryWriteServiceConnect: + return "RegistryWrite, ServiceConnect"; + case AccessRights.RegistryWriteDeviceConnect: + return "RegistryWrite, DeviceConnect"; + case AccessRights.ServiceConnectDeviceConnect: + return "ServiceConnect, DeviceConnect"; + case AccessRights.RegistryReadRegistryWriteServiceConnect: + return "RegistryRead, RegistryWrite, ServiceConnect"; + case AccessRights.RegistryReadRegistryWriteDeviceConnect: + return "RegistryRead, RegistryWrite, DeviceConnect"; + case AccessRights.RegistryReadServiceConnectDeviceConnect: + return "RegistryRead, ServiceConnect, DeviceConnect"; + case AccessRights.RegistryWriteServiceConnectDeviceConnect: + return "RegistryWrite, ServiceConnect, DeviceConnect"; + case AccessRights.RegistryReadRegistryWriteServiceConnectDeviceConnect: + return "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect"; + } + return null; + } + + internal static AccessRights? ParseAccessRights(this string value) + { + switch( value ) + { + case "RegistryRead": + return AccessRights.RegistryRead; + case "RegistryWrite": + return AccessRights.RegistryWrite; + case "ServiceConnect": + return AccessRights.ServiceConnect; + case "DeviceConnect": + return AccessRights.DeviceConnect; + case "RegistryRead, RegistryWrite": + return AccessRights.RegistryReadRegistryWrite; + case "RegistryRead, ServiceConnect": + return AccessRights.RegistryReadServiceConnect; + case "RegistryRead, DeviceConnect": + return AccessRights.RegistryReadDeviceConnect; + case "RegistryWrite, ServiceConnect": + return AccessRights.RegistryWriteServiceConnect; + case "RegistryWrite, DeviceConnect": + return AccessRights.RegistryWriteDeviceConnect; + case "ServiceConnect, DeviceConnect": + return AccessRights.ServiceConnectDeviceConnect; + case "RegistryRead, RegistryWrite, ServiceConnect": + return AccessRights.RegistryReadRegistryWriteServiceConnect; + case "RegistryRead, RegistryWrite, DeviceConnect": + return AccessRights.RegistryReadRegistryWriteDeviceConnect; + case "RegistryRead, ServiceConnect, DeviceConnect": + return AccessRights.RegistryReadServiceConnectDeviceConnect; + case "RegistryWrite, ServiceConnect, DeviceConnect": + return AccessRights.RegistryWriteServiceConnectDeviceConnect; + case "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect": + return AccessRights.RegistryReadRegistryWriteServiceConnectDeviceConnect; + } + return null; + } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Capabilities.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Capabilities.cs index 39a1a7a1ea002..b4ba9e57dfb36 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Capabilities.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Capabilities.cs @@ -1,16 +1,15 @@ +// // 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.IotHub.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; /// /// Defines values for Capabilities. diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateBodyDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateBodyDescription.cs new file mode 100644 index 0000000000000..32feb9d34d5b5 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateBodyDescription.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.IotHub.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The JSON-serialized X509 Certificate. + /// + public partial class CertificateBodyDescription + { + /// + /// Initializes a new instance of the CertificateBodyDescription class. + /// + public CertificateBodyDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateBodyDescription class. + /// + /// base-64 representation of the X509 leaf + /// certificate .cer file or just .pem file content. + public CertificateBodyDescription(string certificate = default(string)) + { + Certificate = certificate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets base-64 representation of the X509 leaf certificate + /// .cer file or just .pem file content. + /// + [JsonProperty(PropertyName = "certificate")] + public string Certificate { get; set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateDescription.cs new file mode 100644 index 0000000000000..b6bd8cdc32492 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateDescription.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.IotHub.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The X509 Certificate. + /// + public partial class CertificateDescription : IResource + { + /// + /// Initializes a new instance of the CertificateDescription class. + /// + public CertificateDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateDescription class. + /// + /// The resource identifier. + /// The name of the certificate. + /// The entity tag. + /// The resource type. + public CertificateDescription(CertificateProperties properties = default(CertificateProperties), string id = default(string), string name = default(string), string etag = default(string), string type = default(string)) + { + Properties = properties; + Id = id; + Name = name; + Etag = etag; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties")] + public CertificateProperties Properties { get; set; } + + /// + /// Gets the resource identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the name of the certificate. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the entity tag. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateListDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateListDescription.cs new file mode 100644 index 0000000000000..f5a2649b27142 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateListDescription.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.IotHub.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The JSON-serialized array of Certificate objects. + /// + public partial class CertificateListDescription + { + /// + /// Initializes a new instance of the CertificateListDescription class. + /// + public CertificateListDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateListDescription class. + /// + /// The array of Certificate objects. + public CertificateListDescription(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the array of Certificate objects. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateProperties.cs new file mode 100644 index 0000000000000..6f66a4a6838ce --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateProperties.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.IotHub.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The description of an X509 CA Certificate. + /// + public partial class CertificateProperties + { + /// + /// Initializes a new instance of the CertificateProperties class. + /// + public CertificateProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateProperties class. + /// + /// The certificate's subject name. + /// The certificate's expiration date and + /// time. + /// The certificate's thumbprint. + /// Determines whether certificate has been + /// verified. + /// The certificate's create date and + /// time. + /// The certificate's last update date and + /// time. + public CertificateProperties(string subject = default(string), System.DateTime? expiry = default(System.DateTime?), string thumbprint = default(string), bool? isVerified = default(bool?), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?)) + { + Subject = subject; + Expiry = expiry; + Thumbprint = thumbprint; + IsVerified = isVerified; + Created = created; + Updated = updated; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the certificate's subject name. + /// + [JsonProperty(PropertyName = "subject")] + public string Subject { get; private set; } + + /// + /// Gets the certificate's expiration date and time. + /// + [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] + [JsonProperty(PropertyName = "expiry")] + public System.DateTime? Expiry { get; private set; } + + /// + /// Gets the certificate's thumbprint. + /// + [JsonProperty(PropertyName = "thumbprint")] + public string Thumbprint { get; private set; } + + /// + /// Gets determines whether certificate has been verified. + /// + [JsonProperty(PropertyName = "isVerified")] + public bool? IsVerified { get; private set; } + + /// + /// Gets the certificate's create date and time. + /// + [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] + [JsonProperty(PropertyName = "created")] + public System.DateTime? Created { get; private set; } + + /// + /// Gets the certificate's last update date and time. + /// + [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] + [JsonProperty(PropertyName = "updated")] + public System.DateTime? Updated { get; private set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificatePropertiesWithNonce.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificatePropertiesWithNonce.cs new file mode 100644 index 0000000000000..b9ed76792b1c9 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificatePropertiesWithNonce.cs @@ -0,0 +1,113 @@ +// +// 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.IotHub.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The description of an X509 CA Certificate including the challenge nonce + /// issued for the Proof-Of-Possession flow. + /// + public partial class CertificatePropertiesWithNonce + { + /// + /// Initializes a new instance of the CertificatePropertiesWithNonce + /// class. + /// + public CertificatePropertiesWithNonce() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificatePropertiesWithNonce + /// class. + /// + /// The certificate's subject name. + /// The certificate's expiration date and + /// time. + /// The certificate's thumbprint. + /// Determines whether certificate has been + /// verified. + /// The certificate's create date and + /// time. + /// The certificate's last update date and + /// time. + /// The certificate's verification code + /// that will be used for proof of possession. + public CertificatePropertiesWithNonce(string subject = default(string), System.DateTime? expiry = default(System.DateTime?), string thumbprint = default(string), bool? isVerified = default(bool?), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), string verificationCode = default(string)) + { + Subject = subject; + Expiry = expiry; + Thumbprint = thumbprint; + IsVerified = isVerified; + Created = created; + Updated = updated; + VerificationCode = verificationCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the certificate's subject name. + /// + [JsonProperty(PropertyName = "subject")] + public string Subject { get; private set; } + + /// + /// Gets the certificate's expiration date and time. + /// + [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] + [JsonProperty(PropertyName = "expiry")] + public System.DateTime? Expiry { get; private set; } + + /// + /// Gets the certificate's thumbprint. + /// + [JsonProperty(PropertyName = "thumbprint")] + public string Thumbprint { get; private set; } + + /// + /// Gets determines whether certificate has been verified. + /// + [JsonProperty(PropertyName = "isVerified")] + public bool? IsVerified { get; private set; } + + /// + /// Gets the certificate's create date and time. + /// + [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] + [JsonProperty(PropertyName = "created")] + public System.DateTime? Created { get; private set; } + + /// + /// Gets the certificate's last update date and time. + /// + [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] + [JsonProperty(PropertyName = "updated")] + public System.DateTime? Updated { get; private set; } + + /// + /// Gets the certificate's verification code that will be used for + /// proof of possession. + /// + [JsonProperty(PropertyName = "verificationCode")] + public string VerificationCode { get; private set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateVerificationDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateVerificationDescription.cs new file mode 100644 index 0000000000000..746491c4db920 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateVerificationDescription.cs @@ -0,0 +1,55 @@ +// +// 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.IotHub.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The JSON-serialized leaf certificate + /// + public partial class CertificateVerificationDescription + { + /// + /// Initializes a new instance of the + /// CertificateVerificationDescription class. + /// + public CertificateVerificationDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CertificateVerificationDescription class. + /// + /// base-64 representation of X509 + /// certificate .cer file or just .pem file content. + public CertificateVerificationDescription(string certificate = default(string)) + { + Certificate = certificate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets base-64 representation of X509 certificate .cer file + /// or just .pem file content. + /// + [JsonProperty(PropertyName = "certificate")] + public string Certificate { get; set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateWithNonceDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateWithNonceDescription.cs new file mode 100644 index 0000000000000..876fb391f14c3 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CertificateWithNonceDescription.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.IotHub.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The X509 Certificate. + /// + public partial class CertificateWithNonceDescription : IResource + { + /// + /// Initializes a new instance of the CertificateWithNonceDescription + /// class. + /// + public CertificateWithNonceDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateWithNonceDescription + /// class. + /// + /// The resource identifier. + /// The name of the certificate. + /// The entity tag. + /// The resource type. + public CertificateWithNonceDescription(CertificatePropertiesWithNonce properties = default(CertificatePropertiesWithNonce), string id = default(string), string name = default(string), string etag = default(string), string type = default(string)) + { + Properties = properties; + Id = id; + Name = name; + Etag = etag; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties")] + public CertificatePropertiesWithNonce Properties { get; set; } + + /// + /// Gets the resource identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the name of the certificate. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the entity tag. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CloudToDeviceProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CloudToDeviceProperties.cs index 6e8748b1fb463..16cda43a1b180 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/CloudToDeviceProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/CloudToDeviceProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The IoT hub cloud-to-device messaging properties. @@ -24,23 +22,36 @@ public partial class CloudToDeviceProperties /// /// Initializes a new instance of the CloudToDeviceProperties class. /// - public CloudToDeviceProperties() { } + public CloudToDeviceProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the CloudToDeviceProperties class. /// - /// The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - /// The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - public CloudToDeviceProperties(int? maxDeliveryCount = default(int?), TimeSpan? defaultTtlAsIso8601 = default(TimeSpan?), FeedbackProperties feedback = default(FeedbackProperties)) + /// The max delivery count for + /// cloud-to-device messages in the device queue. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + /// The default time to live for + /// cloud-to-device messages in the device queue. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + public CloudToDeviceProperties(int? maxDeliveryCount = default(int?), System.TimeSpan? defaultTtlAsIso8601 = default(System.TimeSpan?), FeedbackProperties feedback = default(FeedbackProperties)) { MaxDeliveryCount = maxDeliveryCount; DefaultTtlAsIso8601 = defaultTtlAsIso8601; Feedback = feedback; + CustomInit(); } /// - /// Gets or sets the max delivery count for cloud-to-device messages - /// in the device queue. See: + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the max delivery count for cloud-to-device messages in + /// the device queue. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. /// [JsonProperty(PropertyName = "maxDeliveryCount")] @@ -52,7 +63,7 @@ public CloudToDeviceProperties() { } /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. /// [JsonProperty(PropertyName = "defaultTtlAsIso8601")] - public TimeSpan? DefaultTtlAsIso8601 { get; set; } + public System.TimeSpan? DefaultTtlAsIso8601 { get; set; } /// /// @@ -67,17 +78,17 @@ public CloudToDeviceProperties() { } /// public virtual void Validate() { - if (this.MaxDeliveryCount > 100) + if (MaxDeliveryCount > 100) { throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxDeliveryCount", 100); } - if (this.MaxDeliveryCount < 1) + if (MaxDeliveryCount < 1) { throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxDeliveryCount", 1); } - if (this.Feedback != null) + if (Feedback != null) { - this.Feedback.Validate(); + Feedback.Validate(); } } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetails.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetails.cs index 792c3fd4f7139..9e34f54f476a4 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetails.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetails.cs @@ -1,20 +1,17 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Linq; /// /// Error details. @@ -24,7 +21,10 @@ public partial class ErrorDetails /// /// Initializes a new instance of the ErrorDetails class. /// - public ErrorDetails() { } + public ErrorDetails() + { + CustomInit(); + } /// /// Initializes a new instance of the ErrorDetails class. @@ -39,8 +39,14 @@ public ErrorDetails() { } HttpStatusCode = httpStatusCode; Message = message; Details = details; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the error code. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetailsException.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetailsException.cs index 00448a49382f4..636849763a7b5 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetailsException.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ErrorDetailsException.cs @@ -1,28 +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 0.16.0.0 +// +// 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.IotHub.Models { using Microsoft.Rest; - using System; - using System.Net.Http; - using System.Runtime.Serialization; -#if FullNetFx - using System.Security.Permissions; -#endif /// /// Exception thrown for an invalid response with ErrorDetails information. /// -#if FullNetFx - [Serializable] -#endif - public class ErrorDetailsException : RestException + public partial class ErrorDetailsException : RestException { /// /// Gets information about the associated HTTP request. @@ -60,40 +53,9 @@ public ErrorDetailsException(string message) /// /// The exception message. /// Inner exception. - public ErrorDetailsException(string message, Exception innerException) + public ErrorDetailsException(string message, System.Exception innerException) : base(message, innerException) { } - -#if FullNetFx - /// - /// Initializes a new instance of the ErrorDetailsException class. - /// - /// Serialization info. - /// Streaming context. - protected ErrorDetailsException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - - /// - /// Serializes content of the exception. - /// - /// Serialization info. - /// Streaming context. - [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData(SerializationInfo info, StreamingContext context) - { - base.GetObjectData(info, context); - if (info == null) - { - throw new ArgumentNullException("info"); - } - - info.AddValue("Request", Request); - info.AddValue("Response", Response); - info.AddValue("Body", Body); - } -#endif } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubConsumerGroupInfo.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubConsumerGroupInfo.cs index 44b010595a558..2c9d92eb453fb 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubConsumerGroupInfo.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubConsumerGroupInfo.cs @@ -1,20 +1,19 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// /// The properties of the EventHubConsumerGroupInfo object. @@ -24,21 +23,32 @@ public partial class EventHubConsumerGroupInfo /// /// Initializes a new instance of the EventHubConsumerGroupInfo class. /// - public EventHubConsumerGroupInfo() { } + public EventHubConsumerGroupInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the EventHubConsumerGroupInfo class. /// /// The tags. - /// The Event Hub-compatible consumer group identifier. - /// The Event Hub-compatible consumer group name. + /// The Event Hub-compatible consumer group + /// identifier. + /// The Event Hub-compatible consumer group + /// name. public EventHubConsumerGroupInfo(IDictionary tags = default(IDictionary), string id = default(string), string name = default(string)) { Tags = tags; Id = id; Name = name; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the tags. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubProperties.cs index d3cc299b8c783..ec1e6de96254e 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/EventHubProperties.cs @@ -1,38 +1,45 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// - /// The properties of the provisioned Event Hub-compatible endpoint used - /// by the IoT hub. + /// The properties of the provisioned Event Hub-compatible endpoint used by + /// the IoT hub. /// public partial class EventHubProperties { /// /// Initializes a new instance of the EventHubProperties class. /// - public EventHubProperties() { } + public EventHubProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the EventHubProperties class. /// - /// The retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages - /// The number of paritions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - /// The partition ids in the Event Hub-compatible endpoint. + /// The retention time for + /// device-to-cloud messages in days. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + /// The number of partitions for receiving + /// device-to-cloud messages in the Event Hub-compatible endpoint. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. + /// The partition ids in the Event + /// Hub-compatible endpoint. /// The Event Hub-compatible name. /// The Event Hub-compatible endpoint. public EventHubProperties(long? retentionTimeInDays = default(long?), int? partitionCount = default(int?), IList partitionIds = default(IList), string path = default(string), string endpoint = default(string)) @@ -42,8 +49,14 @@ public EventHubProperties() { } PartitionIds = partitionIds; Path = path; Endpoint = endpoint; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the retention time for device-to-cloud messages in /// days. See: @@ -53,7 +66,7 @@ public EventHubProperties() { } public long? RetentionTimeInDays { get; set; } /// - /// Gets or sets the number of paritions for receiving device-to-cloud + /// Gets or sets the number of partitions for receiving device-to-cloud /// messages in the Event Hub-compatible endpoint. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ExportDevicesRequest.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ExportDevicesRequest.cs index 52c67abe200fa..adbce96afefa4 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ExportDevicesRequest.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ExportDevicesRequest.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// Use to provide parameters when requesting an export of all devices in @@ -25,19 +23,30 @@ public partial class ExportDevicesRequest /// /// Initializes a new instance of the ExportDevicesRequest class. /// - public ExportDevicesRequest() { } + public ExportDevicesRequest() + { + CustomInit(); + } /// /// Initializes a new instance of the ExportDevicesRequest class. /// - /// The export blob container URI. - /// The value indicating whether keys should be excluded during export. + /// The export blob container + /// URI. + /// The value indicating whether keys should + /// be excluded during export. public ExportDevicesRequest(string exportBlobContainerUri, bool excludeKeys) { ExportBlobContainerUri = exportBlobContainerUri; ExcludeKeys = excludeKeys; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the export blob container URI. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/FallbackRouteProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/FallbackRouteProperties.cs index b88b41fa51037..fce803242954f 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/FallbackRouteProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/FallbackRouteProperties.cs @@ -1,43 +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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// - /// The properties related to the fallback route based on which the IoT - /// hub routes messages to the fallback endpoint. + /// The properties of the fallback route. IoT Hub uses these properties + /// when it routes messages to the fallback endpoint. /// public partial class FallbackRouteProperties { /// /// Initializes a new instance of the FallbackRouteProperties class. /// - public FallbackRouteProperties() { } + public FallbackRouteProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the FallbackRouteProperties class. /// - /// The list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed. - /// Used to specify whether the fallback route is enabled or not. - /// The condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + /// The list of endpoints to which the + /// messages that satisfy the condition are routed to. Currently only 1 + /// endpoint is allowed. + /// Used to specify whether the fallback route + /// is enabled. + /// The condition which is evaluated in order + /// to apply the fallback route. If the condition is not provided it + /// will evaluate to true by default. For grammar, See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language public FallbackRouteProperties(IList endpointNames, bool isEnabled, string condition = default(string)) { Condition = condition; EndpointNames = endpointNames; IsEnabled = isEnabled; + CustomInit(); } /// /// Static constructor for FallbackRouteProperties class. @@ -48,9 +58,14 @@ static FallbackRouteProperties() } /// - /// Gets or sets the condition which is evaluated in order to apply - /// the fallback route. If the condition is not provided it will - /// evaluate to true by default. For grammar, See: + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the condition which is evaluated in order to apply the + /// fallback route. If the condition is not provided it will evaluate + /// to true by default. For grammar, See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language /// [JsonProperty(PropertyName = "condition")] @@ -65,15 +80,14 @@ static FallbackRouteProperties() public IList EndpointNames { get; set; } /// - /// Gets or sets used to specify whether the fallback route is enabled - /// or not. + /// Gets or sets used to specify whether the fallback route is enabled. /// [JsonProperty(PropertyName = "isEnabled")] public bool IsEnabled { get; set; } /// - /// The source to which the routing rule is to be applied to. e.g. - /// DeviceMessages + /// The source to which the routing rule is to be applied to. For + /// example, DeviceMessages /// [JsonProperty(PropertyName = "source")] public static string Source { get; private set; } @@ -90,13 +104,13 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "EndpointNames"); } - if (this.EndpointNames != null) + if (EndpointNames != null) { - if (this.EndpointNames.Count > 1) + if (EndpointNames.Count > 1) { throw new ValidationException(ValidationRules.MaxItems, "EndpointNames", 1); } - if (this.EndpointNames.Count < 1) + if (EndpointNames.Count < 1) { throw new ValidationException(ValidationRules.MinItems, "EndpointNames", 1); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/FeedbackProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/FeedbackProperties.cs index c8efaba22b8f5..28c243f9fa2e0 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/FeedbackProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/FeedbackProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties of the feedback queue for cloud-to-device messages. @@ -24,35 +22,50 @@ public partial class FeedbackProperties /// /// Initializes a new instance of the FeedbackProperties class. /// - public FeedbackProperties() { } + public FeedbackProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the FeedbackProperties class. /// - /// The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - /// The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - /// The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - public FeedbackProperties(TimeSpan? lockDurationAsIso8601 = default(TimeSpan?), TimeSpan? ttlAsIso8601 = default(TimeSpan?), int? maxDeliveryCount = default(int?)) + /// The lock duration for the + /// feedback queue. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + /// The period of time for which a message + /// is available to consume before it is expired by the IoT hub. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + /// The number of times the IoT hub + /// attempts to deliver a message on the feedback queue. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + public FeedbackProperties(System.TimeSpan? lockDurationAsIso8601 = default(System.TimeSpan?), System.TimeSpan? ttlAsIso8601 = default(System.TimeSpan?), int? maxDeliveryCount = default(int?)) { LockDurationAsIso8601 = lockDurationAsIso8601; TtlAsIso8601 = ttlAsIso8601; MaxDeliveryCount = maxDeliveryCount; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the lock duration for the feedback queue. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. /// [JsonProperty(PropertyName = "lockDurationAsIso8601")] - public TimeSpan? LockDurationAsIso8601 { get; set; } + public System.TimeSpan? LockDurationAsIso8601 { get; set; } /// - /// Gets or sets the period of time for which a message is available - /// to consume before it is expired by the IoT hub. See: + /// Gets or sets the period of time for which a message is available to + /// consume before it is expired by the IoT hub. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. /// [JsonProperty(PropertyName = "ttlAsIso8601")] - public TimeSpan? TtlAsIso8601 { get; set; } + public System.TimeSpan? TtlAsIso8601 { get; set; } /// /// Gets or sets the number of times the IoT hub attempts to deliver a @@ -70,11 +83,11 @@ public FeedbackProperties() { } /// public virtual void Validate() { - if (this.MaxDeliveryCount > 100) + if (MaxDeliveryCount > 100) { throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxDeliveryCount", 100); } - if (this.MaxDeliveryCount < 1) + if (MaxDeliveryCount < 1) { throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxDeliveryCount", 1); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ImportDevicesRequest.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ImportDevicesRequest.cs index 0d465219a3517..9b82333d227a8 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/ImportDevicesRequest.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/ImportDevicesRequest.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// Use to provide parameters when requesting an import of all devices in @@ -25,19 +23,30 @@ public partial class ImportDevicesRequest /// /// Initializes a new instance of the ImportDevicesRequest class. /// - public ImportDevicesRequest() { } + public ImportDevicesRequest() + { + CustomInit(); + } /// /// Initializes a new instance of the ImportDevicesRequest class. /// - /// The input blob container URI. - /// The output blob container URI. + /// The input blob container + /// URI. + /// The output blob container + /// URI. public ImportDevicesRequest(string inputBlobContainerUri, string outputBlobContainerUri) { InputBlobContainerUri = inputBlobContainerUri; OutputBlobContainerUri = outputBlobContainerUri; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the input blob container URI. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubCapacity.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubCapacity.cs index 809cd81d52e51..fe8244242a620 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubCapacity.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubCapacity.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// IoT Hub capacity information. @@ -24,7 +22,10 @@ public partial class IotHubCapacity /// /// Initializes a new instance of the IotHubCapacity class. /// - public IotHubCapacity() { } + public IotHubCapacity() + { + CustomInit(); + } /// /// Initializes a new instance of the IotHubCapacity class. @@ -32,15 +33,22 @@ public IotHubCapacity() { } /// The minimum number of units. /// The maximum number of units. /// The default number of units. - /// The type of the scaling enabled. Possible values include: 'Automatic', 'Manual', 'None' + /// The type of the scaling enabled. Possible + /// values include: 'Automatic', 'Manual', 'None' public IotHubCapacity(long? minimum = default(long?), long? maximum = default(long?), long? defaultProperty = default(long?), IotHubScaleType? scaleType = default(IotHubScaleType?)) { Minimum = minimum; Maximum = maximum; DefaultProperty = defaultProperty; ScaleType = scaleType; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the minimum number of units. /// @@ -74,11 +82,11 @@ public IotHubCapacity() { } /// public virtual void Validate() { - if (this.Minimum > 1) + if (Minimum > 1) { throw new ValidationException(ValidationRules.InclusiveMaximum, "Minimum", 1); } - if (this.Minimum < 1) + if (Minimum < 1) { throw new ValidationException(ValidationRules.InclusiveMinimum, "Minimum", 1); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubDescription.cs index 4119088dac7a4..b012fa0c5786a 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubDescription.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubDescription.cs @@ -1,60 +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 0.16.0.0 +// +// 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// - /// The description of the IotHub. + /// The description of the IoT hub. /// public partial class IotHubDescription : Resource { /// /// Initializes a new instance of the IotHubDescription class. /// - public IotHubDescription() { } + public IotHubDescription() + { + CustomInit(); + } /// /// Initializes a new instance of the IotHubDescription class. /// - public IotHubDescription(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string subscriptionid = default(string), string resourcegroup = default(string), string etag = default(string), IotHubProperties properties = default(IotHubProperties), IotHubSkuInfo sku = default(IotHubSkuInfo)) - : base(id, name, type, location, tags) + /// The resource location. + /// The subscription identifier. + /// The name of the resource group that + /// contains the IoT hub. A resource group name uniquely identifies the + /// resource group within the subscription. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// The resource tags. + /// The Etag field is *not* required. If it is + /// provided in the response body, it must also be provided as a header + /// per the normal ETag convention. + public IotHubDescription(string location, string subscriptionid, string resourcegroup, IotHubSkuInfo sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string etag = default(string), IotHubProperties properties = default(IotHubProperties)) + : base(location, id, name, type, tags) { Subscriptionid = subscriptionid; Resourcegroup = resourcegroup; Etag = etag; Properties = properties; Sku = sku; + CustomInit(); } /// - /// The subscription identifier. + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the subscription identifier. /// [JsonProperty(PropertyName = "subscriptionid")] public string Subscriptionid { get; set; } /// - /// The resource group name uniquely identifies the resource group - /// within the user subscriptionId. + /// Gets or sets the name of the resource group that contains the IoT + /// hub. A resource group name uniquely identifies the resource group + /// within the subscription. /// [JsonProperty(PropertyName = "resourcegroup")] public string Resourcegroup { get; set; } /// - /// The Etag field is *not* required. If it is provided in the - /// response body, it must also be provided as a header per the + /// Gets or sets the Etag field is *not* required. If it is provided in + /// the response body, it must also be provided as a header per the /// normal ETag convention. /// [JsonProperty(PropertyName = "etag")] @@ -71,14 +93,33 @@ public IotHubDescription() { } public IotHubSkuInfo Sku { get; set; } /// - /// Validate the object. Throws ValidationException if validation fails. + /// Validate the object. /// + /// + /// Thrown if validation fails + /// public override void Validate() { base.Validate(); - if (this.Properties != null) + if (Subscriptionid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subscriptionid"); + } + if (Resourcegroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Resourcegroup"); + } + if (Sku == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Sku"); + } + if (Properties != null) + { + Properties.Validate(); + } + if (Sku != null) { - this.Properties.Validate(); + Sku.Validate(); } } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameAvailabilityInfo.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameAvailabilityInfo.cs index cb5f469b43c9a..1d3854ad58c94 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameAvailabilityInfo.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameAvailabilityInfo.cs @@ -1,20 +1,17 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Linq; /// /// The properties indicating whether a given IoT hub name is available. @@ -24,21 +21,32 @@ public partial class IotHubNameAvailabilityInfo /// /// Initializes a new instance of the IotHubNameAvailabilityInfo class. /// - public IotHubNameAvailabilityInfo() { } + public IotHubNameAvailabilityInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the IotHubNameAvailabilityInfo class. /// - /// The value which indicates whether the provided name is available. - /// The reason for unavailability. Possible values include: 'Invalid', 'AlreadyExists' + /// The value which indicates whether the + /// provided name is available. + /// The reason for unavailability. Possible values + /// include: 'Invalid', 'AlreadyExists' /// The detailed reason message. public IotHubNameAvailabilityInfo(bool? nameAvailable = default(bool?), IotHubNameUnavailabilityReason? reason = default(IotHubNameUnavailabilityReason?), string message = default(string)) { NameAvailable = nameAvailable; Reason = reason; Message = message; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the value which indicates whether the provided name is /// available. diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameUnavailabilityReason.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameUnavailabilityReason.cs index ab4800707ecda..51bd17445424e 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameUnavailabilityReason.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubNameUnavailabilityReason.cs @@ -1,15 +1,18 @@ +// // 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.IotHub.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; + using System.Runtime; using System.Runtime.Serialization; /// @@ -23,4 +26,35 @@ public enum IotHubNameUnavailabilityReason [EnumMember(Value = "AlreadyExists")] AlreadyExists } + internal static class IotHubNameUnavailabilityReasonEnumExtension + { + internal static string ToSerializedValue(this IotHubNameUnavailabilityReason? value) + { + return value == null ? null : ((IotHubNameUnavailabilityReason)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this IotHubNameUnavailabilityReason value) + { + switch( value ) + { + case IotHubNameUnavailabilityReason.Invalid: + return "Invalid"; + case IotHubNameUnavailabilityReason.AlreadyExists: + return "AlreadyExists"; + } + return null; + } + + internal static IotHubNameUnavailabilityReason? ParseIotHubNameUnavailabilityReason(this string value) + { + switch( value ) + { + case "Invalid": + return IotHubNameUnavailabilityReason.Invalid; + case "AlreadyExists": + return IotHubNameUnavailabilityReason.AlreadyExists; + } + return null; + } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubProperties.cs index 1286c0cebc2ee..7f2da49e70ff1 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubProperties.cs @@ -1,20 +1,19 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// /// The properties of an IoT hub. @@ -26,21 +25,37 @@ public partial class IotHubProperties /// public IotHubProperties() { + CustomInit(); } /// /// Initializes a new instance of the IotHubProperties class. /// - /// The shared access policies you can use to secure a connection to the IoT hub. + /// The shared access policies you + /// can use to secure a connection to the IoT hub. /// The IP filter rules. /// The provisioning state. /// The name of the host. - /// The Event Hub-compatible endpoint properties. The possible keys to this dictionary are events and operationsMonitoringEvents. Both of these keys have to be present in the dictionary while making create or update calls for the IoT hub. - /// The list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown. - /// The messaging endpoint properties for the file upload notification queue. - /// If True, file upload notifications are enabled. - /// Comments. - /// The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' + /// The Event Hub-compatible endpoint + /// properties. The possible keys to this dictionary are events and + /// operationsMonitoringEvents. Both of these keys have to be present + /// in the dictionary while making create or update calls for the IoT + /// hub. + /// The list of Azure Storage endpoints + /// where you can upload files. Currently you can configure only one + /// Azure Storage account and that MUST have its key as $default. + /// Specifying more than one storage account causes an error to be + /// thrown. Not specifying a value for this property when the + /// enableFileUploadNotifications property is set to True, causes an + /// error to be thrown. + /// The messaging endpoint properties + /// for the file upload notification queue. + /// If True, file upload + /// notifications are enabled. + /// IoT hub comments. + /// The capabilities and features enabled for + /// the IoT hub. Possible values include: 'None', + /// 'DeviceManagement' public IotHubProperties(IList authorizationPolicies = default(IList), IList ipFilterRules = default(IList), string provisioningState = default(string), string hostName = default(string), IDictionary eventHubEndpoints = default(IDictionary), RoutingProperties routing = default(RoutingProperties), IDictionary storageEndpoints = default(IDictionary), IDictionary messagingEndpoints = default(IDictionary), bool? enableFileUploadNotifications = default(bool?), CloudToDeviceProperties cloudToDevice = default(CloudToDeviceProperties), string comments = default(string), OperationsMonitoringProperties operationsMonitoringProperties = default(OperationsMonitoringProperties), string features = default(string)) { AuthorizationPolicies = authorizationPolicies; @@ -56,8 +71,14 @@ public IotHubProperties() Comments = comments; OperationsMonitoringProperties = operationsMonitoringProperties; Features = features; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the shared access policies you can use to secure a /// connection to the IoT hub. @@ -129,7 +150,7 @@ public IotHubProperties() public CloudToDeviceProperties CloudToDevice { get; set; } /// - /// Gets or sets comments. + /// Gets or sets ioT hub comments. /// [JsonProperty(PropertyName = "comments")] public string Comments { get; set; } @@ -140,8 +161,8 @@ public IotHubProperties() public OperationsMonitoringProperties OperationsMonitoringProperties { get; set; } /// - /// Gets or sets the capabilities and features enabled for the IoT - /// hub. Possible values include: 'None', 'DeviceManagement' + /// Gets or sets the capabilities and features enabled for the IoT hub. + /// Possible values include: 'None', 'DeviceManagement' /// [JsonProperty(PropertyName = "features")] public string Features { get; set; } @@ -149,14 +170,14 @@ public IotHubProperties() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (this.AuthorizationPolicies != null) + if (AuthorizationPolicies != null) { - foreach (var element in this.AuthorizationPolicies) + foreach (var element in AuthorizationPolicies) { if (element != null) { @@ -164,9 +185,9 @@ public virtual void Validate() } } } - if (this.IpFilterRules != null) + if (IpFilterRules != null) { - foreach (var element1 in this.IpFilterRules) + foreach (var element1 in IpFilterRules) { if (element1 != null) { @@ -174,13 +195,13 @@ public virtual void Validate() } } } - if (this.Routing != null) + if (Routing != null) { - this.Routing.Validate(); + Routing.Validate(); } - if (this.StorageEndpoints != null) + if (StorageEndpoints != null) { - foreach (var valueElement in this.StorageEndpoints.Values) + foreach (var valueElement in StorageEndpoints.Values) { if (valueElement != null) { @@ -188,9 +209,9 @@ public virtual void Validate() } } } - if (this.MessagingEndpoints != null) + if (MessagingEndpoints != null) { - foreach (var valueElement1 in this.MessagingEndpoints.Values) + foreach (var valueElement1 in MessagingEndpoints.Values) { if (valueElement1 != null) { @@ -198,9 +219,9 @@ public virtual void Validate() } } } - if (this.CloudToDevice != null) + if (CloudToDevice != null) { - this.CloudToDevice.Validate(); + CloudToDevice.Validate(); } } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubQuotaMetricInfo.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubQuotaMetricInfo.cs index 13ed5659cddaa..ca0e6803d1f8b 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubQuotaMetricInfo.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubQuotaMetricInfo.cs @@ -1,20 +1,17 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Linq; /// /// Quota metrics properties. @@ -24,21 +21,32 @@ public partial class IotHubQuotaMetricInfo /// /// Initializes a new instance of the IotHubQuotaMetricInfo class. /// - public IotHubQuotaMetricInfo() { } + public IotHubQuotaMetricInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the IotHubQuotaMetricInfo class. /// /// The name of the quota metric. - /// The current value for the quota metric. - /// The maximum value of the quota metric. + /// The current value for the quota + /// metric. + /// The maximum value of the quota + /// metric. public IotHubQuotaMetricInfo(string name = default(string), long? currentValue = default(long?), long? maxValue = default(long?)) { Name = name; CurrentValue = currentValue; MaxValue = maxValue; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the name of the quota metric. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubScaleType.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubScaleType.cs index db90ffc1b8318..aa3652675f5b5 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubScaleType.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubScaleType.cs @@ -1,15 +1,18 @@ +// // 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.IotHub.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; + using System.Runtime; using System.Runtime.Serialization; /// @@ -25,4 +28,39 @@ public enum IotHubScaleType [EnumMember(Value = "None")] None } + internal static class IotHubScaleTypeEnumExtension + { + internal static string ToSerializedValue(this IotHubScaleType? value) + { + return value == null ? null : ((IotHubScaleType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this IotHubScaleType value) + { + switch( value ) + { + case IotHubScaleType.Automatic: + return "Automatic"; + case IotHubScaleType.Manual: + return "Manual"; + case IotHubScaleType.None: + return "None"; + } + return null; + } + + internal static IotHubScaleType? ParseIotHubScaleType(this string value) + { + switch( value ) + { + case "Automatic": + return IotHubScaleType.Automatic; + case "Manual": + return IotHubScaleType.Manual; + case "None": + return IotHubScaleType.None; + } + return null; + } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSku.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSku.cs index 5b606dae7ea6f..b90135deb2ea3 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSku.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSku.cs @@ -1,16 +1,15 @@ +// // 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.IotHub.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; /// /// Defines values for IotHubSku. diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuDescription.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuDescription.cs index f3d28c49fe3aa..76f84abce622e 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuDescription.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuDescription.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// SKU properties. @@ -24,7 +22,10 @@ public partial class IotHubSkuDescription /// /// Initializes a new instance of the IotHubSkuDescription class. /// - public IotHubSkuDescription() { } + public IotHubSkuDescription() + { + CustomInit(); + } /// /// Initializes a new instance of the IotHubSkuDescription class. @@ -35,8 +36,14 @@ public IotHubSkuDescription() { } ResourceType = resourceType; Sku = sku; Capacity = capacity; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the type of the resource. /// @@ -69,13 +76,13 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Capacity"); } - if (this.Sku != null) + if (Sku != null) { - this.Sku.Validate(); + Sku.Validate(); } - if (this.Capacity != null) + if (Capacity != null) { - this.Capacity.Validate(); + Capacity.Validate(); } } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuInfo.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuInfo.cs index a45a2a2830cea..b8435049a5950 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuInfo.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuInfo.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// Information about the SKU of the IoT hub. @@ -24,21 +22,34 @@ public partial class IotHubSkuInfo /// /// Initializes a new instance of the IotHubSkuInfo class. /// - public IotHubSkuInfo() { } + public IotHubSkuInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the IotHubSkuInfo class. /// - /// The name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3' - /// The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - /// The billing tier for the IoT hub. Possible values include: 'Free', 'Standard' + /// The name of the SKU. Possible values include: + /// 'F1', 'S1', 'S2', 'S3' + /// The number of provisioned IoT Hub units. + /// See: + /// https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. + /// The billing tier for the IoT hub. Possible + /// values include: 'Free', 'Standard' public IotHubSkuInfo(string name, long capacity, IotHubSkuTier? tier = default(IotHubSkuTier?)) { Name = name; Tier = tier; Capacity = capacity; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the SKU. Possible values include: 'F1', /// 'S1', 'S2', 'S3' diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuTier.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuTier.cs index 4791aef6ed9ad..fdf5c63eb85bd 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuTier.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IotHubSkuTier.cs @@ -1,15 +1,18 @@ +// // 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.IotHub.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; + using System.Runtime; using System.Runtime.Serialization; /// @@ -23,4 +26,35 @@ public enum IotHubSkuTier [EnumMember(Value = "Standard")] Standard } + internal static class IotHubSkuTierEnumExtension + { + internal static string ToSerializedValue(this IotHubSkuTier? value) + { + return value == null ? null : ((IotHubSkuTier)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this IotHubSkuTier value) + { + switch( value ) + { + case IotHubSkuTier.Free: + return "Free"; + case IotHubSkuTier.Standard: + return "Standard"; + } + return null; + } + + internal static IotHubSkuTier? ParseIotHubSkuTier(this string value) + { + switch( value ) + { + case "Free": + return IotHubSkuTier.Free; + case "Standard": + return IotHubSkuTier.Standard; + } + return null; + } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterActionType.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterActionType.cs index 4358fd36f61bc..f3832ab26cc90 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterActionType.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterActionType.cs @@ -1,15 +1,18 @@ +// // 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.IotHub.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; + using System.Runtime; using System.Runtime.Serialization; /// @@ -23,4 +26,35 @@ public enum IpFilterActionType [EnumMember(Value = "Reject")] Reject } + internal static class IpFilterActionTypeEnumExtension + { + internal static string ToSerializedValue(this IpFilterActionType? value) + { + return value == null ? null : ((IpFilterActionType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this IpFilterActionType value) + { + switch( value ) + { + case IpFilterActionType.Accept: + return "Accept"; + case IpFilterActionType.Reject: + return "Reject"; + } + return null; + } + + internal static IpFilterActionType? ParseIpFilterActionType(this string value) + { + switch( value ) + { + case "Accept": + return IpFilterActionType.Accept; + case "Reject": + return IpFilterActionType.Reject; + } + return null; + } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterRule.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterRule.cs index b20f7059eca87..73a27181ecbb8 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterRule.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/IpFilterRule.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The IP filter rules for the IoT hub. @@ -24,21 +22,32 @@ public partial class IpFilterRule /// /// Initializes a new instance of the IpFilterRule class. /// - public IpFilterRule() { } + public IpFilterRule() + { + CustomInit(); + } /// /// Initializes a new instance of the IpFilterRule class. /// /// The name of the IP filter rule. - /// The desired action for requests captured by this rule. Possible values include: 'Accept', 'Reject' - /// A string that contains the IP address range in CIDR notation for the rule. + /// The desired action for requests captured by + /// this rule. Possible values include: 'Accept', 'Reject' + /// A string that contains the IP address range in + /// CIDR notation for the rule. public IpFilterRule(string filterName, IpFilterActionType action, string ipMask) { FilterName = filterName; Action = action; IpMask = ipMask; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the IP filter rule. /// @@ -46,8 +55,8 @@ public IpFilterRule(string filterName, IpFilterActionType action, string ipMask) public string FilterName { get; set; } /// - /// Gets or sets the desired action for requests captured by this - /// rule. Possible values include: 'Accept', 'Reject' + /// Gets or sets the desired action for requests captured by this rule. + /// Possible values include: 'Accept', 'Reject' /// [JsonProperty(PropertyName = "action")] public IpFilterActionType Action { get; set; } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobResponse.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobResponse.cs index c933e7ca01d1a..51fe7db62ceb9 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobResponse.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobResponse.cs @@ -1,20 +1,19 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties of the Job Response object. @@ -24,20 +23,31 @@ public partial class JobResponse /// /// Initializes a new instance of the JobResponse class. /// - public JobResponse() { } + public JobResponse() + { + CustomInit(); + } /// /// Initializes a new instance of the JobResponse class. /// /// The job identifier. /// The start time of the job. - /// The time the job stopped processing. - /// The type of the job. Possible values include: 'unknown', 'export', 'import', 'backup', 'readDeviceProperties', 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', 'factoryResetDevice', 'firmwareUpdate' - /// The status of the job. Possible values include: 'unknown', 'enqueued', 'running', 'completed', 'failed', 'cancelled' - /// If status == failed, this string containing the reason for the failure. + /// The time the job stopped + /// processing. + /// The type of the job. Possible values include: + /// 'unknown', 'export', 'import', 'backup', 'readDeviceProperties', + /// 'writeDeviceProperties', 'updateDeviceConfiguration', + /// 'rebootDevice', 'factoryResetDevice', 'firmwareUpdate' + /// The status of the job. Possible values + /// include: 'unknown', 'enqueued', 'running', 'completed', 'failed', + /// 'cancelled' + /// If status == failed, this string + /// containing the reason for the failure. /// The status message for the job. - /// The job identifier of the parent job, if any. - public JobResponse(string jobId = default(string), DateTime? startTimeUtc = default(DateTime?), DateTime? endTimeUtc = default(DateTime?), string type = default(string), JobStatus? status = default(JobStatus?), string failureReason = default(string), string statusMessage = default(string), string parentJobId = default(string)) + /// The job identifier of the parent job, if + /// any. + public JobResponse(string jobId = default(string), System.DateTime? startTimeUtc = default(System.DateTime?), System.DateTime? endTimeUtc = default(System.DateTime?), string type = default(string), JobStatus? status = default(JobStatus?), string failureReason = default(string), string statusMessage = default(string), string parentJobId = default(string)) { JobId = jobId; StartTimeUtc = startTimeUtc; @@ -47,8 +57,14 @@ public JobResponse() { } FailureReason = failureReason; StatusMessage = statusMessage; ParentJobId = parentJobId; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the job identifier. /// @@ -60,14 +76,14 @@ public JobResponse() { } /// [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] [JsonProperty(PropertyName = "startTimeUtc")] - public DateTime? StartTimeUtc { get; private set; } + public System.DateTime? StartTimeUtc { get; private set; } /// /// Gets the time the job stopped processing. /// [JsonConverter(typeof(DateTimeRfc1123JsonConverter))] [JsonProperty(PropertyName = "endTimeUtc")] - public DateTime? EndTimeUtc { get; private set; } + public System.DateTime? EndTimeUtc { get; private set; } /// /// Gets the type of the job. Possible values include: 'unknown', @@ -86,8 +102,8 @@ public JobResponse() { } public JobStatus? Status { get; private set; } /// - /// Gets if status == failed, this string containing the reason for - /// the failure. + /// Gets if status == failed, this string containing the reason for the + /// failure. /// [JsonProperty(PropertyName = "failureReason")] public string FailureReason { get; private set; } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobStatus.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobStatus.cs index 2217ad10e6738..362ce3bf05744 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobStatus.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobStatus.cs @@ -1,15 +1,18 @@ +// // 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.IotHub.Models { using Newtonsoft.Json; using Newtonsoft.Json.Converters; + using System.Runtime; using System.Runtime.Serialization; /// @@ -31,4 +34,51 @@ public enum JobStatus [EnumMember(Value = "cancelled")] Cancelled } + internal static class JobStatusEnumExtension + { + internal static string ToSerializedValue(this JobStatus? value) + { + return value == null ? null : ((JobStatus)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this JobStatus value) + { + switch( value ) + { + case JobStatus.Unknown: + return "unknown"; + case JobStatus.Enqueued: + return "enqueued"; + case JobStatus.Running: + return "running"; + case JobStatus.Completed: + return "completed"; + case JobStatus.Failed: + return "failed"; + case JobStatus.Cancelled: + return "cancelled"; + } + return null; + } + + internal static JobStatus? ParseJobStatus(this string value) + { + switch( value ) + { + case "unknown": + return JobStatus.Unknown; + case "enqueued": + return JobStatus.Enqueued; + case "running": + return JobStatus.Running; + case "completed": + return JobStatus.Completed; + case "failed": + return JobStatus.Failed; + case "cancelled": + return JobStatus.Cancelled; + } + return null; + } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobType.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobType.cs index da6dbe00a4e53..921644e679133 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobType.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/JobType.cs @@ -1,16 +1,15 @@ +// // 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.IotHub.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; /// /// Defines values for JobType. diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/MessagingEndpointProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/MessagingEndpointProperties.cs index 0975513921954..f84fdac6ecb41 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/MessagingEndpointProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/MessagingEndpointProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties of the messaging endpoints used by this IoT hub. @@ -25,36 +23,50 @@ public partial class MessagingEndpointProperties /// Initializes a new instance of the MessagingEndpointProperties /// class. /// - public MessagingEndpointProperties() { } + public MessagingEndpointProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the MessagingEndpointProperties /// class. /// - /// The lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - /// The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - /// The number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - public MessagingEndpointProperties(TimeSpan? lockDurationAsIso8601 = default(TimeSpan?), TimeSpan? ttlAsIso8601 = default(TimeSpan?), int? maxDeliveryCount = default(int?)) + /// The lock duration. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + /// The period of time for which a message + /// is available to consume before it is expired by the IoT hub. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + /// The number of times the IoT hub + /// attempts to deliver a message. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + public MessagingEndpointProperties(System.TimeSpan? lockDurationAsIso8601 = default(System.TimeSpan?), System.TimeSpan? ttlAsIso8601 = default(System.TimeSpan?), int? maxDeliveryCount = default(int?)) { LockDurationAsIso8601 = lockDurationAsIso8601; TtlAsIso8601 = ttlAsIso8601; MaxDeliveryCount = maxDeliveryCount; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the lock duration. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. /// [JsonProperty(PropertyName = "lockDurationAsIso8601")] - public TimeSpan? LockDurationAsIso8601 { get; set; } + public System.TimeSpan? LockDurationAsIso8601 { get; set; } /// - /// Gets or sets the period of time for which a message is available - /// to consume before it is expired by the IoT hub. See: + /// Gets or sets the period of time for which a message is available to + /// consume before it is expired by the IoT hub. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. /// [JsonProperty(PropertyName = "ttlAsIso8601")] - public TimeSpan? TtlAsIso8601 { get; set; } + public System.TimeSpan? TtlAsIso8601 { get; set; } /// /// Gets or sets the number of times the IoT hub attempts to deliver a @@ -72,11 +84,11 @@ public MessagingEndpointProperties() { } /// public virtual void Validate() { - if (this.MaxDeliveryCount > 100) + if (MaxDeliveryCount > 100) { throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxDeliveryCount", 100); } - if (this.MaxDeliveryCount < 1) + if (MaxDeliveryCount < 1) { throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxDeliveryCount", 1); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Operation.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Operation.cs new file mode 100644 index 0000000000000..193fb529b7025 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Operation.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.IotHub.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// IoT Hub REST API operation + /// + public partial class Operation + { + /// + /// Initializes a new instance of the Operation class. + /// + public Operation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Operation class. + /// + /// Operation name: {provider}/{resource}/{read | + /// write | action | delete} + /// The object that represents the + /// operation. + public Operation(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 operation name: {provider}/{resource}/{read | write | action | + /// delete} + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets the object that represents the operation. + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationDisplay.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationDisplay.cs new file mode 100644 index 0000000000000..415f4ec9cbb57 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationDisplay.cs @@ -0,0 +1,67 @@ +// +// 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.IotHub.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 Devices + /// Resource Type: IotHubs + /// Name of the operation + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string)) + { + Provider = provider; + Resource = resource; + Operation = operation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets service provider: Microsoft Devices + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; private set; } + + /// + /// Gets resource Type: IotHubs + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; private set; } + + /// + /// Gets name of the operation + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; private set; } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationInputs.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationInputs.cs index df2d95bf7bd99..d6ced325e9fd7 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationInputs.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationInputs.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// Input values. @@ -24,7 +22,10 @@ public partial class OperationInputs /// /// Initializes a new instance of the OperationInputs class. /// - public OperationInputs() { } + public OperationInputs() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationInputs class. @@ -33,8 +34,14 @@ public OperationInputs() { } public OperationInputs(string name) { Name = name; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the IoT hub to check. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationMonitoringLevel.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationMonitoringLevel.cs index 378bb00c76416..61c626ce83a1a 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationMonitoringLevel.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationMonitoringLevel.cs @@ -1,16 +1,15 @@ +// // 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.IotHub.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; /// /// Defines values for OperationMonitoringLevel. diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationsMonitoringProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationsMonitoringProperties.cs index e78169d9a3051..982ceabde41ea 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationsMonitoringProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/OperationsMonitoringProperties.cs @@ -1,24 +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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// - /// The operations monitoring properties for the IoT hub. The possible - /// keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, + /// The operations monitoring properties for the IoT hub. The possible keys + /// to the dictionary are Connections, DeviceTelemetry, C2DCommands, /// DeviceIdentityOperations, FileUploadOperations, Routes, /// D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations, /// DirectMethods. @@ -29,7 +28,10 @@ public partial class OperationsMonitoringProperties /// Initializes a new instance of the OperationsMonitoringProperties /// class. /// - public OperationsMonitoringProperties() { } + public OperationsMonitoringProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationsMonitoringProperties @@ -38,8 +40,14 @@ public OperationsMonitoringProperties() { } public OperationsMonitoringProperties(IDictionary events = default(IDictionary)) { Events = events; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// [JsonProperty(PropertyName = "events")] diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Page.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Page.cs index 8a3a45312c781..c9865e4d85ad2 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Page.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Page.cs @@ -1,17 +1,20 @@ +// // 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.IotHub.Models { - using System.Collections.Generic; - using System.Linq; - using Newtonsoft.Json; + using Microsoft.Rest; using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; /// /// Defines a page in Azure responses. @@ -35,14 +38,14 @@ public class Page : IPage /// A an enumerator that can be used to iterate through the collection. public IEnumerator GetEnumerator() { - return (Items == null) ? Enumerable.Empty().GetEnumerator() : Items.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. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RegistryStatistics.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RegistryStatistics.cs index a4253988e727f..87a15c45338c0 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RegistryStatistics.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RegistryStatistics.cs @@ -1,20 +1,17 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Linq; /// /// Identity registry statistics. @@ -24,21 +21,33 @@ public partial class RegistryStatistics /// /// Initializes a new instance of the RegistryStatistics class. /// - public RegistryStatistics() { } + public RegistryStatistics() + { + CustomInit(); + } /// /// Initializes a new instance of the RegistryStatistics class. /// - /// The total count of devices in the identity registry. - /// The count of enabled devices in the identity registry. - /// The count of disabled devices in the identity registry. + /// The total count of devices in the + /// identity registry. + /// The count of enabled devices in + /// the identity registry. + /// The count of disabled devices in + /// the identity registry. public RegistryStatistics(long? totalDeviceCount = default(long?), long? enabledDeviceCount = default(long?), long? disabledDeviceCount = default(long?)) { TotalDeviceCount = totalDeviceCount; EnabledDeviceCount = enabledDeviceCount; DisabledDeviceCount = disabledDeviceCount; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the total count of devices in the identity registry. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Resource.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Resource.cs index 0dd3d475da114..ea8b0a2a75a99 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/Resource.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/Resource.cs @@ -1,20 +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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// /// The common properties of an Azure resource. @@ -24,7 +25,10 @@ public partial class Resource : IResource /// /// Initializes a new instance of the Resource class. /// - public Resource() { } + public Resource() + { + CustomInit(); + } /// /// Initializes a new instance of the Resource class. @@ -41,8 +45,14 @@ public Resource() { } Type = type; Location = location; Tags = tags; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the resource identifier. /// @@ -85,9 +95,9 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Location"); } - if (this.Name != null) + if (Name != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")) { throw new ValidationException(ValidationRules.Pattern, "Name", "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$"); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RouteProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RouteProperties.cs index f3366c336963b..effcd08978f92 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RouteProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RouteProperties.cs @@ -1,20 +1,20 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// /// The properties of a routing rule that your IoT hub uses to route @@ -25,16 +25,30 @@ public partial class RouteProperties /// /// Initializes a new instance of the RouteProperties class. /// - public RouteProperties() { } + public RouteProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the RouteProperties class. /// - /// The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique. - /// The source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents' - /// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed. - /// Used to specify whether a route is enabled. - /// The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + /// The name of the route. The name can only include + /// alphanumeric characters, periods, underscores, hyphens, has a + /// maximum length of 64 characters, and must be unique. + /// The source that the routing rule is to be + /// applied to, such as DeviceMessages. Possible values include: + /// 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + /// 'DeviceJobLifecycleEvents' + /// The list of endpoints to which messages + /// that satisfy the condition are routed. Currently only one endpoint + /// is allowed. + /// Used to specify whether a route is + /// enabled. + /// The condition that is evaluated to apply + /// the routing rule. If no condition is provided, it evaluates to true + /// by default. For grammar, see: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language public RouteProperties(string name, string source, IList endpointNames, bool isEnabled, string condition = default(string)) { Name = name; @@ -42,20 +56,26 @@ public RouteProperties() { } Condition = condition; EndpointNames = endpointNames; IsEnabled = isEnabled; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the route. The name can only include /// alphanumeric characters, periods, underscores, hyphens, has a - /// maximum length of 64 characters, and must be unique. + /// maximum length of 64 characters, and must be unique. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets the source that the routing rule is to be applied to, - /// such as DeviceMessages. Possible values include: - /// 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + /// such as DeviceMessages. Possible values include: 'DeviceMessages', + /// 'TwinChangeEvents', 'DeviceLifecycleEvents', /// 'DeviceJobLifecycleEvents' /// [JsonProperty(PropertyName = "source")] @@ -63,8 +83,8 @@ public RouteProperties() { } /// /// Gets or sets the condition that is evaluated to apply the routing - /// rule. If no condition is provided, it evaluates to true by - /// default. For grammar, See: + /// rule. If no condition is provided, it evaluates to true by default. + /// For grammar, see: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language /// [JsonProperty(PropertyName = "condition")] @@ -103,20 +123,20 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "EndpointNames"); } - if (this.Name != null) + if (Name != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^[A-Za-z0-9-._]{1,64}$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[A-Za-z0-9-._]{1,64}$")) { throw new ValidationException(ValidationRules.Pattern, "Name", "^[A-Za-z0-9-._]{1,64}$"); } } - if (this.EndpointNames != null) + if (EndpointNames != null) { - if (this.EndpointNames.Count > 1) + if (EndpointNames.Count > 1) { throw new ValidationException(ValidationRules.MaxItems, "EndpointNames", 1); } - if (this.EndpointNames.Count < 1) + if (EndpointNames.Count < 1) { throw new ValidationException(ValidationRules.MinItems, "EndpointNames", 1); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEndpoints.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEndpoints.cs index 66616685afd55..f6febea3d86d3 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEndpoints.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEndpoints.cs @@ -1,48 +1,65 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// /// The properties related to the custom endpoints to which your IoT hub /// routes messages based on the routing rules. A maximum of 10 custom - /// endpoints are allowed across all endpoint types for paid hubs and - /// only 1 custom endpoint is allowed across all endpoint types for free - /// hubs. + /// endpoints are allowed across all endpoint types for paid hubs and only + /// 1 custom endpoint is allowed across all endpoint types for free hubs. /// public partial class RoutingEndpoints { /// /// Initializes a new instance of the RoutingEndpoints class. /// - public RoutingEndpoints() { } + public RoutingEndpoints() + { + CustomInit(); + } /// /// Initializes a new instance of the RoutingEndpoints class. /// - /// The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules. - /// The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules. - /// The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint. - public RoutingEndpoints(IList serviceBusQueues = default(IList), IList serviceBusTopics = default(IList), IList eventHubs = default(IList)) + /// The list of Service Bus queue + /// endpoints that IoT hub routes the messages to, based on the routing + /// rules. + /// The list of Service Bus topic + /// endpoints that the IoT hub routes the messages to, based on the + /// routing rules. + /// The list of Event Hubs endpoints that IoT + /// hub routes messages to, based on the routing rules. This list does + /// not include the built-in Event Hubs endpoint. + /// The list of storage container + /// endpoints that IoT hub routes messages to, based on the routing + /// rules. + public RoutingEndpoints(IList serviceBusQueues = default(IList), IList serviceBusTopics = default(IList), IList eventHubs = default(IList), IList storageContainers = default(IList)) { ServiceBusQueues = serviceBusQueues; ServiceBusTopics = serviceBusTopics; EventHubs = eventHubs; + StorageContainers = storageContainers; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the list of Service Bus queue endpoints that IoT hub /// routes the messages to, based on the routing rules. @@ -59,11 +76,18 @@ public RoutingEndpoints() { } /// /// Gets or sets the list of Event Hubs endpoints that IoT hub routes - /// messages to, based on the routing rules. This list does not - /// include the built-in Event Hubs endpoint. + /// messages to, based on the routing rules. This list does not include + /// the built-in Event Hubs endpoint. /// [JsonProperty(PropertyName = "eventHubs")] public IList EventHubs { get; set; } + /// + /// Gets or sets the list of storage container endpoints that IoT hub + /// routes messages to, based on the routing rules. + /// + [JsonProperty(PropertyName = "storageContainers")] + public IList StorageContainers { get; set; } + } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEventHubProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEventHubProperties.cs index ec56e43696323..ced980c64e9c4 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEventHubProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingEventHubProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties related to an event hub endpoint. @@ -24,23 +22,40 @@ public partial class RoutingEventHubProperties /// /// Initializes a new instance of the RoutingEventHubProperties class. /// - public RoutingEventHubProperties() { } + public RoutingEventHubProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the RoutingEventHubProperties class. /// - /// The connection string of the event hub endpoint. - /// The name of the event hub endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved; events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. - /// The subscription identifier of the event hub endpoint. - /// The name of the resource group of the event hub endpoint. + /// The connection string of the event + /// hub endpoint. + /// The name that identifies this endpoint. The name + /// can only include alphanumeric characters, periods, underscores, + /// hyphens and has a maximum length of 64 characters. The following + /// names are reserved: events, operationsMonitoringEvents, + /// fileNotifications, $default. Endpoint names must be unique across + /// endpoint types. + /// The subscription identifier of the + /// event hub endpoint. + /// The name of the resource group of the + /// event hub endpoint. public RoutingEventHubProperties(string connectionString, string name, string subscriptionId = default(string), string resourceGroup = default(string)) { ConnectionString = connectionString; Name = name; SubscriptionId = subscriptionId; ResourceGroup = resourceGroup; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the connection string of the event hub endpoint. /// @@ -48,12 +63,11 @@ public RoutingEventHubProperties() { } public string ConnectionString { get; set; } /// - /// Gets or sets the name of the event hub endpoint. The name can only - /// include alphanumeric characters, periods, underscores, hyphens - /// and has a maximum length of 64 characters. The following names - /// are reserved; events, operationsMonitoringEvents, - /// fileNotifications, $default. Endpoint names must be unique across - /// endpoint types. + /// Gets or sets the name that identifies this endpoint. The name can + /// only include alphanumeric characters, periods, underscores, hyphens + /// and has a maximum length of 64 characters. The following names are + /// reserved: events, operationsMonitoringEvents, fileNotifications, + /// $default. Endpoint names must be unique across endpoint types. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -87,9 +101,9 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } - if (this.Name != null) + if (Name != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^[A-Za-z0-9-._]{1,64}$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[A-Za-z0-9-._]{1,64}$")) { throw new ValidationException(ValidationRules.Pattern, "Name", "^[A-Za-z0-9-._]{1,64}$"); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingProperties.cs index 5c49fab218a72..1c77b24f666e4 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingProperties.cs @@ -1,20 +1,19 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using System.Collections; + using System.Collections.Generic; + using System.Linq; /// /// The routing related properties of the IoT hub. See: @@ -27,20 +26,35 @@ public partial class RoutingProperties /// public RoutingProperties() { + CustomInit(); } /// /// Initializes a new instance of the RoutingProperties class. /// - /// The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs. - /// The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. + /// The list of user-provided routing rules that + /// the IoT hub uses to route messages to built-in and custom + /// endpoints. A maximum of 100 routing rules are allowed for paid hubs + /// and a maximum of 5 routing rules are allowed for free hubs. + /// The properties of the route that is + /// used as a fall-back route when none of the conditions specified in + /// the 'routes' section are met. This is an optional parameter. When + /// this property is not set, the messages which do not meet any of the + /// conditions specified in the 'routes' section get routed to the + /// built-in eventhub endpoint. public RoutingProperties(RoutingEndpoints endpoints = default(RoutingEndpoints), IList routes = default(IList), FallbackRouteProperties fallbackRoute = default(FallbackRouteProperties)) { Endpoints = endpoints; Routes = routes; FallbackRoute = fallbackRoute; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// [JsonProperty(PropertyName = "endpoints")] @@ -58,10 +72,10 @@ public RoutingProperties() /// /// Gets or sets the properties of the route that is used as a /// fall-back route when none of the conditions specified in the - /// 'routes' section are met. This is an optional parameter. When - /// this property is not set, the messages which do not meet any of - /// the conditions specified in the 'routes' section get routed to - /// the built-in eventhub endpoint. + /// 'routes' section are met. This is an optional parameter. When this + /// property is not set, the messages which do not meet any of the + /// conditions specified in the 'routes' section get routed to the + /// built-in eventhub endpoint. /// [JsonProperty(PropertyName = "fallbackRoute")] public FallbackRouteProperties FallbackRoute { get; set; } @@ -69,14 +83,14 @@ public RoutingProperties() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (this.Routes != null) + if (Routes != null) { - foreach (var element in this.Routes) + foreach (var element in Routes) { if (element != null) { @@ -84,9 +98,9 @@ public virtual void Validate() } } } - if (this.FallbackRoute != null) + if (FallbackRoute != null) { - this.FallbackRoute.Validate(); + FallbackRoute.Validate(); } } } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusQueueEndpointProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusQueueEndpointProperties.cs index 2a839b81e766d..17ae070ba1c2b 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusQueueEndpointProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusQueueEndpointProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties related to service bus queue endpoint types. @@ -25,24 +23,42 @@ public partial class RoutingServiceBusQueueEndpointProperties /// Initializes a new instance of the /// RoutingServiceBusQueueEndpointProperties class. /// - public RoutingServiceBusQueueEndpointProperties() { } + public RoutingServiceBusQueueEndpointProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the /// RoutingServiceBusQueueEndpointProperties class. /// - /// The connection string of the service bus queue endpoint. - /// The name of the service bus queue endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved; events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual queue name. - /// The subscription identifier of the service bus queue endpoint. - /// The name of the resource group of the service bus queue endpoint. + /// The connection string of the service + /// bus queue endpoint. + /// The name that identifies this endpoint. The name + /// can only include alphanumeric characters, periods, underscores, + /// hyphens and has a maximum length of 64 characters. The following + /// names are reserved: events, operationsMonitoringEvents, + /// fileNotifications, $default. Endpoint names must be unique across + /// endpoint types. The name need not be the same as the actual queue + /// name. + /// The subscription identifier of the + /// service bus queue endpoint. + /// The name of the resource group of the + /// service bus queue endpoint. public RoutingServiceBusQueueEndpointProperties(string connectionString, string name, string subscriptionId = default(string), string resourceGroup = default(string)) { ConnectionString = connectionString; Name = name; SubscriptionId = subscriptionId; ResourceGroup = resourceGroup; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the connection string of the service bus queue /// endpoint. @@ -51,13 +67,12 @@ public RoutingServiceBusQueueEndpointProperties() { } public string ConnectionString { get; set; } /// - /// Gets or sets the name of the service bus queue endpoint. The name - /// can only include alphanumeric characters, periods, underscores, - /// hyphens and has a maximum length of 64 characters. The following - /// names are reserved; events, operationsMonitoringEvents, - /// fileNotifications, $default. Endpoint names must be unique across - /// endpoint types. The name need not be the same as the actual queue - /// name. + /// Gets or sets the name that identifies this endpoint. The name can + /// only include alphanumeric characters, periods, underscores, hyphens + /// and has a maximum length of 64 characters. The following names are + /// reserved: events, operationsMonitoringEvents, fileNotifications, + /// $default. Endpoint names must be unique across endpoint types. The + /// name need not be the same as the actual queue name. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -92,9 +107,9 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } - if (this.Name != null) + if (Name != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^[A-Za-z0-9-._]{1,64}$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[A-Za-z0-9-._]{1,64}$")) { throw new ValidationException(ValidationRules.Pattern, "Name", "^[A-Za-z0-9-._]{1,64}$"); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusTopicEndpointProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusTopicEndpointProperties.cs index bcfe3457e8639..23ef8af47c9d2 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusTopicEndpointProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingServiceBusTopicEndpointProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties related to service bus topic endpoint types. @@ -25,24 +23,42 @@ public partial class RoutingServiceBusTopicEndpointProperties /// Initializes a new instance of the /// RoutingServiceBusTopicEndpointProperties class. /// - public RoutingServiceBusTopicEndpointProperties() { } + public RoutingServiceBusTopicEndpointProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the /// RoutingServiceBusTopicEndpointProperties class. /// - /// The connection string of the service bus topic endpoint. - /// The name of the service bus topic endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved; events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual topic name. - /// The subscription identifier of the service bus topic endpoint. - /// The name of the resource group of the service bus topic endpoint. + /// The connection string of the service + /// bus topic endpoint. + /// The name that identifies this endpoint. The name + /// can only include alphanumeric characters, periods, underscores, + /// hyphens and has a maximum length of 64 characters. The following + /// names are reserved: events, operationsMonitoringEvents, + /// fileNotifications, $default. Endpoint names must be unique across + /// endpoint types. The name need not be the same as the actual topic + /// name. + /// The subscription identifier of the + /// service bus topic endpoint. + /// The name of the resource group of the + /// service bus topic endpoint. public RoutingServiceBusTopicEndpointProperties(string connectionString, string name, string subscriptionId = default(string), string resourceGroup = default(string)) { ConnectionString = connectionString; Name = name; SubscriptionId = subscriptionId; ResourceGroup = resourceGroup; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the connection string of the service bus topic /// endpoint. @@ -51,13 +67,12 @@ public RoutingServiceBusTopicEndpointProperties() { } public string ConnectionString { get; set; } /// - /// Gets or sets the name of the service bus topic endpoint. The name - /// can only include alphanumeric characters, periods, underscores, - /// hyphens and has a maximum length of 64 characters. The following - /// names are reserved; events, operationsMonitoringEvents, - /// fileNotifications, $default. Endpoint names must be unique across - /// endpoint types. The name need not be the same as the actual - /// topic name. + /// Gets or sets the name that identifies this endpoint. The name can + /// only include alphanumeric characters, periods, underscores, hyphens + /// and has a maximum length of 64 characters. The following names are + /// reserved: events, operationsMonitoringEvents, fileNotifications, + /// $default. Endpoint names must be unique across endpoint types. The + /// name need not be the same as the actual topic name. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -92,9 +107,9 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } - if (this.Name != null) + if (Name != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^[A-Za-z0-9-._]{1,64}$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[A-Za-z0-9-._]{1,64}$")) { throw new ValidationException(ValidationRules.Pattern, "Name", "^[A-Za-z0-9-._]{1,64}$"); } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingSource.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingSource.cs index 2ae0e9d8045e5..47229177f4568 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingSource.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingSource.cs @@ -1,16 +1,15 @@ +// // 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.IotHub.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; /// /// Defines values for RoutingSource. diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingStorageContainerProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingStorageContainerProperties.cs new file mode 100644 index 0000000000000..f4d9d40beb791 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/RoutingStorageContainerProperties.cs @@ -0,0 +1,191 @@ +// +// 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.IotHub.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties related to a storage container endpoint. + /// + public partial class RoutingStorageContainerProperties + { + /// + /// Initializes a new instance of the RoutingStorageContainerProperties + /// class. + /// + public RoutingStorageContainerProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RoutingStorageContainerProperties + /// class. + /// + /// The connection string of the storage + /// account. + /// The name that identifies this endpoint. The name + /// can only include alphanumeric characters, periods, underscores, + /// hyphens and has a maximum length of 64 characters. The following + /// names are reserved: events, operationsMonitoringEvents, + /// fileNotifications, $default. Endpoint names must be unique across + /// endpoint types. + /// The name of storage container in the + /// storage account. + /// The subscription identifier of the + /// storage account. + /// The name of the resource group of the + /// storage account. + /// File name format for the blob. Default + /// format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All + /// parameters are mandatory but can be reordered. + /// Time interval at which blobs + /// are written to storage. Value should be between 60 and 720 seconds. + /// Default value is 300 seconds. + /// Maximum number of bytes for each + /// blob written to storage. Value should be between 10485760(10MB) and + /// 524288000(500MB). Default value is 314572800(300MB). + /// Encoding that is used to serialize messages + /// to blobs. Supported values are 'avro' and 'avrodeflate'. Default + /// value is 'avro'. + public RoutingStorageContainerProperties(string connectionString, string name, string containerName, string subscriptionId = default(string), string resourceGroup = default(string), string fileNameFormat = default(string), int? batchFrequencyInSeconds = default(int?), int? maxChunkSizeInBytes = default(int?), string encoding = default(string)) + { + ConnectionString = connectionString; + Name = name; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + ContainerName = containerName; + FileNameFormat = fileNameFormat; + BatchFrequencyInSeconds = batchFrequencyInSeconds; + MaxChunkSizeInBytes = maxChunkSizeInBytes; + Encoding = encoding; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string of the storage account. + /// + [JsonProperty(PropertyName = "connectionString")] + public string ConnectionString { get; set; } + + /// + /// Gets or sets the name that identifies this endpoint. The name can + /// only include alphanumeric characters, periods, underscores, hyphens + /// and has a maximum length of 64 characters. The following names are + /// reserved: events, operationsMonitoringEvents, fileNotifications, + /// $default. Endpoint names must be unique across endpoint types. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the subscription identifier of the storage account. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets the name of the resource group of the storage account. + /// + [JsonProperty(PropertyName = "resourceGroup")] + public string ResourceGroup { get; set; } + + /// + /// Gets or sets the name of storage container in the storage account. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets file name format for the blob. Default format is + /// {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are + /// mandatory but can be reordered. + /// + [JsonProperty(PropertyName = "fileNameFormat")] + public string FileNameFormat { get; set; } + + /// + /// Gets or sets time interval at which blobs are written to storage. + /// Value should be between 60 and 720 seconds. Default value is 300 + /// seconds. + /// + [JsonProperty(PropertyName = "batchFrequencyInSeconds")] + public int? BatchFrequencyInSeconds { get; set; } + + /// + /// Gets or sets maximum number of bytes for each blob written to + /// storage. Value should be between 10485760(10MB) and + /// 524288000(500MB). Default value is 314572800(300MB). + /// + [JsonProperty(PropertyName = "maxChunkSizeInBytes")] + public int? MaxChunkSizeInBytes { get; set; } + + /// + /// Gets or sets encoding that is used to serialize messages to blobs. + /// Supported values are 'avro' and 'avrodeflate'. Default value is + /// 'avro'. + /// + [JsonProperty(PropertyName = "encoding")] + public string Encoding { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (ContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContainerName"); + } + if (Name != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[A-Za-z0-9-._]{1,64}$")) + { + throw new ValidationException(ValidationRules.Pattern, "Name", "^[A-Za-z0-9-._]{1,64}$"); + } + } + if (BatchFrequencyInSeconds > 720) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "BatchFrequencyInSeconds", 720); + } + if (BatchFrequencyInSeconds < 60) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "BatchFrequencyInSeconds", 60); + } + if (MaxChunkSizeInBytes > 524288000) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxChunkSizeInBytes", 524288000); + } + if (MaxChunkSizeInBytes < 10485760) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxChunkSizeInBytes", 10485760); + } + } + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/SBAccessRights.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/SBAccessRights.cs deleted file mode 100644 index c1d7d28bc6254..0000000000000 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/SBAccessRights.cs +++ /dev/null @@ -1,30 +0,0 @@ -// 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 0.16.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.IotHub.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Defines values for SBAccessRights. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SBAccessRights - { - [EnumMember(Value = "Manage")] - Manage, - [EnumMember(Value = "Send")] - Send, - [EnumMember(Value = "Listen")] - Listen, - [EnumMember(Value = "ManageNotificationHub")] - ManageNotificationHub - } -} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessAuthorizationRule.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessAuthorizationRule.cs deleted file mode 100644 index 966cb21211486..0000000000000 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessAuthorizationRule.cs +++ /dev/null @@ -1,106 +0,0 @@ -// 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 0.16.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.IotHub.Models -{ - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; - - public partial class SharedAccessAuthorizationRule - { - /// - /// Initializes a new instance of the SharedAccessAuthorizationRule - /// class. - /// - public SharedAccessAuthorizationRule() { } - - /// - /// Initializes a new instance of the SharedAccessAuthorizationRule - /// class. - /// - public SharedAccessAuthorizationRule(string keyName = default(string), string primaryKey = default(string), string issuerName = default(string), string secondaryKey = default(string), string claimType = default(string), string claimValue = default(string), IList rights = default(IList), DateTime? createdTime = default(DateTime?), DateTime? modifiedTime = default(DateTime?), long? revision = default(long?)) - { - KeyName = keyName; - PrimaryKey = primaryKey; - IssuerName = issuerName; - SecondaryKey = secondaryKey; - ClaimType = claimType; - ClaimValue = claimValue; - Rights = rights; - CreatedTime = createdTime; - ModifiedTime = modifiedTime; - Revision = revision; - } - - /// - /// The key name. - /// - [JsonProperty(PropertyName = "KeyName")] - public string KeyName { get; set; } - - /// - /// The primary key. - /// - [JsonProperty(PropertyName = "PrimaryKey")] - public string PrimaryKey { get; set; } - - /// - /// The issuer name. - /// - [JsonProperty(PropertyName = "IssuerName")] - public string IssuerName { get; set; } - - /// - /// The secondary key. - /// - [JsonProperty(PropertyName = "SecondaryKey")] - public string SecondaryKey { get; set; } - - /// - /// The claim type. - /// - [JsonProperty(PropertyName = "ClaimType")] - public string ClaimType { get; set; } - - /// - /// The claim value. - /// - [JsonProperty(PropertyName = "ClaimValue")] - public string ClaimValue { get; set; } - - /// - /// The rights. - /// - [JsonProperty(PropertyName = "Rights")] - public IList Rights { get; set; } - - /// - /// The created time. - /// - [JsonProperty(PropertyName = "CreatedTime")] - public DateTime? CreatedTime { get; set; } - - /// - /// The modified time. - /// - [JsonProperty(PropertyName = "ModifiedTime")] - public DateTime? ModifiedTime { get; set; } - - /// - /// The revision. - /// - [JsonProperty(PropertyName = "Revision")] - public long? Revision { get; set; } - - } -} diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessSignatureAuthorizationRule.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessSignatureAuthorizationRule.cs index 85e3170fd4c3b..e1002df6baf75 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessSignatureAuthorizationRule.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/SharedAccessSignatureAuthorizationRule.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties of an IoT hub shared access policy. @@ -25,14 +23,26 @@ public partial class SharedAccessSignatureAuthorizationRule /// Initializes a new instance of the /// SharedAccessSignatureAuthorizationRule class. /// - public SharedAccessSignatureAuthorizationRule() { } + public SharedAccessSignatureAuthorizationRule() + { + CustomInit(); + } /// /// Initializes a new instance of the /// SharedAccessSignatureAuthorizationRule class. /// /// The name of the shared access policy. - /// The permissions assigned to the shared access policy. Possible values include: 'RegistryRead', 'RegistryWrite', 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect' + /// The permissions assigned to the shared access + /// policy. Possible values include: 'RegistryRead', 'RegistryWrite', + /// 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', + /// 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', + /// 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', + /// 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + /// ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', + /// 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, + /// ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + /// ServiceConnect, DeviceConnect' /// The primary key. /// The secondary key. public SharedAccessSignatureAuthorizationRule(string keyName, AccessRights rights, string primaryKey = default(string), string secondaryKey = default(string)) @@ -41,8 +51,14 @@ public SharedAccessSignatureAuthorizationRule() { } PrimaryKey = primaryKey; SecondaryKey = secondaryKey; Rights = rights; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the shared access policy. /// diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Models/StorageEndpointProperties.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Models/StorageEndpointProperties.cs index 8c5d476270a3f..3694c10f0ef8c 100644 --- a/src/SDKs/IotHub/Management.IotHub/Generated/Models/StorageEndpointProperties.cs +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Models/StorageEndpointProperties.cs @@ -1,20 +1,18 @@ +// // 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.IotHub.Models { - using System; - using System.Linq; - using System.Collections.Generic; - using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; /// /// The properties of the Azure Storage endpoint for file upload. @@ -24,40 +22,54 @@ public partial class StorageEndpointProperties /// /// Initializes a new instance of the StorageEndpointProperties class. /// - public StorageEndpointProperties() { } + public StorageEndpointProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the StorageEndpointProperties class. /// - /// The connection string for the Azure Storage account to which files are uploaded. - /// The name of the root container where you upload files. The container need not exist but should be creatable using the connectionString specified. - /// The period of time for which the the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - public StorageEndpointProperties(string connectionString, string containerName, TimeSpan? sasTtlAsIso8601 = default(TimeSpan?)) + /// The connection string for the Azure + /// Storage account to which files are uploaded. + /// The name of the root container where + /// you upload files. The container need not exist but should be + /// creatable using the connectionString specified. + /// The period of time for which the the + /// SAS URI generated by IoT Hub for file upload is valid. See: + /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. + public StorageEndpointProperties(string connectionString, string containerName, System.TimeSpan? sasTtlAsIso8601 = default(System.TimeSpan?)) { SasTtlAsIso8601 = sasTtlAsIso8601; ConnectionString = connectionString; ContainerName = containerName; + CustomInit(); } /// - /// Gets or sets the period of time for which the the SAS URI - /// generated by IoT Hub for file upload is valid. See: + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the period of time for which the the SAS URI generated + /// by IoT Hub for file upload is valid. See: /// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. /// [JsonProperty(PropertyName = "sasTtlAsIso8601")] - public TimeSpan? SasTtlAsIso8601 { get; set; } + public System.TimeSpan? SasTtlAsIso8601 { get; set; } /// - /// Gets or sets the connection string for the Azure Storage account - /// to which files are uploaded. + /// Gets or sets the connection string for the Azure Storage account to + /// which files are uploaded. /// [JsonProperty(PropertyName = "connectionString")] public string ConnectionString { get; set; } /// - /// Gets or sets the name of the root container where you upload - /// files. The container need not exist but should be creatable using - /// the connectionString specified. + /// Gets or sets the name of the root container where you upload files. + /// The container need not exist but should be creatable using the + /// connectionString specified. /// [JsonProperty(PropertyName = "containerName")] public string ContainerName { get; set; } diff --git a/src/SDKs/IotHub/Management.IotHub/Generated/Operations.cs b/src/SDKs/IotHub/Management.IotHub/Generated/Operations.cs new file mode 100644 index 0000000000000..9730d1a6120a4 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/Operations.cs @@ -0,0 +1,390 @@ +// +// 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.IotHub +{ + 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; + + /// + /// Operations operations. + /// + internal partial class Operations : IServiceOperations, IOperations + { + /// + /// Initializes a new instance of the Operations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal Operations(IotHubClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the IotHubClient + /// + public IotHubClient Client { get; private set; } + + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // 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.Devices/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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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; + } + + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _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/src/SDKs/IotHub/Management.IotHub/Generated/OperationsExtensions.cs b/src/SDKs/IotHub/Management.IotHub/Generated/OperationsExtensions.cs new file mode 100644 index 0000000000000..9a389fc8c1e40 --- /dev/null +++ b/src/SDKs/IotHub/Management.IotHub/Generated/OperationsExtensions.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.IotHub +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for Operations. + /// + public static partial class OperationsExtensions + { + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available IoT Hub REST API operations. + /// + /// + /// 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 IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/IotHub/Management.IotHub/Microsoft.Azure.Management.IotHub.csproj b/src/SDKs/IotHub/Management.IotHub/Microsoft.Azure.Management.IotHub.csproj index 54e411b6327f4..4279adf1242d1 100644 --- a/src/SDKs/IotHub/Management.IotHub/Microsoft.Azure.Management.IotHub.csproj +++ b/src/SDKs/IotHub/Management.IotHub/Microsoft.Azure.Management.IotHub.csproj @@ -5,8 +5,13 @@ Provides management capabilities for Microsoft Azure IotHub. Microsoft Azure IotHub Management Microsoft.Azure.Management.IotHub - 1.1.2 + 1.1.3 Microsoft Azure IotHub;IotHub management;IotHub;REST HTTP client;azureofficial;windowsazureofficial;netcore451511 + + + net452;netstandard1.4 diff --git a/src/SDKs/IotHub/Management.IotHub/Properties/AssemblyInfo.cs b/src/SDKs/IotHub/Management.IotHub/Properties/AssemblyInfo.cs index c0d03e15b705a..775a3e12e47a0 100644 --- a/src/SDKs/IotHub/Management.IotHub/Properties/AssemblyInfo.cs +++ b/src/SDKs/IotHub/Management.IotHub/Properties/AssemblyInfo.cs @@ -15,4 +15,4 @@ [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("en")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.1.2.0")] +[assembly: AssemblyFileVersion("1.1.3.0")] diff --git a/src/SDKs/_metadata/iothub_resource-manager.txt b/src/SDKs/_metadata/iothub_resource-manager.txt new file mode 100644 index 0000000000000..dc240489c6505 --- /dev/null +++ b/src/SDKs/_metadata/iothub_resource-manager.txt @@ -0,0 +1,11 @@ +2017-11-02 17:53:10 UTC + +1) azure-rest-api-specs repository information +GitHub user: Azure +Branch: current +Commit: 7d65d934590230e37c08b56caf6e41edf44813da + +2) AutoRest information +Requested version: latest +Bootstrapper version: C:\Users\v-sapsax\AppData\Roaming\npm `-- autorest@2.0.4166 +Latest installed version: 2.0.4168