From d8fd31e8ac99bbbe62c19239a5aa600637665253 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Wed, 2 Aug 2017 18:32:08 -0700 Subject: [PATCH 1/2] first version of C# apim spec on autorest --- .../ApiManagement.Tests.csproj | 59 + .../ApiManagementTestBase.cs | 166 + .../ApiManagement.Tests/Helpers/Extensions.cs | 41 + .../ManagementApiTests/ApiOperationTests.cs | 334 + .../ManagementApiTests/ApiProductTests.cs | 74 + .../ManagementApiTests/ApiTests.cs | 346 + .../AuthorizationServerTests.cs | 195 + .../ManagementApiTests/BackendTests.cs | 249 + .../ManagementApiTests/CertificateTests.cs | 102 + .../ManagementApiTests/EmailTemplateTests.cs | 91 + .../ManagementApiTests/GroupTests.cs | 133 + .../ManagementApiTests/GroupUserTests.cs | 131 + .../IdentityProviderTests.cs | 113 + .../ManagementApiTests/LoggerTests.cs | 166 + .../OpenIdConnectProviderTests.cs | 208 + .../ManagementApiTests/PolicyTests.cs | 328 + .../ManagementApiTests/ProductTests.cs | 330 + .../ManagementApiTests/PropertiesTests.cs | 152 + .../ManagementApiTests/ReportTests.cs | 123 + .../ManagementApiTests/SubscriptionTests.cs | 218 + .../TenantAccessGitTests.cs | 63 + .../ManagementApiTests/TenantAccessTests.cs | 81 + .../ManagementApiTests/TenantGitTests.cs | 100 + .../ManagementApiTests/UserTests.cs | 348 + .../BackupRestoreTests.cs | 82 + .../CreateInsideVirtualNetworkTests.cs | 116 + .../CreateListDeleteTests.cs | 94 + .../CreateMultiHostNameService.cs | 107 + .../CreateMultiRegionService.cs | 75 + .../ResourceProviderTestBase.cs | 46 + .../Resources/SwaggerPetStoreV2.json | 459 ++ .../Resources/WADLYahoo.xml | 70 + .../CreateListUpdateDelete.json | 911 +++ .../CreateListUpdateDelete.json | 394 + .../CreateListUpdateDelete.json | 971 +++ .../ImportFromSwaggerDocument.json | 343 + .../ImportFromWadlDocument.json | 343 + .../CreateListUpdateDelete.json | 718 ++ .../CreateListUpdateDelete.json | 651 ++ .../ServiceFabricCreateUpdateDelete.json | 777 ++ .../CreateListUpdateDelete.json | 584 ++ .../CreateListUpdateDelete.json | 522 ++ .../CreateListUpdateDelete.json | 710 ++ .../CreateListUpdateDelete.json | 708 ++ .../CreateListUpdateDelete.json | 650 ++ .../CreateListUpdateDelete.json | 1164 +++ .../CreateListUpdateDelete.json | 1030 +++ .../CreateListUpdateDelete.json | 1632 ++++ .../ApisListAddRemove.json | 574 ++ .../CreateListUpdateDelete.json | 654 ++ .../GroupsListAddRemove.json | 574 ++ .../SubscriptionsList.json | 272 + .../CreateListUpdateDelete.json | 894 +++ .../Query.json | 638 ++ .../CreateListUpdateDelete.json | 1081 +++ .../GetUpdateKeys.json | 452 ++ .../EnableGetAndUpdateKeys.json | 644 ++ .../ValidateSaveDeploy.json | 763 ++ .../CreateListUpdateDelete.json | 713 ++ .../GroupsListAddRemove.json | 774 ++ .../SubscriptionsList.json | 394 + .../UserIdentities.json | 272 + .../BackupAndRestoreService.json | 6596 +++++++++++++++++ .../CreateInVirtualNetworkTest.json | 4993 +++++++++++++ .../CreateListDelete.json | 4420 +++++++++++ .../CreateMultiHostNameService.json | 3131 ++++++++ .../CreateMultiRegionService.json | 3021 ++++++++ .../Management.ApiManagement.sln | 28 + .../Customization/Models/OperationContract.cs | 44 + .../Models/SubscriptionContract.cs | 47 + .../Generated/ApiManagementClient.cs | 537 ++ .../Generated/ApiManagementOperations.cs | 402 + .../ApiManagementOperationsExtensions.cs | 91 + .../ApiManagementServiceOperations.cs | 2871 +++++++ ...piManagementServiceOperationsExtensions.cs | 810 ++ .../Generated/ApiOperationOperations.cs | 1548 ++++ .../ApiOperationOperationsExtensions.cs | 366 + .../Generated/ApiOperationPolicyOperations.cs | 895 +++ .../ApiOperationPolicyOperationsExtensions.cs | 216 + .../Generated/ApiOperations.cs | 1452 ++++ .../Generated/ApiOperationsExtensions.cs | 340 + .../Generated/ApiPolicyOperations.cs | 1062 +++ .../ApiPolicyOperationsExtensions.cs | 236 + .../Generated/ApiProductOperations.cs | 466 ++ .../ApiProductOperationsExtensions.cs | 114 + .../AuthorizationServerOperations.cs | 1416 ++++ ...AuthorizationServerOperationsExtensions.cs | 324 + .../Generated/BackendOperations.cs | 1420 ++++ .../Generated/BackendOperationsExtensions.cs | 320 + .../Generated/CertificateOperations.cs | 1194 +++ .../CertificateOperationsExtensions.cs | 273 + .../Generated/EmailTemplateOperations.cs | 1393 ++++ .../EmailTemplateOperationsExtensions.cs | 375 + .../Generated/GroupOperations.cs | 1434 ++++ .../Generated/GroupOperationsExtensions.cs | 328 + .../Generated/GroupUserOperations.cs | 977 +++ .../GroupUserOperationsExtensions.cs | 227 + .../Generated/IApiManagementClient.cs | 259 + .../Generated/IApiManagementOperations.cs | 70 + .../IApiManagementServiceOperations.cs | 514 ++ .../Generated/IApiOperationOperations.cs | 225 + .../IApiOperationPolicyOperations.cs | 137 + .../Generated/IApiOperations.cs | 212 + .../Generated/IApiPolicyOperations.cs | 153 + .../Generated/IApiProductOperations.cs | 82 + .../IAuthorizationServerOperations.cs | 205 + .../Generated/IBackendOperations.cs | 204 + .../Generated/ICertificateOperations.cs | 179 + .../Generated/IEmailTemplateOperations.cs | 238 + .../Generated/IGroupOperations.cs | 206 + .../Generated/IGroupUserOperations.cs | 147 + .../Generated/IIdentityProviderOperations.cs | 181 + .../Generated/ILoggerOperations.cs | 206 + .../Generated/INetworkStatusOperations.cs | 85 + .../IOpenIdConnectProviderOperations.cs | 201 + .../Generated/IPolicyOperations.cs | 139 + .../Generated/IPolicySnippetsOperations.cs | 56 + .../Generated/IProductApiOperations.cs | 145 + .../Generated/IProductGroupOperations.cs | 148 + .../Generated/IProductOperations.cs | 211 + .../Generated/IProductPolicyOperations.cs | 148 + .../IProductSubscriptionsOperations.cs | 82 + .../Generated/IPropertyOperations.cs | 203 + .../IQuotaByCounterKeysOperations.cs | 97 + .../Generated/IQuotaByPeriodKeysOperations.cs | 101 + .../Generated/IRegionsOperations.cs | 52 + .../Generated/IReportsOperations.cs | 413 ++ .../Generated/ISubscriptionOperations.cs | 260 + .../Generated/ITenantAccessGitOperations.cs | 96 + .../Generated/ITenantAccessOperations.cs | 126 + .../ITenantConfigurationOperations.cs | 237 + .../Generated/IUserGroupOperations.cs | 82 + .../Generated/IUserIdentitiesOperations.cs | 56 + .../Generated/IUserOperations.cs | 274 + .../Generated/IUserSubscriptionOperations.cs | 82 + .../Generated/IdentityProviderOperations.cs | 1167 +++ .../IdentityProviderOperationsExtensions.cs | 287 + .../Generated/LoggerOperations.cs | 1406 ++++ .../Generated/LoggerOperationsExtensions.cs | 316 + .../Models/AccessInformationContract.cs | 78 + .../AccessInformationUpdateParameters.cs | 57 + .../Generated/Models/AdditionalLocation.cs | 109 + .../Generated/Models/ApiContract.cs | 221 + .../Generated/Models/ApiContractProperties.cs | 152 + .../Models/ApiCreateOrUpdateHeaders.cs | 54 + .../Models/ApiCreateOrUpdateParameter.cs | 238 + .../Generated/Models/ApiEntityBaseContract.cs | 132 + .../Generated/Models/ApiGetHeaders.cs | 54 + ...viceApplyNetworkConfigurationParameters.cs | 58 + ...anagementServiceBackupRestoreParameters.cs | 112 + .../ApiManagementServiceBaseProperties.cs | 244 + ...tServiceCheckNameAvailabilityParameters.cs | 68 + .../ApiManagementServiceGetSsoTokenResult.cs | 56 + ...ManagementServiceNameAvailabilityResult.cs | 89 + .../Models/ApiManagementServiceResource.cs | 327 + .../ApiManagementServiceSkuProperties.cs | 75 + .../ApiManagementServiceUpdateParameters.cs | 303 + .../Models/ApiOperationGetHeaders.cs | 54 + .../Models/ApiOperationPolicyGetHeaders.cs | 56 + .../Generated/Models/ApiPolicyGetHeaders.cs | 54 + .../Models/ApiPolicyListByApiHeaders.cs | 54 + .../Generated/Models/ApiType.cs | 23 + .../Generated/Models/ApiUpdateContract.cs | 212 + .../Generated/Models/ApimResource.cs | 82 + .../Generated/Models/AsyncOperationStatus.cs | 71 + .../Models/AuthenticationSettingsContract.cs | 54 + .../Generated/Models/AuthorizationMethod.cs | 95 + .../Models/AuthorizationServerContract.cs | 290 + ...thorizationServerContractBaseProperties.cs | 180 + .../Models/AuthorizationServerGetHeaders.cs | 56 + .../AuthorizationServerUpdateContract.cs | 270 + .../BackendAuthorizationHeaderCredentials.cs | 102 + .../Generated/Models/BackendBaseParameters.cs | 160 + .../Generated/Models/BackendContract.cs | 200 + .../Models/BackendCredentialsContract.cs | 101 + .../Generated/Models/BackendGetHeaders.cs | 54 + .../Generated/Models/BackendProperties.cs | 66 + .../Generated/Models/BackendProtocol.cs | 59 + .../Generated/Models/BackendProxyContract.cs | 101 + .../BackendServiceFabricClusterProperties.cs | 115 + .../Generated/Models/BackendTlsProperties.cs | 68 + .../Models/BackendUpdateParameters.cs | 95 + .../Models/BearerTokenSendingMethod.cs | 59 + .../Generated/Models/CertificateContract.cs | 99 + .../CertificateCreateOrUpdateParameters.cs | 84 + .../Generated/Models/CertificateGetHeaders.cs | 54 + .../Models/CertificateInformation.cs | 90 + .../Models/ClientAuthenticationMethod.cs | 59 + .../Models/ConnectivityStatusContract.cs | 138 + .../Models/ConnectivityStatusType.cs | 24 + .../Generated/Models/ContentFormat.cs | 83 + .../Models/DeployConfigurationParameters.cs | 81 + .../Generated/Models/EmailTemplateContract.cs | 151 + .../Models/EmailTemplateGetHeaders.cs | 54 + ...ailTemplateParametersContractProperties.cs | 121 + .../Models/EmailTemplateUpdateParameters.cs | 130 + .../Generated/Models/ErrorFieldContract.cs | 69 + .../Generated/Models/ErrorResponse.cs | 76 + .../Models/ErrorResponseException.cs | 63 + .../Generated/Models/GenerateSsoUrlResult.cs | 53 + .../Generated/Models/GrantType.cs | 71 + .../Generated/Models/GroupContract.cs | 137 + .../Generated/Models/GroupCreateParameters.cs | 113 + .../Generated/Models/GroupGetHeaders.cs | 54 + .../Generated/Models/GroupType.cs | 65 + .../Generated/Models/GroupUpdateParameters.cs | 109 + .../Generated/Models/HostnameConfiguration.cs | 117 + .../Generated/Models/HostnameType.cs | 71 + .../Models/IdentityProviderBaseParameters.cs | 155 + .../Models/IdentityProviderContract.cs | 208 + .../Models/IdentityProviderGetHeaders.cs | 54 + .../Generated/Models/IdentityProviderList.cs | 62 + .../Generated/Models/IdentityProviderType.cs | 83 + .../IdentityProviderUpdateParameters.cs | 197 + .../Generated/Models/KeyType.cs | 59 + .../Generated/Models/LoggerContract.cs | 115 + .../Generated/Models/LoggerGetHeaders.cs | 54 + .../Generated/Models/LoggerType.cs | 53 + .../Generated/Models/LoggerUpdateContract.cs | 84 + .../Models/NameAvailabilityReason.cs | 65 + .../Generated/Models/NetworkStatusContract.cs | 93 + .../OAuth2AuthenticationSettingsContract.cs | 63 + .../Models/OpenIdConnectProviderGetHeaders.cs | 56 + .../Models/OpenidConnectProviderContract.cs | 128 + .../OpenidConnectProviderUpdateContract.cs | 111 + .../Generated/Models/Operation.cs | 62 + .../Generated/Models/OperationContract.cs | 197 + .../Generated/Models/OperationDisplay.cs | 80 + .../Models/OperationEntityBaseContract.cs | 128 + .../Models/OperationResultContract.cs | 106 + .../Models/OperationUpdateContract.cs | 180 + .../Generated/Models/Page.cs | 54 + .../Generated/Models/Page1.cs | 54 + .../Generated/Models/Page2.cs | 54 + .../Generated/Models/ParameterContract.cs | 113 + .../Generated/Models/PolicyCollection.cs | 62 + .../Generated/Models/PolicyContract.cs | 74 + .../Generated/Models/PolicyGetHeaders.cs | 54 + .../Generated/Models/PolicyScopeContract.cs | 77 + .../Generated/Models/PolicySnippetContract.cs | 76 + .../Models/PolicySnippetsCollection.cs | 54 + .../Generated/Models/ProductContract.cs | 190 + .../Models/ProductEntityBaseParameters.cs | 162 + .../Generated/Models/ProductGetHeaders.cs | 54 + .../Models/ProductPolicyGetHeaders.cs | 54 + .../ProductPolicyListByProductHeaders.cs | 56 + .../Generated/Models/ProductState.cs | 59 + .../Models/ProductUpdateParameters.cs | 181 + .../Generated/Models/PropertyContract.cs | 146 + .../Models/PropertyEntityBaseParameters.cs | 85 + .../Generated/Models/PropertyGetHeaders.cs | 54 + .../Models/PropertyUpdateParameters.cs | 133 + .../Generated/Models/Protocol.cs | 59 + .../Models/QuotaCounterCollection.cs | 71 + .../Generated/Models/QuotaCounterContract.cs | 131 + .../Models/QuotaCounterValueContract.cs | 64 + .../QuotaCounterValueContractProperties.cs | 63 + .../Generated/Models/RegionContract.cs | 69 + .../Generated/Models/ReportRecordContract.cs | 297 + .../Models/RepresentationContract.cs | 126 + .../Generated/Models/RequestContract.cs | 81 + .../Models/RequestReportRecordContract.cs | 218 + .../Generated/Models/Resource.cs | 71 + .../Generated/Models/ResponseContract.cs | 110 + .../Models/SaveConfigurationParameter.cs | 80 + .../Generated/Models/SkuType.cs | 65 + .../Generated/Models/SubscriptionContract.cs | 283 + .../Models/SubscriptionCreateParameters.cs | 181 + .../Models/SubscriptionGetHeaders.cs | 54 + .../SubscriptionKeyParameterNamesContract.cs | 63 + .../Generated/Models/SubscriptionState.cs | 83 + .../Models/SubscriptionUpdateParameters.cs | 174 + .../Generated/Models/TemplateName.cs | 35 + .../Models/TenantAccessGetHeaders.cs | 54 + .../Models/TenantAccessGitGetHeaders.cs | 54 + .../TenantConfigurationSyncStateContract.cs | 120 + .../Models/TokenBodyParameterContract.cs | 78 + .../Generated/Models/UserContract.cs | 131 + .../Generated/Models/UserCreateParameters.cs | 170 + .../Models/UserEntityBaseParameters.cs | 77 + .../Generated/Models/UserGetHeaders.cs | 54 + .../Models/UserIdentityCollection.cs | 71 + .../Generated/Models/UserIdentityContract.cs | 60 + .../Generated/Models/UserState.cs | 59 + .../Generated/Models/UserTokenParameters.cs | 78 + .../Generated/Models/UserTokenResult.cs | 53 + .../Generated/Models/UserUpdateParameters.cs | 156 + .../Models/VirtualNetworkConfiguration.cs | 92 + .../Generated/Models/VirtualNetworkType.cs | 65 + .../Generated/Models/X509CertificateName.cs | 62 + .../Generated/NetworkStatusOperations.cs | 487 ++ .../NetworkStatusOperationsExtensions.cs | 121 + .../OpenIdConnectProviderOperations.cs | 1413 ++++ ...enIdConnectProviderOperationsExtensions.cs | 318 + .../Generated/PolicyOperations.cs | 947 +++ .../Generated/PolicyOperationsExtensions.cs | 206 + .../Generated/PolicySnippetsOperations.cs | 274 + .../PolicySnippetsOperationsExtensions.cs | 73 + .../Generated/ProductApiOperations.cs | 975 +++ .../ProductApiOperationsExtensions.cs | 223 + .../Generated/ProductGroupOperations.cs | 978 +++ .../ProductGroupOperationsExtensions.cs | 229 + .../Generated/ProductOperations.cs | 1439 ++++ .../Generated/ProductOperationsExtensions.cs | 338 + .../Generated/ProductPolicyOperations.cs | 1045 +++ .../ProductPolicyOperationsExtensions.cs | 228 + .../ProductSubscriptionsOperations.cs | 466 ++ ...roductSubscriptionsOperationsExtensions.cs | 114 + .../Generated/PropertyOperations.cs | 1412 ++++ .../Generated/PropertyOperationsExtensions.cs | 316 + .../Generated/QuotaByCounterKeysOperations.cs | 490 ++ .../QuotaByCounterKeysOperationsExtensions.cs | 146 + .../Generated/QuotaByPeriodKeysOperations.cs | 505 ++ .../QuotaByPeriodKeysOperationsExtensions.cs | 152 + .../Generated/RegionsOperations.cs | 265 + .../Generated/RegionsOperationsExtensions.cs | 67 + .../Generated/ReportsOperations.cs | 3103 ++++++++ .../Generated/ReportsOperationsExtensions.cs | 648 ++ .../Generated/SubscriptionOperations.cs | 1821 +++++ .../SubscriptionOperationsExtensions.cs | 420 ++ .../Generated/TenantAccessGitOperations.cs | 652 ++ .../TenantAccessGitOperationsExtensions.cs | 139 + .../Generated/TenantAccessOperations.cs | 876 +++ .../TenantAccessOperationsExtensions.cs | 190 + .../TenantConfigurationOperations.cs | 1039 +++ ...TenantConfigurationOperationsExtensions.cs | 371 + .../Generated/UserGroupOperations.cs | 466 ++ .../UserGroupOperationsExtensions.cs | 114 + .../Generated/UserIdentitiesOperations.cs | 285 + .../UserIdentitiesOperationsExtensions.cs | 73 + .../Generated/UserOperations.cs | 1930 +++++ .../Generated/UserOperationsExtensions.cs | 433 ++ .../Generated/UserSubscriptionOperations.cs | 466 ++ .../UserSubscriptionOperationsExtensions.cs | 114 + ...soft.Azure.Management.ApiManagement.csproj | 17 + .../Properties/AssemblyInfo.cs | 20 + .../Management.ApiManagement/generate.cmd | 7 + .../apimanagement_resource-manager.txt | 10 + 338 files changed, 120858 insertions(+) create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/Helpers/Extensions.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiOperationTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiProductTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/AuthorizationServerTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/BackendTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/CertificateTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/EmailTemplateTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupUserTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/IdentityProviderTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/LoggerTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/OpenIdConnectProviderTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PolicyTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ProductTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PropertiesTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ReportTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/SubscriptionTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessGitTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantGitTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/UserTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/BackupRestoreTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateInsideVirtualNetworkTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateListDeleteTests.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiHostNameService.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiRegionService.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/ResourceProviderTestBase.cs create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/Resources/SwaggerPetStoreV2.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/Resources/WADLYahoo.xml create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiOperationTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiProductTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromSwaggerDocument.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromWadlDocument.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.AuthorizationServerTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/ServiceFabricCreateUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.CertificateTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.EmailTemplateTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupUserTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.IdentityProviderTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.LoggerTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.OpenIdConnectProviderTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PolicyTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/ApisListAddRemove.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/GroupsListAddRemove.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/SubscriptionsList.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PropertiesTest/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ReportTests/Query.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.SubscriptionTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessGitTests/GetUpdateKeys.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessTests/EnableGetAndUpdateKeys.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantGitTests/ValidateSaveDeploy.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/CreateListUpdateDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/GroupsListAddRemove.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/SubscriptionsList.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/UserIdentities.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/BackupAndRestoreService.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateInVirtualNetworkTest.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateListDelete.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiHostNameService.json create mode 100644 src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiRegionService.json create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement.sln create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementClient.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementClient.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementServiceOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiProductOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IAuthorizationServerOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IBackendOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ICertificateOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IEmailTemplateOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupUserOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IIdentityProviderOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ILoggerOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/INetworkStatusOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IOpenIdConnectProviderOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicySnippetsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductApiOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductGroupOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductSubscriptionsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPropertyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByCounterKeysOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByPeriodKeysOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IRegionsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IReportsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ISubscriptionOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessGitOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantConfigurationOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserGroupOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserIdentitiesOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserSubscriptionOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AdditionalLocation.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContractProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateParameter.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiEntityBaseContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceApplyNetworkConfigurationParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBaseProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceCheckNameAvailabilityParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceResource.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceSkuProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationPolicyGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyListByApiHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiUpdateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApimResource.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AsyncOperationStatus.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthenticationSettingsContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationMethod.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContractBaseProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerUpdateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendAuthorizationHeaderCredentials.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendBaseParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendCredentialsContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProtocol.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProxyContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendServiceFabricClusterProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendTlsProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BearerTokenSendingMethod.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateCreateOrUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateInformation.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ClientAuthenticationMethod.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ContentFormat.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/DeployConfigurationParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateParametersContractProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorFieldContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponse.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponseException.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GenerateSsoUrlResult.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GrantType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupCreateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameConfiguration.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderBaseParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderList.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/KeyType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerUpdateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NameAvailabilityReason.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NetworkStatusContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OAuth2AuthenticationSettingsContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenIdConnectProviderGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderUpdateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Operation.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationDisplay.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationEntityBaseContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationResultContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationUpdateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page1.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page2.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ParameterContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyCollection.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyScopeContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetsCollection.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductEntityBaseParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyListByProductHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductState.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyEntityBaseParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Protocol.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterCollection.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContractProperties.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RegionContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ReportRecordContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RepresentationContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestReportRecordContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Resource.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ResponseContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SaveConfigurationParameter.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SkuType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionCreateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionKeyParameterNamesContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionState.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TemplateName.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGitGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantConfigurationSyncStateContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TokenBodyParameterContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserCreateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserEntityBaseParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserGetHeaders.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityCollection.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityContract.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserState.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenResult.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserUpdateParameters.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkConfiguration.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkType.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/X509CertificateName.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperations.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperationsExtensions.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/Properties/AssemblyInfo.cs create mode 100644 src/SDKs/ApiManagement/Management.ApiManagement/generate.cmd create mode 100644 src/SDKs/_metadata/apimanagement_resource-manager.txt diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj new file mode 100644 index 000000000000..d4129cb00e77 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj @@ -0,0 +1,59 @@ + + + + ApiManagement.Tests + ApiManagement.Tests Class Library + 1.0.0-preview + Microsoft Corporation + ApiManagementManagement.Tests + + + + netcoreapp1.1 + 1.0.0-preview + + + + + + + + + + + + + + + PreserveNewest + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs new file mode 100644 index 000000000000..48767c1e2024 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using System; +using System.Linq; +using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.Collections.Generic; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Azure.Management.Storage; +using Microsoft.Azure.Management.Network; +using Xunit; +using Microsoft.Azure.Management.EventHub; + +namespace ApiManagement.Tests +{ + public class ApiManagementTestBase : TestBase + { + private const string TenantIdKey = "TenantId"; + private const string ObjectIdKey = "ObjectId"; + private const string SubIdKey = "SubId"; + private const string ApplicationIdKey = "ApplicationId"; + private const string ServiceNameKey = "ServiceName"; + private const string ResourceGroupNameKey = "ResourceGroup"; + private const string LocationKey = "Location"; + private const string TestCertificateKey = "TestCertificate"; + private const string TestCertificatePasswordKey = "TestCertificatePassword"; + + public string tenantId { get; set; } + public string location { get; set; } + public string subscriptionId { get; set; } + public ApiManagementClient client { get; set; } + public ResourceManagementClient resourcesClient { get; set; } + public StorageManagementClient storageClient { get; set; } + public NetworkManagementClient networkClient { get; set; } + public EventHubManagementClient eventHubClient { get; set; } + public string rgName { get; internal set; } + public Dictionary tags { get; internal set; } + public string serviceName { get; internal set; } + public ApiManagementServiceResource serviceProperties { get; internal set; } + public string base64EncodedTestCertificateData { get; internal set; } + public string testCertificatePassword { get; internal set; } + + public ApiManagementTestBase(MockContext context) + { + this.client = context.GetServiceClient(); + this.resourcesClient = context.GetServiceClient(); + this.storageClient = context.GetServiceClient(); + this.networkClient = context.GetServiceClient(); + this.eventHubClient = context.GetServiceClient(); + + Initialize(); + } + + private void Initialize() + { + var testEnv = TestEnvironmentFactory.GetTestEnvironment(); + + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + this.serviceName = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(ServiceNameKey); + if (string.IsNullOrEmpty(this.serviceName)) + { + this.serviceName = TestUtilities.GenerateName("sdktestapim"); + } + + this.location = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(LocationKey); + if (string.IsNullOrEmpty(this.location)) + { + this.location = GetLocation(); + } + + this.rgName = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(ResourceGroupNameKey); + if (string.IsNullOrEmpty(this.rgName)) + { + rgName = TestUtilities.GenerateName("sdktestrg"); + resourcesClient.ResourceGroups.CreateOrUpdate(rgName, new ResourceGroup { Location = this.location }); + } + + this.base64EncodedTestCertificateData = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(TestCertificateKey); + if (!string.IsNullOrEmpty(this.base64EncodedTestCertificateData)) + { + HttpMockServer.Variables[TestCertificateKey] = base64EncodedTestCertificateData; + } + this.testCertificatePassword = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(TestCertificatePasswordKey); + if(!string.IsNullOrEmpty(this.testCertificatePassword)) + { + HttpMockServer.Variables[TestCertificatePasswordKey] = testCertificatePassword; + } + + this.tenantId = testEnv.Tenant; + this.subscriptionId = testEnv.SubscriptionId; + HttpMockServer.Variables[TenantIdKey] = tenantId; + HttpMockServer.Variables[SubIdKey] = subscriptionId; + HttpMockServer.Variables[ServiceNameKey] = this.serviceName; + HttpMockServer.Variables[LocationKey] = this.location; + HttpMockServer.Variables[ResourceGroupNameKey] = this.rgName; + } + else if (HttpMockServer.Mode == HttpRecorderMode.Playback) + { + this.tenantId = testEnv.Tenant; + this.subscriptionId = testEnv.SubscriptionId; + tenantId = HttpMockServer.Variables[TenantIdKey]; + subscriptionId = HttpMockServer.Variables[SubIdKey]; + rgName = HttpMockServer.Variables[ResourceGroupNameKey]; + serviceName = HttpMockServer.Variables[ServiceNameKey]; + location = HttpMockServer.Variables[LocationKey]; + HttpMockServer.Variables.TryGetValue(TestCertificateKey, out var testcertificate); + if(!string.IsNullOrEmpty(testcertificate)) + { + this.base64EncodedTestCertificateData = testcertificate; + } + HttpMockServer.Variables.TryGetValue(TestCertificatePasswordKey, out var testCertificatePwd); + if(!string.IsNullOrEmpty(testCertificatePwd)) + { + this.testCertificatePassword = testCertificatePwd; + } + } + + tags = new Dictionary { { "tag1", "value1" }, { "tag2", "value2" }, { "tag3", "value3" } }; + + serviceProperties = new ApiManagementServiceResource + { + Sku = new ApiManagementServiceSkuProperties + { + Name = SkuType.Developer, + Capacity = 1 + }, + Location = location, + PublisherEmail = "apim@autorestsdk.com", + PublisherName = "autorestsdk", + Tags = tags + }; + } + + public void TryCreateApiManagementService() + { + this.client.ApiManagementService.CreateOrUpdate( + resourceGroupName: this.rgName, + serviceName: this.serviceName, + parameters: this.serviceProperties); + + var service = this.client.ApiManagementService.Get(this.rgName, this.serviceName); + Assert.Equal(this.serviceName, service.Name); + } + + public string GetLocation(string regionIn = "US") + { + var provider = this.resourcesClient.Providers.Get("Microsoft.ApiManagement"); + return provider.ResourceTypes.Where( + (resType) => + { + if (resType.ResourceType == "service") + return true; + else + return false; + } + ).First().Locations.Where(l => l.Contains(regionIn)).FirstOrDefault(); + } + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/Helpers/Extensions.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/Helpers/Extensions.cs new file mode 100644 index 000000000000..d74cbb91713c --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/Helpers/Extensions.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using System.IO; +using System.Xml.Linq; + +namespace ApiManagementManagement.Tests.Helpers +{ + public static class Extensions + { + public static bool DictionaryEqual(this IDictionary first, IDictionary second) + { + return first.DictionaryEqual(second, null); + } + + public static bool DictionaryEqual( + this IDictionary first, IDictionary second, + IEqualityComparer valueComparer) + { + if (first == second) return true; + if ((first == null) || (second == null)) return false; + if (first.Count != second.Count) return false; + + valueComparer = valueComparer ?? EqualityComparer.Default; + + foreach (var kvp in first) + { + TValue secondValue; + if (!second.TryGetValue(kvp.Key, out secondValue)) return false; + if (!valueComparer.Equals(kvp.Value, secondValue)) return false; + } + return true; + } + + public static Stream ToStream(this XDocument doc) + { + var stream = new MemoryStream(); + doc.Save(stream); + stream.Position = 0; + return stream; + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiOperationTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiOperationTests.cs new file mode 100644 index 000000000000..681427d37282 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiOperationTests.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class ApiOperationTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // there should be 'Echo API' which is created by default for every new instance of API Management + + var apis = testBase.client.Api.ListByService( + testBase.rgName, + testBase.serviceName); + + var api = apis.Single(); + + // list operations + + var listResponse = testBase.client.ApiOperation.ListByApi( + testBase.rgName, + testBase.serviceName, + api.Name); + + Assert.NotNull(listResponse);; + Assert.Equal(6, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + foreach (var operationContract in listResponse) + { + Assert.Equal(api.Name, operationContract.ApiIdentifier); + } + + // list paged + listResponse = testBase.client.ApiOperation.ListByApi( + testBase.rgName, + testBase.serviceName, + api.Name, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 3 }); + + Assert.NotNull(listResponse); + Assert.Equal(3, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + Assert.NotEmpty(listResponse.NextPageLink); + + // list next page + listResponse = testBase.client.ApiOperation.ListByApiNext(listResponse.NextPageLink); + Assert.NotNull(listResponse); + Assert.Equal(3, listResponse.Count()); + + // get first operation + var firstOperation = listResponse.First(); + + var getResponse = testBase.client.ApiOperation.Get( + testBase.rgName, + testBase.serviceName, + api.Name, + firstOperation.Name); + + Assert.NotNull(getResponse); + //Assert.Equal(firstOperation., getResponse.ApiId); + Assert.Equal(firstOperation.Name, getResponse.Name); + Assert.Equal(firstOperation.Method, getResponse.Method); + Assert.Equal(firstOperation.Name, getResponse.Name); + Assert.Equal(firstOperation.UrlTemplate, getResponse.UrlTemplate); + + // add new operation + string newOperationId = TestUtilities.GenerateName("operationid"); + try + { + string newOperationName = TestUtilities.GenerateName("operationName"); + string newOperationMethod = "PATCH"; + string newperationUrlTemplate = "/newresource"; + string newOperationDescription = TestUtilities.GenerateName("operationDescription"); + string newOperationRequestDescription = TestUtilities.GenerateName("operationRequestDescription"); + + string newOperationRequestHeaderParamName = TestUtilities.GenerateName("newOperationRequestHeaderParmName"); + string newOperationRequestHeaderParamDescr = TestUtilities.GenerateName("newOperationRequestHeaderParamDescr"); + bool newOperationRequestHeaderParamIsRequired = true; + string newOperationRequestHeaderParamDefaultValue = TestUtilities.GenerateName("newOperationRequestHeaderParamDefaultValue"); + string newOperationRequestHeaderParamType = "string"; + + string newOperationRequestParmName = TestUtilities.GenerateName("newOperationRequestParmName"); + string newOperationRequestParamDescr = TestUtilities.GenerateName("newOperationRequestParamDescr"); + bool newOperationRequestParamIsRequired = true; + string newOperationRequestParamDefaultValue = TestUtilities.GenerateName("newOperationRequestParamDefaultValue"); + string newOperationRequestParamType = "string"; + + string newOperationRequestRepresentationContentType = TestUtilities.GenerateName("newOperationRequestRepresentationContentType"); + string newOperationRequestRepresentationSample = TestUtilities.GenerateName("newOperationRequestRepresentationSample"); + + string newOperationResponseDescription = TestUtilities.GenerateName("newOperationResponseDescription"); + int newOperationResponseStatusCode = 1980785443; + string newOperationResponseRepresentationContentType = TestUtilities.GenerateName("newOperationResponseRepresentationContentType"); + string newOperationResponseRepresentationSample = TestUtilities.GenerateName("newOperationResponseRepresentationSample"); + + var newOperation = new OperationContract + { + DisplayName = newOperationName, + Method = newOperationMethod, + UrlTemplate = newperationUrlTemplate, + Description = newOperationDescription, + Request = new RequestContract + { + Description = newOperationRequestDescription, + Headers = new[] + { + new ParameterContract + { + Name = newOperationRequestHeaderParamName, + Description = newOperationRequestHeaderParamDescr, + Required = newOperationRequestHeaderParamIsRequired, + DefaultValue = newOperationRequestHeaderParamDefaultValue, + Type = newOperationRequestHeaderParamType, + Values = new[] {newOperationRequestHeaderParamDefaultValue, "1", "2", "3"} + } + }, + QueryParameters = new[] + { + new ParameterContract + { + Name = newOperationRequestParmName, + Description = newOperationRequestParamDescr, + Required = newOperationRequestParamIsRequired, + DefaultValue = newOperationRequestParamDefaultValue, + Type = newOperationRequestParamType, + Values = new[] {newOperationRequestParamDefaultValue, "1", "2", "3"} + } + }, + Representations = new[] + { + new RepresentationContract + { + ContentType = newOperationRequestRepresentationContentType, + Sample = newOperationRequestRepresentationSample + } + } + }, + Responses = new[] + { + new ResponseContract + { + Description = newOperationResponseDescription, + StatusCode = newOperationResponseStatusCode, + Representations = new[] + { + new RepresentationContract + { + ContentType = newOperationResponseRepresentationContentType, + Sample = newOperationResponseRepresentationSample + } + } + } + } + }; + + var createResponse = testBase.client.ApiOperation.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + api.Name, + newOperationId, + newOperation); + + Assert.NotNull(createResponse); + + // get the operation to check it was created + var apiOperationResponse = await testBase.client.ApiOperation.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + api.Name, + newOperationId); + + Assert.NotNull(getResponse); + + Assert.Equal(api.Name, apiOperationResponse.Body.ApiIdentifier); + Assert.Equal(newOperationId, apiOperationResponse.Body.Name); + Assert.Equal(newOperationName, apiOperationResponse.Body.DisplayName); + Assert.Equal(newOperationMethod, apiOperationResponse.Body.Method); + Assert.Equal(newperationUrlTemplate, apiOperationResponse.Body.UrlTemplate); + Assert.Equal(newOperationDescription, apiOperationResponse.Body.Description); + + Assert.NotNull(apiOperationResponse.Body.Request); + Assert.Equal(newOperationRequestDescription, apiOperationResponse.Body.Request.Description); + + Assert.NotNull(apiOperationResponse.Body.Request.Headers); + Assert.Equal(1, apiOperationResponse.Body.Request.Headers.Count); + Assert.Equal(newOperationRequestHeaderParamName, apiOperationResponse.Body.Request.Headers[0].Name); + Assert.Equal(newOperationRequestHeaderParamDescr, apiOperationResponse.Body.Request.Headers[0].Description); + Assert.Equal(newOperationRequestHeaderParamIsRequired, apiOperationResponse.Body.Request.Headers[0].Required); + Assert.Equal(newOperationRequestHeaderParamDefaultValue, apiOperationResponse.Body.Request.Headers[0].DefaultValue); + Assert.Equal(newOperationRequestHeaderParamType, apiOperationResponse.Body.Request.Headers[0].Type); + Assert.NotNull(apiOperationResponse.Body.Request.Headers[0].Values); + Assert.Equal(4, apiOperationResponse.Body.Request.Headers[0].Values.Count); + Assert.True(newOperation.Request.Headers[0].Values.All(value => apiOperationResponse.Body.Request.Headers[0].Values.Contains(value))); + + Assert.NotNull(apiOperationResponse.Body.Request.QueryParameters); + Assert.Equal(1, apiOperationResponse.Body.Request.QueryParameters.Count); + Assert.Equal(newOperationRequestParmName, apiOperationResponse.Body.Request.QueryParameters[0].Name); + Assert.Equal(newOperationRequestParamDescr, apiOperationResponse.Body.Request.QueryParameters[0].Description); + Assert.Equal(newOperationRequestParamIsRequired, apiOperationResponse.Body.Request.QueryParameters[0].Required); + Assert.Equal(newOperationRequestParamDefaultValue, apiOperationResponse.Body.Request.QueryParameters[0].DefaultValue); + Assert.Equal(newOperationRequestParamType, apiOperationResponse.Body.Request.QueryParameters[0].Type); + Assert.True(newOperation.Request.QueryParameters[0].Values.All(value => apiOperationResponse.Body.Request.QueryParameters[0].Values.Contains(value))); + + Assert.NotNull(apiOperationResponse.Body.Request.Representations); + Assert.Equal(1, apiOperationResponse.Body.Request.Representations.Count); + Assert.Equal(newOperationRequestRepresentationContentType, apiOperationResponse.Body.Request.Representations[0].ContentType); + Assert.Equal(newOperationRequestRepresentationSample, apiOperationResponse.Body.Request.Representations[0].Sample); + + Assert.NotNull(apiOperationResponse.Body.Responses); + Assert.Equal(1, apiOperationResponse.Body.Responses.Count); + Assert.Equal(newOperationResponseDescription, apiOperationResponse.Body.Responses[0].Description); + Assert.Equal(newOperationResponseStatusCode, apiOperationResponse.Body.Responses[0].StatusCode); + Assert.NotNull(apiOperationResponse.Body.Responses[0].Representations); + Assert.Equal(1, apiOperationResponse.Body.Responses[0].Representations.Count); + Assert.Equal(newOperationResponseRepresentationContentType, apiOperationResponse.Body.Responses[0].Representations[0].ContentType); + Assert.Equal(newOperationResponseRepresentationSample, apiOperationResponse.Body.Responses[0].Representations[0].Sample); + + // patch the operation + string patchedName = TestUtilities.GenerateName("patchedName"); + string patchedDescription = TestUtilities.GenerateName("patchedDescription"); + string patchedMethod = "HEAD"; + + testBase.client.ApiOperation.Update( + testBase.rgName, + testBase.serviceName, + api.Name, + newOperationId, + new OperationUpdateContract + { + DisplayName = patchedName, + Description = patchedDescription, + Method = patchedMethod + }, + apiOperationResponse.Headers.ETag); + + + // get the operation to check it was patched + getResponse = testBase.client.ApiOperation.Get( + testBase.rgName, + testBase.serviceName, + api.Name, + newOperationId); + + Assert.NotNull(getResponse); + + Assert.Equal(api.Name, getResponse.ApiIdentifier); + Assert.Equal(newOperationId, getResponse.Name); + Assert.Equal(patchedName, getResponse.DisplayName); + Assert.Equal(patchedMethod, getResponse.Method); + Assert.Equal(newperationUrlTemplate, getResponse.UrlTemplate); + Assert.Equal(patchedDescription, getResponse.Description); + + Assert.NotNull(getResponse.Request); + Assert.Equal(newOperationRequestDescription, getResponse.Request.Description); + + Assert.NotNull(getResponse.Request.Headers); + Assert.Equal(1, getResponse.Request.Headers.Count); + Assert.Equal(newOperationRequestHeaderParamName, getResponse.Request.Headers[0].Name); + Assert.Equal(newOperationRequestHeaderParamDescr, getResponse.Request.Headers[0].Description); + Assert.Equal(newOperationRequestHeaderParamIsRequired, getResponse.Request.Headers[0].Required); + Assert.Equal(newOperationRequestHeaderParamDefaultValue, getResponse.Request.Headers[0].DefaultValue); + Assert.Equal(newOperationRequestHeaderParamType, getResponse.Request.Headers[0].Type); + Assert.NotNull(getResponse.Request.Headers[0].Values); + Assert.Equal(4, getResponse.Request.Headers[0].Values.Count); + Assert.True(newOperation.Request.Headers[0].Values.All(value => getResponse.Request.Headers[0].Values.Contains(value))); + + Assert.NotNull(getResponse.Request.QueryParameters); + Assert.Equal(1, getResponse.Request.QueryParameters.Count); + Assert.Equal(newOperationRequestParmName, getResponse.Request.QueryParameters[0].Name); + Assert.Equal(newOperationRequestParamDescr, getResponse.Request.QueryParameters[0].Description); + Assert.Equal(newOperationRequestParamIsRequired, getResponse.Request.QueryParameters[0].Required); + Assert.Equal(newOperationRequestParamDefaultValue, getResponse.Request.QueryParameters[0].DefaultValue); + Assert.Equal(newOperationRequestParamType, getResponse.Request.QueryParameters[0].Type); + Assert.True(newOperation.Request.QueryParameters[0].Values.All(value => getResponse.Request.QueryParameters[0].Values.Contains(value))); + + Assert.NotNull(getResponse.Request.Representations); + Assert.Equal(1, getResponse.Request.Representations.Count); + Assert.Equal(newOperationRequestRepresentationContentType, getResponse.Request.Representations[0].ContentType); + Assert.Equal(newOperationRequestRepresentationSample, getResponse.Request.Representations[0].Sample); + + Assert.NotNull(getResponse.Responses); + Assert.Equal(1, getResponse.Responses.Count); + Assert.Equal(newOperationResponseDescription, getResponse.Responses[0].Description); + Assert.Equal(newOperationResponseStatusCode, getResponse.Responses[0].StatusCode); + Assert.NotNull(getResponse.Responses[0].Representations); + Assert.Equal(1, getResponse.Responses[0].Representations.Count); + Assert.Equal(newOperationResponseRepresentationContentType, getResponse.Responses[0].Representations[0].ContentType); + Assert.Equal(newOperationResponseRepresentationSample, getResponse.Responses[0].Representations[0].Sample); + + // delete the operation + testBase.client.ApiOperation.Delete( + testBase.rgName, + testBase.serviceName, + api.Name, + newOperationId, + "*"); + + // get the deleted operation to make sure it was deleted + try + { + testBase.client.ApiOperation.Get(testBase.rgName, testBase.serviceName, api.Name, newOperationId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.ApiOperation.Delete(testBase.rgName, testBase.serviceName, api.Name, newOperationId, "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiProductTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiProductTests.cs new file mode 100644 index 000000000000..52c70a568627 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiProductTests.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class ApiProductTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // there should be 'Echo API' which is created by default for every new instance of API Management + + var apis = testBase.client.Api.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(apis); + var api = apis.Single(); + Assert.Equal("Echo API", api.DisplayName); + + // list products + + var listResponse = testBase.client.ApiProduct.ListByApis( + testBase.rgName, + testBase.serviceName, + api.Name); + + Assert.NotNull(listResponse); + Assert.Equal(2, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + + // list paged + listResponse = testBase.client.ApiProduct.ListByApis( + testBase.rgName, + testBase.serviceName, + api.Name, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 1 }); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.Equal("Starter", listResponse.First().DisplayName); + Assert.NotEmpty(listResponse.NextPageLink); + + var listByApiResponse = await testBase.client.ApiProduct.ListByApisWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + api.Name, + new Microsoft.Rest.Azure.OData.ODataQuery { Skip = 1 }); + + Assert.NotNull(listByApiResponse); + Assert.Equal(1, listByApiResponse.Body.Count()); + Assert.Equal("Unlimited", listByApiResponse.Body.First().DisplayName); + Assert.NotNull(listByApiResponse.Body.NextPageLink); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiTests.cs new file mode 100644 index 000000000000..375b58edef5f --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ApiTests.cs @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System.Collections.Generic; +using System; +using System.Net; +using System.IO; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class ApiTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list all the APIs + var listResponse = testBase.client.Api.ListByService( + testBase.rgName, + testBase.serviceName, + null); + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + + var echoApi = listResponse.First(); + Assert.Equal("Echo API", echoApi.DisplayName); + Assert.Null(echoApi.Description); + Assert.Equal("http://echoapi.cloudapp.net/api", echoApi.ServiceUrl); + Assert.Equal("echo", echoApi.Path); + + Assert.NotNull(echoApi.Protocols); + Assert.Equal(1, echoApi.Protocols.Count); + Assert.Equal(Protocol.Https, echoApi.Protocols[0]); + + // get the API by id + var getResponse = await testBase.client.Api.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + echoApi.Name); + + Assert.NotNull(getResponse); + + Assert.Equal("Echo API", getResponse.Body.DisplayName); + Assert.Null(getResponse.Body.Description); + Assert.Equal("http://echoapi.cloudapp.net/api", getResponse.Body.ServiceUrl); + Assert.Equal("echo", getResponse.Body.Path); + + Assert.NotNull(getResponse.Body.Protocols); + Assert.Equal(1, getResponse.Body.Protocols.Count); + Assert.Equal(Protocol.Https, getResponse.Body.Protocols[0]); + + // add new api + + // create autorization server + string newApiAuthorizationServerId = TestUtilities.GenerateName("authorizationServerId"); + string newApiId = TestUtilities.GenerateName("apiid"); + + try + { + var createAuthServerParams = new AuthorizationServerContract + { + DisplayName = TestUtilities.GenerateName("authName"), + DefaultScope = TestUtilities.GenerateName("oauth2scope"), + AuthorizationEndpoint = "https://contoso.com/auth", + TokenEndpoint = "https://contoso.com/token", + ClientRegistrationEndpoint = "https://contoso.com/clients/reg", + GrantTypes = new List { GrantType.AuthorizationCode, GrantType.Implicit }, + AuthorizationMethods = new List { AuthorizationMethod.POST, AuthorizationMethod.GET }, + BearerTokenSendingMethods = new List { BearerTokenSendingMethod.AuthorizationHeader, BearerTokenSendingMethod.Query }, + ClientId = TestUtilities.GenerateName("clientid") + }; + + testBase.client.AuthorizationServer.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + newApiAuthorizationServerId, + createAuthServerParams); + + string newApiName = TestUtilities.GenerateName("apiname"); + string newApiDescription = TestUtilities.GenerateName("apidescription"); + string newApiPath = "newapiPath"; + string newApiServiceUrl = "http://newechoapi.cloudapp.net/api"; + string subscriptionKeyParametersHeader = TestUtilities.GenerateName("header"); + string subscriptionKeyQueryStringParamName = TestUtilities.GenerateName("query"); + string newApiAuthorizationScope = TestUtilities.GenerateName("oauth2scope"); + var newApiAuthenticationSettings = new AuthenticationSettingsContract + { + OAuth2 = new OAuth2AuthenticationSettingsContract + { + AuthorizationServerId = newApiAuthorizationServerId, + Scope = newApiAuthorizationScope + } + }; + + var createdApiContract = testBase.client.Api.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + newApiId, + new ApiCreateOrUpdateParameter + { + DisplayName = newApiName, + Description = newApiDescription, + Path = newApiPath, + ServiceUrl = newApiServiceUrl, + Protocols = new List { Protocol.Https, Protocol.Http }, + SubscriptionKeyParameterNames = new SubscriptionKeyParameterNamesContract + { + Header = subscriptionKeyParametersHeader, + Query = subscriptionKeyQueryStringParamName + }, + AuthenticationSettings = newApiAuthenticationSettings + }); + + // get new api to check it was added + var apiGetResponse = testBase.client.Api.Get(testBase.rgName, testBase.serviceName, newApiId); + + Assert.NotNull(apiGetResponse); + Assert.Equal(newApiId, apiGetResponse.Name); + Assert.Equal(newApiName, apiGetResponse.DisplayName); + Assert.Equal(newApiDescription, apiGetResponse.Description); + Assert.Equal(newApiPath, apiGetResponse.Path); + Assert.Equal(newApiServiceUrl, apiGetResponse.ServiceUrl); + Assert.Equal(subscriptionKeyParametersHeader, apiGetResponse.SubscriptionKeyParameterNames.Header); + Assert.Equal(subscriptionKeyQueryStringParamName, apiGetResponse.SubscriptionKeyParameterNames.Query); + Assert.Equal(2, apiGetResponse.Protocols.Count); + Assert.True(apiGetResponse.Protocols.Contains(Protocol.Http)); + Assert.True(apiGetResponse.Protocols.Contains(Protocol.Https)); + Assert.NotNull(apiGetResponse.AuthenticationSettings); + Assert.NotNull(apiGetResponse.AuthenticationSettings.OAuth2); + Assert.Equal(newApiAuthorizationServerId, apiGetResponse.AuthenticationSettings.OAuth2.AuthorizationServerId); + + // patch added api + string patchedName = TestUtilities.GenerateName("patchedname"); + string patchedDescription = TestUtilities.GenerateName("patchedDescription"); + string patchedPath = TestUtilities.GenerateName("patchedPath"); + + testBase.client.Api.Update( + testBase.rgName, + testBase.serviceName, + newApiId, + new ApiUpdateContract + { + DisplayName = patchedName, + Description = patchedDescription, + Path = patchedPath, + AuthenticationSettings = new AuthenticationSettingsContract + { + OAuth2 = null + } + }, + "*"); + + // get patched api to check it was patched + apiGetResponse = testBase.client.Api.Get(testBase.rgName, testBase.serviceName, newApiId); + + Assert.NotNull(apiGetResponse); + Assert.Equal(newApiId, apiGetResponse.Name); + Assert.Equal(patchedName, apiGetResponse.DisplayName); + Assert.Equal(patchedDescription, apiGetResponse.Description); + Assert.Equal(patchedPath, apiGetResponse.Path); + Assert.Equal(newApiServiceUrl, apiGetResponse.ServiceUrl); + Assert.Equal(subscriptionKeyParametersHeader, apiGetResponse.SubscriptionKeyParameterNames.Header); + Assert.Equal(subscriptionKeyQueryStringParamName, apiGetResponse.SubscriptionKeyParameterNames.Query); + Assert.Equal(2, apiGetResponse.Protocols.Count); + Assert.True(apiGetResponse.Protocols.Contains(Protocol.Http)); + Assert.True(apiGetResponse.Protocols.Contains(Protocol.Https)); + + // list with paging + listResponse = testBase.client.Api.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 1 }); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + + listResponse = testBase.client.Api.ListByServiceNext(listResponse.NextPageLink); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.Empty(listResponse.NextPageLink); + + // delete the api + testBase.client.Api.Delete( + testBase.rgName, + testBase.serviceName, + newApiId, + "*"); + + // get the deleted api to make sure it was deleted + try + { + testBase.client.Api.Get(testBase.rgName, testBase.serviceName, newApiId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + // delete authorization server + testBase.client.Api.Delete( + testBase.rgName, + testBase.serviceName, + newApiId, + "*"); + + testBase.client.AuthorizationServer.Delete( + testBase.rgName, + testBase.serviceName, + newApiAuthorizationServerId, + "*"); + } + } + } + + [Fact] + public async Task ImportFromSwaggerDocument() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + const string swaggerPath = "./Resources/SwaggerPetStoreV2.json"; + const string path = "swaggerApi"; + string swaggerApi = TestUtilities.GenerateName("aid"); + + try + { + // import API + string swaggerApiContent; + using (StreamReader reader = File.OpenText(swaggerPath)) + { + swaggerApiContent = reader.ReadToEnd(); + } + + var apiCreateOrUpdate = new ApiCreateOrUpdateParameter() + { + Path = path, + ContentFormat = ContentFormat.SwaggerJson, + ContentValue = swaggerApiContent + }; + + var swaggerApiResponse = testBase.client.Api.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + swaggerApi, + apiCreateOrUpdate); + + Assert.NotNull(swaggerApiResponse); + + // get the api to check it was created + var getResponse = testBase.client.Api.Get(testBase.rgName, testBase.serviceName, swaggerApi); + + Assert.NotNull(getResponse); + Assert.Equal(swaggerApi, getResponse.Name); + Assert.Equal(path, getResponse.Path); + Assert.Equal("Swagger Petstore Extensive", getResponse.DisplayName); + Assert.Equal("http://petstore.swagger.wordnik.com/api", getResponse.ServiceUrl); + } + finally + { + // remove the API + testBase.client.Api.Delete(testBase.rgName, testBase.serviceName, swaggerApi, "*"); + } + + } + } + + [Fact] + public async Task ImportFromWadlDocument() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + const string wadlPath = "./Resources/WADLYahoo.xml"; + const string path = "yahooWadl"; + string wadlApi = TestUtilities.GenerateName("aid"); + + try + { + // import API + string wadlApiContent; + using (StreamReader reader = File.OpenText(wadlPath)) + { + wadlApiContent = reader.ReadToEnd(); + } + + var apiCreateOrUpdate = new ApiCreateOrUpdateParameter() + { + Path = path, + ContentFormat = ContentFormat.WadlXml, + ContentValue = wadlApiContent + }; + + var wadlApiResponse = testBase.client.Api.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + wadlApi, + apiCreateOrUpdate); + + Assert.NotNull(wadlApiResponse); + + // get the api to check it was created + var getResponse = testBase.client.Api.Get(testBase.rgName, testBase.serviceName, wadlApi); + + Assert.NotNull(getResponse); + Assert.Equal(wadlApi, getResponse.Name); + Assert.Equal(path, getResponse.Path); + Assert.Equal("Yahoo News Search", getResponse.DisplayName); + Assert.Equal("http://api.search.yahoo.com/NewsSearchService/V1/", getResponse.ServiceUrl); + Assert.True(getResponse.IsCurrent); + Assert.True(getResponse.Protocols.Contains(Protocol.Https)); + Assert.Equal("1", getResponse.ApiRevision); + } + finally + { + // remove the API + testBase.client.Api.Delete(testBase.rgName, testBase.serviceName, wadlApi, "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/AuthorizationServerTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/AuthorizationServerTests.cs new file mode 100644 index 000000000000..9ad8620bdf0d --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/AuthorizationServerTests.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Collections.Generic; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class AuthorizationServerTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list all server + var listResponse = testBase.client.AuthorizationServer.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Equal(0, listResponse.Count()); + + // create server + string authsid = TestUtilities.GenerateName("authsid"); + try + { + var authorizationServerContract = new AuthorizationServerContract + { + DisplayName = TestUtilities.GenerateName("authName"), + DefaultScope = TestUtilities.GenerateName("oauth2scope"), + AuthorizationEndpoint = "https://contoso.com/auth", + TokenEndpoint = "https://contoso.com/token", + ClientRegistrationEndpoint = "https://contoso.com/clients/reg", + GrantTypes = new List { GrantType.AuthorizationCode, GrantType.Implicit, GrantType.ResourceOwnerPassword }, + AuthorizationMethods = new List { AuthorizationMethod.POST, AuthorizationMethod.GET }, + BearerTokenSendingMethods = new List { BearerTokenSendingMethod.AuthorizationHeader, BearerTokenSendingMethod.Query }, + ClientId = TestUtilities.GenerateName("clientid"), + Description = TestUtilities.GenerateName("authdescription"), + ClientAuthenticationMethod = new List { ClientAuthenticationMethod.Basic }, + ClientSecret = TestUtilities.GenerateName("authclientsecret"), + ResourceOwnerPassword = TestUtilities.GenerateName("authresourceownerpwd"), + ResourceOwnerUsername = TestUtilities.GenerateName("authresourceownerusername"), + SupportState = true, + TokenBodyParameters = new[] + { + new TokenBodyParameterContract + { + Name = TestUtilities.GenerateName("tokenname"), + Value = TestUtilities.GenerateName("tokenvalue") + } + } + }; + + var createResponse = testBase.client.AuthorizationServer.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + authsid, + authorizationServerContract); + + Assert.NotNull(createResponse); + + // get to check is was created + var getResponse = await testBase.client.AuthorizationServer.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authsid); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(authsid, getResponse.Body.Name); + Assert.Equal(authorizationServerContract.DisplayName, getResponse.Body.DisplayName); + Assert.Equal(authorizationServerContract.Description, getResponse.Body.Description); + Assert.Equal(authorizationServerContract.DefaultScope, getResponse.Body.DefaultScope); + Assert.Equal(authorizationServerContract.AuthorizationEndpoint, getResponse.Body.AuthorizationEndpoint); + Assert.Equal(authorizationServerContract.TokenEndpoint, getResponse.Body.TokenEndpoint); + Assert.Equal(authorizationServerContract.ClientId, getResponse.Body.ClientId); + Assert.Equal(authorizationServerContract.ClientRegistrationEndpoint, getResponse.Body.ClientRegistrationEndpoint); + Assert.Equal(authorizationServerContract.ClientSecret, getResponse.Body.ClientSecret); + Assert.Equal(authorizationServerContract.ResourceOwnerPassword, getResponse.Body.ResourceOwnerPassword); + Assert.Equal(authorizationServerContract.ResourceOwnerUsername, getResponse.Body.ResourceOwnerUsername); + Assert.Equal(authorizationServerContract.GrantTypes.Count, getResponse.Body.GrantTypes.Count); + Assert.True(getResponse.Body.GrantTypes.All(gt => authorizationServerContract.GrantTypes.Contains(gt))); + Assert.Equal(authorizationServerContract.AuthorizationMethods.Count, getResponse.Body.AuthorizationMethods.Count); + Assert.True(getResponse.Body.AuthorizationMethods.All(gt => authorizationServerContract.AuthorizationMethods.Contains(gt))); + Assert.Equal(authorizationServerContract.ClientAuthenticationMethod.Count, getResponse.Body.ClientAuthenticationMethod.Count); + Assert.True(getResponse.Body.ClientAuthenticationMethod.All(gt => authorizationServerContract.ClientAuthenticationMethod.Contains(gt))); + Assert.Equal(authorizationServerContract.SupportState, getResponse.Body.SupportState); + Assert.Equal(authorizationServerContract.TokenBodyParameters.Count, getResponse.Body.TokenBodyParameters.Count); + Assert.True(getResponse.Body.TokenBodyParameters.All(p => authorizationServerContract.TokenBodyParameters.Any(p1 => p1.Name.Equals(p.Name, StringComparison.OrdinalIgnoreCase) && p1.Value.Equals(p.Value, StringComparison.OrdinalIgnoreCase)))); + + // list again + listResponse = testBase.client.AuthorizationServer.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + + // update + var updateParameters = new AuthorizationServerUpdateContract + { + GrantTypes = new List { GrantType.AuthorizationCode, GrantType.ResourceOwnerPassword } + }; + + testBase.client.AuthorizationServer.Update( + testBase.rgName, + testBase.serviceName, + authsid, + updateParameters, + getResponse.Headers.ETag); + + // get to check is was updated + getResponse = await testBase.client.AuthorizationServer.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authsid); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(authsid, getResponse.Body.Name); + Assert.Equal(authorizationServerContract.DisplayName, getResponse.Body.DisplayName); + Assert.Equal(authorizationServerContract.Description, getResponse.Body.Description); + Assert.Equal(authorizationServerContract.DefaultScope, getResponse.Body.DefaultScope); + Assert.Equal(authorizationServerContract.AuthorizationEndpoint, getResponse.Body.AuthorizationEndpoint); + Assert.Equal(authorizationServerContract.TokenEndpoint, getResponse.Body.TokenEndpoint); + Assert.Equal(authorizationServerContract.ClientId, getResponse.Body.ClientId); + Assert.Equal(authorizationServerContract.ClientRegistrationEndpoint, getResponse.Body.ClientRegistrationEndpoint); + Assert.Equal(authorizationServerContract.ClientSecret, getResponse.Body.ClientSecret); + Assert.Equal(authorizationServerContract.ResourceOwnerPassword, getResponse.Body.ResourceOwnerPassword); + Assert.Equal(authorizationServerContract.ResourceOwnerUsername, getResponse.Body.ResourceOwnerUsername); + Assert.Equal(updateParameters.GrantTypes.Count, getResponse.Body.GrantTypes.Count); + Assert.True(getResponse.Body.GrantTypes.All(gt => updateParameters.GrantTypes.Contains(gt))); + Assert.Equal(authorizationServerContract.AuthorizationMethods.Count, getResponse.Body.AuthorizationMethods.Count); + Assert.True(getResponse.Body.AuthorizationMethods.All(gt => authorizationServerContract.AuthorizationMethods.Contains(gt))); + Assert.Equal(authorizationServerContract.ClientAuthenticationMethod.Count, getResponse.Body.ClientAuthenticationMethod.Count); + Assert.True(getResponse.Body.ClientAuthenticationMethod.All(gt => authorizationServerContract.ClientAuthenticationMethod.Contains(gt))); + Assert.Equal(authorizationServerContract.SupportState, getResponse.Body.SupportState); + Assert.Equal(authorizationServerContract.TokenBodyParameters.Count, getResponse.Body.TokenBodyParameters.Count); + Assert.True(getResponse.Body.TokenBodyParameters.All(p => authorizationServerContract.TokenBodyParameters.Any(p1 => p1.Name.Equals(p.Name, StringComparison.OrdinalIgnoreCase) && p1.Value.Equals(p.Value, StringComparison.OrdinalIgnoreCase)))); + + // delete + testBase.client.AuthorizationServer.Delete( + testBase.rgName, + testBase.serviceName, + authsid, + getResponse.Headers.ETag); + + // get to check is was deleted + try + { + testBase.client.AuthorizationServer.Get( + testBase.rgName, + testBase.serviceName, + authsid); + + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + } + finally + { + // delete + testBase.client.AuthorizationServer.Delete( + testBase.rgName, + testBase.serviceName, + authsid, + "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/BackendTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/BackendTests.cs new file mode 100644 index 000000000000..e4dedd9c33b2 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/BackendTests.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Collections.Generic; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class BackendTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // create new group with default parameters + string backendId = TestUtilities.GenerateName("backendid"); + try + { + string backendName = TestUtilities.GenerateName("backendName"); + string urlParameter = new UriBuilder("https", backendName, 443).Uri.ToString(); + + var backendCreateParameters = new BackendContract(urlParameter, BackendProtocol.Http); + backendCreateParameters.Description = TestUtilities.GenerateName("description"); + backendCreateParameters.Tls = new BackendTlsProperties( + validateCertificateChain: true, + validateCertificateName: true); + backendCreateParameters.Credentials = new BackendCredentialsContract(); + backendCreateParameters.Credentials.Authorization = new BackendAuthorizationHeaderCredentials() + { + Parameter = "opensemame", + Scheme = "basic" + }; + backendCreateParameters.Credentials.Query = new Dictionary>(); + backendCreateParameters.Credentials.Query.Add("sv", new List { "xx", "bb", "cc" }); + backendCreateParameters.Credentials.Header = new Dictionary>(); + backendCreateParameters.Credentials.Header.Add("x-my-1", new List { "val1", "val2" }); + + var backendResponse = testBase.client.Backend.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + backendId, + backendCreateParameters); + + Assert.NotNull(backendResponse); + + // get to check it was created + var getResponse = await testBase.client.Backend.GetWithHttpMessagesAsync(testBase.rgName, testBase.serviceName, backendId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Body); + Assert.NotNull(getResponse.Headers); + Assert.Equal(backendId, getResponse.Body.Name); + Assert.NotNull(getResponse.Body.Description); + Assert.NotNull(getResponse.Body.Credentials.Authorization); + Assert.NotNull(getResponse.Body.Credentials.Query); + Assert.NotNull(getResponse.Body.Credentials.Header); + Assert.Equal(BackendProtocol.Http, getResponse.Body.Protocol); + Assert.Equal(1, getResponse.Body.Credentials.Query.Keys.Count); + Assert.Equal(1, getResponse.Body.Credentials.Header.Keys.Count); + Assert.NotNull(getResponse.Body.Credentials.Authorization); + Assert.Equal("basic", getResponse.Body.Credentials.Authorization.Scheme); + + var listBackends = testBase.client.Backend.ListByService(testBase.rgName, testBase.serviceName, null); + + Assert.NotNull(listBackends); + + // there should be one user + Assert.True(listBackends.Count() >= 1); + + // patch backend + string patchedDescription = TestUtilities.GenerateName("patchedDescription"); + testBase.client.Backend.Update( + testBase.rgName, + testBase.serviceName, + backendId, + new BackendUpdateParameters() + { + Description = patchedDescription + }, + getResponse.Headers.ETag); + + // get to check it was patched + var backendGetResponse = await testBase.client.Backend.GetWithHttpMessagesAsync(testBase.rgName, testBase.serviceName, backendId); + + Assert.NotNull(backendGetResponse); + Assert.Equal(backendId, backendGetResponse.Body.Name); + Assert.Equal(patchedDescription, backendGetResponse.Body.Description); + + // delete the backend + testBase.client.Backend.Delete( + testBase.rgName, + testBase.serviceName, + backendId, + backendGetResponse.Headers.ETag); + + // get the deleted backend to make sure it was deleted + try + { + testBase.client.Backend.Get(testBase.rgName, testBase.serviceName, backendId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.Backend.Delete(testBase.rgName, testBase.serviceName, backendId, "*"); + } + } + } + + [Fact] + public async Task ServiceFabricCreateUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // create new group with default parameters + string backendId = TestUtilities.GenerateName("sfbackend"); + string certificateId = TestUtilities.GenerateName("certificateId"); + try + { + var base64ArrayCertificate = Convert.FromBase64String(testBase.base64EncodedTestCertificateData); + var cert = new X509Certificate2(base64ArrayCertificate, testBase.testCertificatePassword); + + var createResponse = testBase.client.Certificate.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + certificateId, + new CertificateCreateOrUpdateParameters + { + Data = testBase.base64EncodedTestCertificateData, + Password = testBase.testCertificatePassword + }, + null); + + Assert.NotNull(createResponse); + Assert.Equal(certificateId, createResponse.Name); + + + string backendName = TestUtilities.GenerateName("backendName"); + string urlParameter = new UriBuilder("https", backendName, 443).Uri.ToString(); + + var backendCreateParameters = new BackendContract(urlParameter, BackendProtocol.Http); + backendCreateParameters.Description = TestUtilities.GenerateName("description"); + backendCreateParameters.Properties = new BackendProperties(); + backendCreateParameters.Properties.ServiceFabricCluster = new BackendServiceFabricClusterProperties(); + backendCreateParameters.Properties.ServiceFabricCluster.ClientCertificatethumbprint = cert.Thumbprint; + backendCreateParameters.Properties.ServiceFabricCluster.ManagementEndpoints = new List(); + backendCreateParameters.Properties.ServiceFabricCluster.ManagementEndpoints.Add(urlParameter); + backendCreateParameters.Properties.ServiceFabricCluster.MaxPartitionResolutionRetries = 5; + backendCreateParameters.Properties.ServiceFabricCluster.ServerX509Names = new List(); + backendCreateParameters.Properties.ServiceFabricCluster.ServerX509Names.Add(new X509CertificateName("serverCommonName1", "issuerThumbprint1")); + + var backendResponse = testBase.client.Backend.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + backendId, + backendCreateParameters); + + Assert.NotNull(backendResponse); + + // get to check it was created + var getResponse = await testBase.client.Backend.GetWithHttpMessagesAsync(testBase.rgName, testBase.serviceName, backendId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Body); + Assert.NotNull(getResponse.Headers); + Assert.Equal(backendId, getResponse.Body.Name); + Assert.NotNull(getResponse.Body.Description); + Assert.NotNull(getResponse.Body.Properties.ServiceFabricCluster); + Assert.Equal(BackendProtocol.Http, getResponse.Body.Protocol); + Assert.Equal(1, getResponse.Body.Properties.ServiceFabricCluster.ServerX509Names.Count); + Assert.Equal(1, getResponse.Body.Properties.ServiceFabricCluster.ManagementEndpoints.Count); + Assert.Equal(5, getResponse.Body.Properties.ServiceFabricCluster.MaxPartitionResolutionRetries); + + var listBackends = testBase.client.Backend.ListByService(testBase.rgName, testBase.serviceName, null); + + Assert.NotNull(listBackends); + + // there should be one user + Assert.True(listBackends.Count() >= 1); + + // patch backend + string patchedDescription = TestUtilities.GenerateName("patchedDescription"); + testBase.client.Backend.Update( + testBase.rgName, + testBase.serviceName, + backendId, + new BackendUpdateParameters() + { + Description = patchedDescription + }, + getResponse.Headers.ETag); + + // get to check it was patched + var backendGetResponse = await testBase.client.Backend.GetWithHttpMessagesAsync(testBase.rgName, testBase.serviceName, backendId); + + Assert.NotNull(backendGetResponse); + Assert.Equal(backendId, backendGetResponse.Body.Name); + Assert.Equal(patchedDescription, backendGetResponse.Body.Description); + + // delete the backend + testBase.client.Backend.Delete( + testBase.rgName, + testBase.serviceName, + backendId, + backendGetResponse.Headers.ETag); + + // get the deleted backend to make sure it was deleted + try + { + testBase.client.Backend.Get(testBase.rgName, testBase.serviceName, backendId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.Backend.Delete(testBase.rgName, testBase.serviceName, backendId, "*"); + testBase.client.Certificate.Delete(testBase.rgName, testBase.serviceName, certificateId, "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/CertificateTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/CertificateTests.cs new file mode 100644 index 000000000000..6a7905a7cb45 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/CertificateTests.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Security.Cryptography.X509Certificates; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class CertificateTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list certificates: there should be none + var listResponse = testBase.client.Certificate.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Equal(0, listResponse.Count()); + + // create new certificate + string certificateId = TestUtilities.GenerateName("certificateId"); + + try + { + var base64ArrayCertificate = Convert.FromBase64String(testBase.base64EncodedTestCertificateData); + var cert = new X509Certificate2(base64ArrayCertificate, testBase.testCertificatePassword); + + var createResponse = testBase.client.Certificate.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + certificateId, + new CertificateCreateOrUpdateParameters + { + Data = testBase.base64EncodedTestCertificateData, + Password = testBase.testCertificatePassword + }, + null); + + Assert.NotNull(createResponse); + Assert.Equal(certificateId, createResponse.Name); + + // get the certificate to check is was created + var getResponse = await testBase.client.Certificate.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + certificateId); + + Assert.NotNull(getResponse); + Assert.Equal(certificateId, getResponse.Body.Name); + Assert.Equal(cert.Subject, getResponse.Body.Subject, StringComparer.OrdinalIgnoreCase); + Assert.Equal(cert.Thumbprint, getResponse.Body.Thumbprint, StringComparer.OrdinalIgnoreCase); + + // list certificates + listResponse = testBase.client.Certificate.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + + // remove the certificate + testBase.client.Certificate.Delete( + testBase.rgName, + testBase.serviceName, + certificateId, + getResponse.Headers.ETag); + + // list again to see it was removed + listResponse = testBase.client.Certificate.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Equal(0, listResponse.Count()); + } + finally + { + testBase.client.Certificate.Delete(testBase.rgName, testBase.serviceName, certificateId, "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/EmailTemplateTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/EmailTemplateTests.cs new file mode 100644 index 000000000000..837554051c98 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/EmailTemplateTests.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class EmailTemplateTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + var emailTemplates = testBase.client.EmailTemplate.ListByService(testBase.rgName, testBase.serviceName); + + Assert.NotNull(emailTemplates); + Assert.Equal(14, emailTemplates.Count()); + + var firstTemplate = emailTemplates.First(); + Assert.NotNull(firstTemplate); + Assert.NotNull(firstTemplate.Name); + Assert.NotNull(firstTemplate.Subject); + Assert.NotNull(firstTemplate.Title); + Assert.True(firstTemplate.IsDefault); + + try + { + var publisherEmailTemplate = testBase.client.EmailTemplate.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + firstTemplate.Name, + new EmailTemplateUpdateParameters() + { + Subject = "New Subject" + }); + + Assert.NotNull(publisherEmailTemplate); + + var publisherEmailTemplateResponse = await testBase.client.EmailTemplate.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + firstTemplate.Name); + + Assert.NotNull(publisherEmailTemplateResponse); + Assert.Equal("New Subject", publisherEmailTemplateResponse.Body.Subject); + Assert.False(publisherEmailTemplateResponse.Body.IsDefault); + Assert.NotNull(publisherEmailTemplateResponse.Body.Body); + Assert.NotNull(publisherEmailTemplateResponse.Body.Parameters); + Assert.NotNull(publisherEmailTemplateResponse.Headers.ETag); + + // reset the template to default + testBase.client.EmailTemplate.Delete( + testBase.rgName, + testBase.serviceName, + firstTemplate.Name, + publisherEmailTemplateResponse.Headers.ETag); + + publisherEmailTemplate = testBase.client.EmailTemplate.Get( + testBase.rgName, + testBase.serviceName, + firstTemplate.Name); + + Assert.NotNull(publisherEmailTemplate); + Assert.True(publisherEmailTemplate.IsDefault); + } + finally + { + testBase.client.EmailTemplate.Delete( + testBase.rgName, + testBase.serviceName, + firstTemplate.Name, + "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupTests.cs new file mode 100644 index 000000000000..dd23c1e68fbe --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupTests.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class GroupTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list all groups + var groupsList = testBase.client.Group.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.True(groupsList.IsAny()); + Assert.Equal(3, groupsList.Count()); + Assert.NotNull(groupsList.NextPageLink); + + // list by paging using ODATA query + groupsList = testBase.client.Group.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery() + { + Top = 1 + }); + + Assert.NotNull(groupsList); + Assert.Equal(1, groupsList.Count()); + Assert.NotNull(groupsList.NextPageLink); + + // create a new group + var newGroupId = TestUtilities.GenerateName("sdkGroupId"); + try + { + var newGroupDisplayName = TestUtilities.GenerateName("sdkGroup"); + var parameters = new GroupCreateParameters() + { + DisplayName = newGroupDisplayName, + Description = "Group created from Sdk client" + }; + + var createResponse = testBase.client.Group.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + newGroupId, + parameters); + Assert.NotNull(createResponse); + Assert.Equal(newGroupDisplayName, createResponse.DisplayName); + Assert.Equal(false, createResponse.BuiltIn); + Assert.NotNull(createResponse.Description); + Assert.Equal(GroupType.Custom, createResponse.GroupContractType); + + // get the group + var getResponse = await testBase.client.Group.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + newGroupId); + Assert.NotNull(getResponse); + Assert.Equal(newGroupDisplayName, getResponse.Body.DisplayName); + Assert.Equal(false, getResponse.Body.BuiltIn); + Assert.NotNull(getResponse.Body.Description); + Assert.Equal(GroupType.Custom, getResponse.Body.GroupContractType); + Assert.NotNull(getResponse.Headers.ETag); + + // update the group + var updateParameters = new GroupUpdateParameters() + { + Description = "Updating the description of the Sdk" + }; + + testBase.client.Group.Update( + testBase.rgName, + testBase.serviceName, + newGroupId, + updateParameters, + getResponse.Headers.ETag); + + // get the updatedGroup + var updatedResponse = await testBase.client.Group.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + newGroupId); + Assert.NotNull(updatedResponse); + Assert.Equal(newGroupDisplayName, updatedResponse.Body.DisplayName); + Assert.Equal(false, updatedResponse.Body.BuiltIn); + Assert.NotNull(updatedResponse.Body.Description); + Assert.Equal(updateParameters.Description, updatedResponse.Body.Description); + Assert.Equal(GroupType.Custom, updatedResponse.Body.GroupContractType); + Assert.NotNull(updatedResponse.Headers.ETag); + Assert.NotEqual(getResponse.Headers.ETag, updatedResponse.Headers.ETag); + + // delete the group + testBase.client.Group.Delete( + testBase.rgName, + testBase.serviceName, + newGroupId, + updatedResponse.Headers.ETag); + + Assert.Throws(() => + { + testBase.client.Group.Get( + testBase.rgName, + testBase.serviceName, + newGroupId); + }); + } + finally + { + testBase.client.Group.Delete(testBase.rgName, testBase.serviceName, newGroupId, "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupUserTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupUserTests.cs new file mode 100644 index 000000000000..022778d79ccf --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/GroupUserTests.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class GroupUserTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + var userId = TestUtilities.GenerateName("sdkUserId"); + var newGroupId = TestUtilities.GenerateName("sdkGroupId"); + + try + { + // create a new group + var newGroupDisplayName = TestUtilities.GenerateName("sdkGroup"); + var parameters = new GroupCreateParameters() + { + DisplayName = newGroupDisplayName, + Description = "Group created from Sdk client" + }; + + var createResponse = testBase.client.Group.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + newGroupId, + parameters); + Assert.NotNull(createResponse); + Assert.Equal(newGroupDisplayName, createResponse.DisplayName); + Assert.Equal(false, createResponse.BuiltIn); + Assert.NotNull(createResponse.Description); + Assert.Equal(GroupType.Custom, createResponse.GroupContractType); + + // list all group users + var listResponse = testBase.client.GroupUser.List( + testBase.rgName, + testBase.serviceName, + newGroupId, + null); + Assert.NotNull(listResponse); + Assert.Equal(0, listResponse.Count()); + + // create a new user and add to the group + var createParameters = new UserCreateParameters() + { + FirstName = TestUtilities.GenerateName("sdkFirst"), + LastName = TestUtilities.GenerateName("sdkLast"), + Email = TestUtilities.GenerateName("sdkFirst.Last") + "@contoso.com", + State = UserState.Active, + Note = "dummy note" + }; + + var userContract = testBase.client.User.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + userId, + createParameters); + Assert.NotNull(userContract); + + // add user to group + var addUserContract = testBase.client.GroupUser.Create( + testBase.rgName, + testBase.serviceName, + newGroupId, + userId); + + Assert.NotNull(addUserContract); + Assert.Equal(userContract.Id, addUserContract.Id); + + // list group user + var listgroupResponse = testBase.client.GroupUser.List( + testBase.rgName, + testBase.serviceName, + newGroupId); + Assert.NotNull(listgroupResponse); + Assert.Equal(1, listgroupResponse.Count()); + Assert.Equal(addUserContract.Id, listgroupResponse.First().Id); + + // remove user from group + testBase.client.GroupUser.Delete( + testBase.rgName, + testBase.serviceName, + newGroupId, + userId); + + // make sure user is removed + listgroupResponse = testBase.client.GroupUser.List( + testBase.rgName, + testBase.serviceName, + newGroupId); + Assert.NotNull(listgroupResponse); + Assert.Equal(0, listgroupResponse.Count()); + } + finally + { + // delete the user + testBase.client.User.Delete( + testBase.rgName, + testBase.serviceName, + userId, + "*", + deleteSubscriptions: true); + + // delete the group + testBase.client.Group.Delete( + testBase.rgName, + testBase.serviceName, + newGroupId, + "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/IdentityProviderTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/IdentityProviderTests.cs new file mode 100644 index 000000000000..04644215b057 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/IdentityProviderTests.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. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Threading.Tasks; +using System; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class IdentityProviderTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + try + { + // create facebook external identity provider + string clientId = TestUtilities.GenerateName("clientId"); + string clientSecret = TestUtilities.GenerateName("clientSecret"); + + var identityProviderCreateParameters = new IdentityProviderContract(clientId, clientSecret); + + var createResponse = testBase.client.IdentityProvider.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + IdentityProviderType.Facebook, + identityProviderCreateParameters); + + Assert.NotNull(createResponse); + + // get to check it was created + var getResponse = await testBase.client.IdentityProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + IdentityProviderType.Facebook); + + Assert.NotNull(getResponse); + Assert.Equal(IdentityProviderType.Facebook, getResponse.Body.IdentityProviderContractType); + Assert.NotNull(getResponse.Body.ClientId); + Assert.NotNull(getResponse.Body.ClientSecret); + Assert.Equal(clientId, getResponse.Body.ClientId); + Assert.Equal(clientSecret, getResponse.Body.ClientSecret); + Assert.Equal(IdentityProviderType.Facebook, getResponse.Body.IdentityProviderContractType); + + var listIdentityProviders = testBase.client.IdentityProvider.ListByService(testBase.rgName, testBase.serviceName); + + Assert.NotNull(listIdentityProviders); + + // there should be one identity Provider + Assert.True(listIdentityProviders.Value.Count >= 1); + + // patch identity provider + string patchedSecret = TestUtilities.GenerateName("clientSecret"); + testBase.client.IdentityProvider.Update( + testBase.rgName, + testBase.serviceName, + IdentityProviderType.Facebook, + new IdentityProviderUpdateParameters + { + ClientSecret = patchedSecret + }, + getResponse.Headers.ETag); + + // get to check it was patched + getResponse = await testBase.client.IdentityProvider.GetWithHttpMessagesAsync(testBase.rgName, testBase.serviceName, IdentityProviderType.Facebook); + + Assert.NotNull(getResponse); + Assert.Equal(IdentityProviderType.Facebook, getResponse.Body.IdentityProviderContractType); + Assert.Equal(patchedSecret, getResponse.Body.ClientSecret); + Assert.Equal(clientId, getResponse.Body.ClientId); + + // delete the identity provider + testBase.client.IdentityProvider.Delete( + testBase.rgName, + testBase.serviceName, + IdentityProviderType.Facebook, + getResponse.Headers.ETag); + + // get the deleted identity provider to make sure it was deleted + try + { + testBase.client.IdentityProvider.Get(testBase.rgName, testBase.serviceName, IdentityProviderType.Facebook); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.IdentityProvider.Delete( + testBase.rgName, + testBase.serviceName, + IdentityProviderType.Facebook, + "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/LoggerTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/LoggerTests.cs new file mode 100644 index 000000000000..1fa8c941b945 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/LoggerTests.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.EventHub; +using Microsoft.Azure.Management.EventHub.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System.Collections.Generic; +using System; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class LoggerTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + string newloggerId = TestUtilities.GenerateName("newlogger"); + string eventHubNameSpaceName = TestUtilities.GenerateName("eventHubNamespace"); + string eventHubName = TestUtilities.GenerateName("eventhubname"); + + try + { + // first create the event hub namespace + var eventHubNamespace = testBase.eventHubClient.Namespaces.CreateOrUpdate( + testBase.rgName, + eventHubNameSpaceName, + new NamespaceCreateOrUpdateParameters(testBase.location)); + Assert.NotNull(eventHubNamespace); + Assert.NotNull(eventHubNamespace.Name); + + // then create eventhub + var eventHub = testBase.eventHubClient.EventHubs.CreateOrUpdate( + testBase.rgName, + eventHubNameSpaceName, + eventHubName, + new EventHubCreateOrUpdateParameters(testBase.location)); + Assert.NotNull(eventHub); + + // create send policy auth rule + string sendPolicy = TestUtilities.GenerateName("sendPolicy"); + var eventHubAuthRule = testBase.eventHubClient.EventHubs.CreateOrUpdateAuthorizationRule( + testBase.rgName, + eventHubNameSpaceName, + eventHubName, + sendPolicy, + new SharedAccessAuthorizationRuleCreateOrUpdateParameters() + { + Rights = new List() { AccessRights.Send } + }); + + // get the keys + var eventHubKeys = testBase.eventHubClient.EventHubs.ListKeys( + testBase.rgName, + eventHubNameSpaceName, + eventHubName, + sendPolicy); + + // now create logger using the eventhub + var credentials = new Dictionary(); + credentials.Add("name", eventHubName); + credentials.Add("connectionString", eventHubKeys.PrimaryConnectionString); + + var loggerCreateParameters = new LoggerContract(credentials); + // create new group with default parameters + string loggerDescription = TestUtilities.GenerateName("newloggerDescription"); + loggerCreateParameters.Description = loggerDescription; + + var createResponse = testBase.client.Logger.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + newloggerId, + loggerCreateParameters); + + Assert.NotNull(createResponse); + Assert.Equal(newloggerId, createResponse.Name); + Assert.Equal(true, createResponse.IsBuffered); + Assert.NotNull(createResponse.Credentials); + + // get to check it was created + var getResponse = await testBase.client.Logger.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + newloggerId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Body); + Assert.Equal(newloggerId, getResponse.Body.Name); + Assert.NotNull(getResponse.Body.Description); + Assert.NotNull(getResponse.Body.Credentials); + Assert.Equal(2, getResponse.Body.Credentials.Keys.Count); + + var listLoggers = testBase.client.Logger.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listLoggers); + // there should be one user + Assert.True(listLoggers.Count() >= 1); + + // patch logger + string patchedDescription = TestUtilities.GenerateName("patchedDescription"); + testBase.client.Logger.Update( + testBase.rgName, + testBase.serviceName, + newloggerId, + new LoggerUpdateContract(LoggerType.AzureEventHub) + { + Description = patchedDescription + }, + getResponse.Headers.ETag); + + // get to check it was patched + getResponse = await testBase.client.Logger.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + newloggerId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Body); + Assert.Equal(newloggerId, getResponse.Body.Name); + Assert.Equal(patchedDescription, getResponse.Body.Description); + Assert.NotNull(getResponse.Body.Credentials); + + // delete the logger + testBase.client.Logger.Delete( + testBase.rgName, + testBase.serviceName, + newloggerId, + getResponse.Headers.ETag); + + // get the deleted logger to make sure it was deleted + try + { + testBase.client.Logger.Get(testBase.rgName, testBase.serviceName, newloggerId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.Logger.Delete(testBase.rgName, testBase.serviceName, newloggerId, "*"); + testBase.eventHubClient.EventHubs.Delete(testBase.rgName, eventHubNameSpaceName, eventHubName); + testBase.eventHubClient.Namespaces.Delete(testBase.rgName, eventHubNameSpaceName); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/OpenIdConnectProviderTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/OpenIdConnectProviderTests.cs new file mode 100644 index 000000000000..ce16a3ad1ec3 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/OpenIdConnectProviderTests.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class OpenIdConnectProviderTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + string openIdNoSecret = TestUtilities.GenerateName("openId"); + string openId2 = TestUtilities.GenerateName("openId"); + + try + { + // create a openId connect provider + string openIdProviderName = TestUtilities.GenerateName("openIdName"); + string metadataEndpoint = GetHttpsUrl(); + string clientId = TestUtilities.GenerateName("clientId"); + var openIdConnectCreateParameters = new OpenidConnectProviderContract(openIdProviderName, + metadataEndpoint, clientId); + + var createResponse = testBase.client.OpenIdConnectProvider.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + openIdNoSecret, + openIdConnectCreateParameters); + + Assert.NotNull(createResponse); + Assert.Equal(openIdProviderName, createResponse.DisplayName); + Assert.Equal(openIdNoSecret, createResponse.Name); + + // get to check it was created + var getResponse = await testBase.client.OpenIdConnectProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + openIdNoSecret); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Body); + Assert.NotNull(getResponse.Headers.ETag); + + Assert.Equal(openIdProviderName, getResponse.Body.DisplayName); + Assert.Equal(metadataEndpoint, getResponse.Body.MetadataEndpoint); + Assert.Equal(clientId, getResponse.Body.ClientId); + Assert.Equal(openIdNoSecret, getResponse.Body.Name); + Assert.Null(getResponse.Body.ClientSecret); + Assert.Null(getResponse.Body.Description); + + // create a Secret property + string openIdProviderName2 = TestUtilities.GenerateName("openIdName"); + string metadataEndpoint2 = GetHttpsUrl(); + string clientId2 = TestUtilities.GenerateName("clientId"); + string clientSecret = TestUtilities.GenerateName("clientSecret"); + var openIdConnectCreateParameters2 = new OpenidConnectProviderContract(openIdProviderName2, + metadataEndpoint2, clientId2); + openIdConnectCreateParameters2.ClientSecret = clientSecret; + openIdConnectCreateParameters2.Description = TestUtilities.GenerateName("description"); + + var createResponse2 = testBase.client.OpenIdConnectProvider.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + openId2, + openIdConnectCreateParameters2); + + Assert.NotNull(createResponse2); + Assert.Equal(openIdProviderName2, createResponse2.DisplayName); + Assert.Equal(openId2, createResponse2.Name); + + // get to check it was created + var getResponse2 = testBase.client.OpenIdConnectProvider.Get(testBase.rgName, testBase.serviceName, openId2); + + Assert.NotNull(getResponse2); + Assert.Equal(openIdProviderName2, getResponse2.DisplayName); + Assert.Equal(clientId2, getResponse2.ClientId); + Assert.Equal(metadataEndpoint2, getResponse2.MetadataEndpoint); + Assert.NotNull(getResponse2.ClientSecret); + Assert.Equal(clientSecret, getResponse2.ClientSecret); + Assert.NotNull(getResponse2.Description); + Assert.Equal(openId2, getResponse2.Name); + + // list the openId Connect Providers + var listResponse = testBase.client.OpenIdConnectProvider.ListByService(testBase.rgName, testBase.serviceName, null); + + Assert.NotNull(listResponse); + + // there should be atleast 2 openId connect Providers. + Assert.True(listResponse.Count() >= 2); + Assert.NotNull(listResponse.NextPageLink); + + // list using Query + listResponse = testBase.client.OpenIdConnectProvider.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 1 }); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + + // delete a OpenId Connect Provider + var deleteResponse = await testBase.client.OpenIdConnectProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + openIdNoSecret, + getResponse.Headers.ETag); + Assert.NotNull(deleteResponse); + Assert.Equal(HttpStatusCode.NoContent, deleteResponse.Response.StatusCode); + + // get the deleted openId Connect Provider to make sure it was deleted + try + { + testBase.client.OpenIdConnectProvider.Get(testBase.rgName, testBase.serviceName, openIdNoSecret); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + + // patch the openId Connect Provider + string updateMetadataEndpoint = GetHttpsUrl(); + string updatedClientId = TestUtilities.GenerateName("updatedClient"); + testBase.client.OpenIdConnectProvider.Update( + testBase.rgName, + testBase.serviceName, + openId2, + new OpenidConnectProviderUpdateContract + { + MetadataEndpoint = updateMetadataEndpoint, + ClientId = updatedClientId + }, + "*"); + + // get to check it was patched + var getResponseOpendId2 = await testBase.client.OpenIdConnectProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + openId2); + + Assert.NotNull(getResponseOpendId2); + Assert.NotNull(getResponseOpendId2.Body); + Assert.NotNull(getResponseOpendId2.Headers.ETag); + + Assert.Equal(openId2, getResponseOpendId2.Body.Name); + Assert.Equal(updatedClientId, getResponseOpendId2.Body.ClientId); + Assert.Equal(updateMetadataEndpoint, getResponseOpendId2.Body.MetadataEndpoint); + Assert.Equal(clientSecret, getResponseOpendId2.Body.ClientSecret); + Assert.NotNull(getResponseOpendId2.Body.Description); + + // delete the openId Connect Provider + testBase.client.OpenIdConnectProvider.Delete( + testBase.rgName, + testBase.serviceName, + openId2, + getResponseOpendId2.Headers.ETag); + + // get the deleted openId Connect Provider to make sure it was deleted + try + { + testBase.client.OpenIdConnectProvider.Get(testBase.rgName, testBase.serviceName, openId2); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.OpenIdConnectProvider.Delete( + testBase.rgName, + testBase.serviceName, + openIdNoSecret, + "*"); + + testBase.client.OpenIdConnectProvider.Delete( + testBase.rgName, + testBase.serviceName, + openId2, + "*"); + } + } + } + + static string GetHttpsUrl() + { + return "https://" + TestUtilities.GenerateName("provider") + "." + TestUtilities.GenerateName("endpoint"); + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PolicyTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PolicyTests.cs new file mode 100644 index 000000000000..abb2acdecfcf --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PolicyTests.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Xml.Linq; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class PolicyTests : TestBase + { + protected const string ApiValid = + @" + + + true + + + + + + + + + + "; + + public const string OperationValid = + @" + + + + + + + + + + + "; + + protected const string ProductValid = + @" + + + + + + + + + + + + "; + + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // test tenant policy + var globalPolicy = testBase.client.Policy.Get(testBase.rgName, testBase.serviceName); + + // set policy + var policyDoc = XDocument.Parse(globalPolicy.PolicyContent); + + var policyContract = new PolicyContract(policyDoc.ToString()); + + try + { + var globalPolicyResponse = testBase.client.Policy.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + policyContract); + Assert.NotNull(globalPolicyResponse); + + // get policy to check it was added + var getPolicyResponse = await testBase.client.Policy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getPolicyResponse); + Assert.NotNull(getPolicyResponse.Body.PolicyContent); + Assert.NotNull(getPolicyResponse.Headers.ETag); + + // remove policy + testBase.client.Policy.Delete( + testBase.rgName, + testBase.serviceName, + getPolicyResponse.Headers.ETag); + + // get policy to check it was removed + try + { + testBase.client.Policy.Get( + testBase.rgName, + testBase.serviceName); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.Policy.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + policyContract); + } + + // test api policy + + // there should be 'Echo API' with no policy + + var getApiResponse = testBase.client.Api.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + var api = getApiResponse.Single(); + + try + { + testBase.client.ApiPolicy.Get( + testBase.rgName, + testBase.serviceName, + api.Id); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + + // set policy + policyDoc = XDocument.Parse(ApiValid); + + var setResponse = testBase.client.ApiPolicy.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + api.Name, + new PolicyContract(policyDoc.ToString()), + "*"); + + Assert.NotNull(setResponse); + + // get policy to check it was added + var getApiPolicyResponse = await testBase.client.ApiPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + api.Name); + + Assert.NotNull(getApiPolicyResponse); + Assert.NotNull(getApiPolicyResponse.Body.PolicyContent); + Assert.NotNull(getApiPolicyResponse.Headers.ETag); + + // remove policy + testBase.client.ApiPolicy.Delete( + testBase.rgName, + testBase.serviceName, + api.Name, + getApiPolicyResponse.Headers.ETag); + + // get policy to check it was removed + try + { + testBase.client.ApiPolicy.Get( + testBase.rgName, + testBase.serviceName, + api.Name); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + + // test api operation policy + var getOperationResponse = testBase.client.ApiOperation.ListByApi( + testBase.rgName, + testBase.serviceName, + api.Name, + null); + + var operation = getOperationResponse.First(op => op.DisplayName.Equals("Modify Resource", StringComparison.OrdinalIgnoreCase)); + + try + { + testBase.client.ApiOperationPolicy.Get( + testBase.rgName, + testBase.serviceName, + api.Name, + operation.Name); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + + // set policy + policyDoc = XDocument.Parse(OperationValid); + + setResponse = testBase.client.ApiOperationPolicy.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + api.Name, + operation.Name, + new PolicyContract(policyDoc.ToString()), + "*"); + + Assert.NotNull(setResponse); + + // get policy to check it was added + var getOperationPolicyResponse = await testBase.client.ApiOperationPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + api.Name, + operation.Name); + + Assert.NotNull(getOperationPolicyResponse); + Assert.NotNull(getOperationPolicyResponse.Body.PolicyContent); + Assert.NotNull(getOperationPolicyResponse.Headers.ETag); + + // remove policy + testBase.client.ApiOperationPolicy.Delete( + testBase.rgName, + testBase.serviceName, + api.Name, + operation.Name, + getOperationPolicyResponse.Headers.ETag); + + // get policy to check it was removed + try + { + testBase.client.ApiOperationPolicy.Get( + testBase.rgName, + testBase.serviceName, + api.Name, + operation.Name); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + + + // test product policy + + // get 'Unlimited' product + var getProductResponse = testBase.client.Product.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "name eq 'Unlimited'" + }); + + var product = getProductResponse.Single(); + + // get product policy + try + { + testBase.client.ProductPolicy.Get( + testBase.rgName, + testBase.serviceName, + product.Name); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + + // set policy + policyDoc = XDocument.Parse(ProductValid); + + setResponse = testBase.client.ProductPolicy.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + product.Name, + new PolicyContract(policyContent: policyDoc.ToString())); + + Assert.NotNull(setResponse); + + // get policy to check it was added + var getProductPolicyResponse = await testBase.client.ProductPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + product.Name); + + Assert.NotNull(getProductPolicyResponse); + Assert.NotNull(getProductPolicyResponse.Body.PolicyContent); + Assert.NotNull(getProductPolicyResponse.Headers.ETag); + + // remove policy + testBase.client.ProductPolicy.Delete( + testBase.rgName, + testBase.serviceName, + product.Name, + getProductPolicyResponse.Headers.ETag); + + // get policy to check it was removed + try + { + testBase.client.ProductPolicy.Get( + testBase.rgName, + testBase.serviceName, + product.Name); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ProductTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ProductTests.cs new file mode 100644 index 000000000000..9553b2dce078 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ProductTests.cs @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class ProductTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + var listResponse = testBase.client.Product.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Equal(2, listResponse.Count());// there are 2 product Starter and Unlimited created by default + Assert.NotNull(listResponse.NextPageLink); + + string productId = TestUtilities.GenerateName("newproduct"); + + try + { + string productName = TestUtilities.GenerateName("productName"); + bool? productApprovalRequired = true; + string productDescription = TestUtilities.GenerateName("productDescription"); + ProductState productState = ProductState.NotPublished; + bool? productSubscriptionRequired = true; + int? productSubscriptionsLimit = 10; + string productTerms = TestUtilities.GenerateName("productTerms"); + + var createParameters = new ProductContract(productName) + { + ApprovalRequired = productApprovalRequired, + Description = productDescription, + State = productState, + SubscriptionRequired = productSubscriptionRequired, + SubscriptionsLimit = productSubscriptionsLimit, + Terms = productTerms + }; + + var createResponse = testBase.client.Product.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + productId, + createParameters); + + Assert.NotNull(createResponse); + Assert.Equal(productName, createResponse.DisplayName); + Assert.Equal(productApprovalRequired, createResponse.ApprovalRequired); + Assert.Equal(productDescription, createResponse.Description); + Assert.Equal(productState, createResponse.State); + Assert.Equal(productSubscriptionRequired, createResponse.SubscriptionRequired); + Assert.Equal(productSubscriptionsLimit, createResponse.SubscriptionsLimit); + Assert.Equal(productTerms, createResponse.Terms); + + //get async + var getResponse = await testBase.client.Product.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + productId); + Assert.NotNull(getResponse); + + // update product + string patchedName = TestUtilities.GenerateName("productName"); + string patchedDescription = TestUtilities.GenerateName("productDescription"); + string patchedTerms = TestUtilities.GenerateName("productTerms"); + var updateParameters = new ProductUpdateParameters + { + Name = patchedName, + Description = patchedDescription, + Terms = patchedTerms + }; + testBase.client.Product.Update( + testBase.rgName, + testBase.serviceName, + productId, + updateParameters, + getResponse.Headers.ETag); + + // get to check it was updated + var getUpdatedResponse = testBase.client.Product.Get(testBase.rgName, testBase.serviceName, productId); + + Assert.NotNull(getUpdatedResponse); + + Assert.Equal(patchedName, getUpdatedResponse.DisplayName); + Assert.Equal(productApprovalRequired, getUpdatedResponse.ApprovalRequired); + Assert.Equal(patchedDescription, getUpdatedResponse.Description); + Assert.Equal(productState, getUpdatedResponse.State); + Assert.Equal(productSubscriptionRequired, getUpdatedResponse.SubscriptionRequired); + Assert.Equal(productSubscriptionsLimit, getUpdatedResponse.SubscriptionsLimit); + Assert.Equal(patchedTerms, getUpdatedResponse.Terms); + + // delete the product + testBase.client.Product.Delete( + testBase.rgName, + testBase.serviceName, + productId, + "*", + true); + + // get the deleted api to make sure it was deleted + Assert.Throws(() + => testBase.client.Product.Get(testBase.rgName, testBase.serviceName, productId)); + } + finally + { + testBase.client.Product.Delete( + testBase.rgName, + testBase.serviceName, + productId, + "*", + true); + } + } + } + + [Fact] + public void ApisListAddRemove() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // there should be 'Echo API' which is created by default for every new instance of API Management and + // 'Starter' product + + var getProductsResponse = testBase.client.Product.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "name eq 'Starter'" + }); + + Assert.NotNull(getProductsResponse); + Assert.Equal(1, getProductsResponse.Count()); + + var product = getProductsResponse.Single(); + + // list product apis: there sHould be 1 + var listApisResponse = testBase.client.ProductApi.ListByProduct( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listApisResponse); + Assert.Equal(1, listApisResponse.Count()); + + // get api + var getResponse = testBase.client.Api.Get( + testBase.rgName, + testBase.serviceName, + listApisResponse.Single().Name); + + Assert.NotNull(getResponse); + + // remove api from product + testBase.client.ProductApi.Delete( + testBase.rgName, + testBase.serviceName, + product.Name, + listApisResponse.Single().Name); + + // list to check it was removed + listApisResponse = testBase.client.ProductApi.ListByProduct( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listApisResponse); + Assert.Equal(0, listApisResponse.Count()); + + // add the api to product + var addResponse = testBase.client.ProductApi.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + product.Name, + getResponse.Name); + + Assert.NotNull(addResponse); + + // list to check it was added + listApisResponse = testBase.client.ProductApi.ListByProduct( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listApisResponse); + Assert.Equal(1, listApisResponse.Count()); + } + } + + [Fact] + public void GroupsListAddRemove() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // there should be 'Administrators', 'Developers' and 'Guests' groups which is created by default for every new instance of API Management and + // 'Starter' product + + var getProductsResponse = testBase.client.Product.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "name eq 'Starter'" + }); + + Assert.NotNull(getProductsResponse); + Assert.Equal(1, getProductsResponse.Count()); + + var product = getProductsResponse.Single(); + + // list product groups: there sould be all three + var listGroupsResponse = testBase.client.ProductGroup.ListByProduct( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listGroupsResponse); + Assert.Equal(3, listGroupsResponse.Count()); + + // get group + var getResponse = testBase.client.Group.Get( + testBase.rgName, + testBase.serviceName, + listGroupsResponse.Single(g => g.DisplayName.Equals("Guests")).Name); + + Assert.NotNull(getResponse); + + // remove group from product + testBase.client.ProductGroup.Delete( + testBase.rgName, + testBase.serviceName, + product.Name, + getResponse.Name); + + // list to check it was removed + listGroupsResponse = testBase.client.ProductGroup.ListByProduct( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listGroupsResponse); + Assert.Equal(2, listGroupsResponse.Count()); + + // assign the group to the product + + var addResponse = testBase.client.ProductGroup.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + product.Name, + getResponse.Name); + + Assert.NotNull(addResponse); + + // list to check it was added + listGroupsResponse = testBase.client.ProductGroup.ListByProduct( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listGroupsResponse); + Assert.Equal(3, listGroupsResponse.Count()); + } + } + + [Fact] + public void SubscriptionsList() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // get product + var listProductsResponse = testBase.client.Product.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "name eq 'Starter'" + }); + + var product = listProductsResponse.Single(); + + // list product's subscriptions + var listSubscriptionsResponse = testBase.client.ProductSubscriptions.List( + testBase.rgName, + testBase.serviceName, + product.Name, + null); + + Assert.NotNull(listSubscriptionsResponse); + Assert.Equal(1, listSubscriptionsResponse.Count()); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PropertiesTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PropertiesTests.cs new file mode 100644 index 000000000000..627191aaff17 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/PropertiesTests.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System.Collections.Generic; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class PropertiesTest : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + string propertyId = TestUtilities.GenerateName("newproperty"); + string secretPropertyId = TestUtilities.GenerateName("secretproperty"); + + try + { + string propertyDisplayName = TestUtilities.GenerateName("propertydisplay"); + string propertyValue = TestUtilities.GenerateName("propertyValue"); + var createParameters = new PropertyContract(propertyDisplayName, propertyValue); + + // create a property + var propertyResponse = testBase.client.Property.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + propertyId, + createParameters); + + ValidateProperty(propertyResponse, testBase, propertyId, propertyDisplayName, propertyValue, false); + + // get the property + var getResponse = testBase.client.Property.Get( + testBase.rgName, + testBase.serviceName, + propertyId); + + ValidateProperty(propertyResponse, testBase, propertyId, propertyDisplayName, propertyValue, false); + + // create secret property + string secretPropertyDisplayName = TestUtilities.GenerateName("secretPropertydisplay"); + string secretPropertyValue = TestUtilities.GenerateName("secretPropertyValue"); + List tags = new List { "secret" }; + var secretCreateParameters = new PropertyContract(secretPropertyDisplayName, secretPropertyValue) + { + Secret = true, + Tags = tags + }; + + var secretPropertyResponse = testBase.client.Property.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + secretPropertyId, + secretCreateParameters); + + ValidateProperty(secretPropertyResponse, testBase, secretPropertyId, secretPropertyDisplayName, secretPropertyValue, true); + + // list the properties + var listResponse = testBase.client.Property.ListByService(testBase.rgName, testBase.serviceName, null); + Assert.NotNull(listResponse); + Assert.Equal(2, listResponse.Count()); + + // delete a property + testBase.client.Property.Delete( + testBase.rgName, + testBase.serviceName, + propertyId, + "*"); + + Assert.Throws(() + => testBase.client.Property.Get(testBase.rgName, testBase.serviceName, propertyId)); + + // patch the secret property + var updateProperty = new PropertyUpdateParameters() + { + Secret = false + }; + testBase.client.Property.Update( + testBase.rgName, + testBase.serviceName, + secretPropertyId, + updateProperty, + "*"); + + // check it is patched + var secretResponse = await testBase.client.Property.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + secretPropertyId); + + ValidateProperty( + secretResponse.Body, + testBase, + secretPropertyId, + secretPropertyDisplayName, + secretPropertyValue, + false); + + // delete this property + testBase.client.Property.Delete( + testBase.rgName, + testBase.serviceName, + secretPropertyId, + "*"); + + Assert.Throws(() + => testBase.client.Property.Get(testBase.rgName, testBase.serviceName, secretPropertyId)); + } + finally + { + testBase.client.Property.Delete(testBase.rgName, testBase.serviceName, propertyId, "*"); + testBase.client.Property.Delete(testBase.rgName, testBase.serviceName, secretPropertyId, "*"); + } + } + } + + static void ValidateProperty( + PropertyContract contract, + ApiManagementTestBase testBase, + string propertyId, + string propertyDisplayName, + string propertyValue, + bool isSecret, + List tags = null) + { + Assert.NotNull(contract); + Assert.Equal(propertyDisplayName, contract.DisplayName); + Assert.Equal(propertyValue, contract.Value); + Assert.Equal(isSecret, contract.Secret); + Assert.Equal(propertyId, contract.Name); + if (tags != null) + { + Assert.NotNull(contract.Tags); + Assert.Equal(tags.Count, contract.Tags.Count); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ReportTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ReportTests.cs new file mode 100644 index 000000000000..4e2a1f334746 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/ReportTests.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class ReportTests : TestBase + { + [Fact] + public async Task Query() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + var byApiResponse = testBase.client.Reports.ListByApi( + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }, + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(byApiResponse); + Assert.Equal(1, byApiResponse.Count()); + Assert.NotNull(byApiResponse.First().ApiId); + + var byGeoResponse = testBase.client.Reports.ListByGeo( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }); + + Assert.NotNull(byGeoResponse); + Assert.Equal(0, byGeoResponse.Count()); + + var byOperationResponse = testBase.client.Reports.ListByOperation( + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }, + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(byOperationResponse); + Assert.Equal(6, byOperationResponse.Count()); + + var byProductResponse = testBase.client.Reports.ListByProduct( + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }, + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(byProductResponse); + Assert.Equal(2, byProductResponse.Count()); + Assert.NotNull(byProductResponse.First().ProductId); + + var bySubscriptionResponse = testBase.client.Reports.ListBySubscription( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }); + + Assert.NotNull(bySubscriptionResponse); + Assert.Equal(2, bySubscriptionResponse.Count()); + Assert.NotNull(bySubscriptionResponse.First().SubscriptionId); + + var byTimeResponse = testBase.client.Reports.ListByTime( + testBase.rgName, + testBase.serviceName, + TimeSpan.FromMinutes(30), + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }); + + Assert.NotNull(byTimeResponse); + Assert.Equal(0, byTimeResponse.Count()); + + var byUserResponse = testBase.client.Reports.ListByUser( + new Microsoft.Rest.Azure.OData.ODataQuery() + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }, + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(byUserResponse); + Assert.Equal(2, byUserResponse.Count()); + Assert.NotNull(byUserResponse.First().UserId); + + var byRequestResponse = testBase.client.Reports.ListByRequest( + new Microsoft.Rest.Azure.OData.ODataQuery + { + Filter = "timestamp ge datetime'2017-06-22T00:00:00'" + }, + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(byRequestResponse); + Assert.Equal(2, byRequestResponse.Count()); + Assert.NotNull(byRequestResponse.First().RequestId); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/SubscriptionTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/SubscriptionTests.cs new file mode 100644 index 000000000000..671a4f0e4ef3 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/SubscriptionTests.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class SubscriptionTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list subscriptions: there should be two by default + var listResponse = testBase.client.Subscription.List( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.True(listResponse.Count() >= 2); + Assert.NotNull(listResponse.NextPageLink); + + // list paged + listResponse = testBase.client.Subscription.List( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 1 }); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + + // get first subscription + var firstSubscription = listResponse.First(); + + var getResponse = testBase.client.Subscription.Get( + testBase.rgName, + testBase.serviceName, + firstSubscription.Name); + + Assert.NotNull(getResponse); + Assert.Equal(firstSubscription.Name, getResponse.Name); + Assert.Equal(firstSubscription.NotificationDate, getResponse.NotificationDate); + Assert.Equal(firstSubscription.PrimaryKey, getResponse.PrimaryKey); + Assert.Equal(firstSubscription.ProductId, getResponse.ProductId); + Assert.Equal(firstSubscription.SecondaryKey, getResponse.SecondaryKey); + Assert.Equal(firstSubscription.StartDate, getResponse.StartDate); + Assert.Equal(firstSubscription.State, getResponse.State); + Assert.Equal(firstSubscription.StateComment, getResponse.StateComment); + Assert.Equal(firstSubscription.UserId, getResponse.UserId); + Assert.Equal(firstSubscription.CreatedDate, getResponse.CreatedDate); + Assert.Equal(firstSubscription.EndDate, getResponse.EndDate); + Assert.Equal(firstSubscription.ExpirationDate, getResponse.ExpirationDate); + + // update product to accept unlimited number or subscriptions + testBase.client.Product.Update( + testBase.rgName, + testBase.serviceName, + firstSubscription.ProductIdentifier, + new ProductUpdateParameters + { + SubscriptionsLimit = int.MaxValue + }, + "*"); + + // add new subscription + string newSubscriptionId = TestUtilities.GenerateName("newSubscriptionId"); + + try + { + string newSubscriptionName = TestUtilities.GenerateName("newSubscriptionName"); + string newSubscriptionPk = TestUtilities.GenerateName("newSubscriptionPK"); + string newSubscriptionSk = TestUtilities.GenerateName("newSubscriptionSK"); + var newSubscriptionState = SubscriptionState.Active; + + var newSubscriptionCreate = new SubscriptionCreateParameters( + firstSubscription.UserId, + firstSubscription.ProductId, + newSubscriptionName) + { + PrimaryKey = newSubscriptionPk, + SecondaryKey = newSubscriptionSk, + State = newSubscriptionState, + }; + + var subscriptionContract = testBase.client.Subscription.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + newSubscriptionId, + newSubscriptionCreate); + + Assert.NotNull(subscriptionContract); + Assert.Equal(firstSubscription.ProductId, subscriptionContract.ProductId); + Assert.Equal(firstSubscription.UserId, subscriptionContract.UserId); + Assert.Equal(newSubscriptionState, subscriptionContract.State); + Assert.Equal(newSubscriptionSk, subscriptionContract.SecondaryKey); + Assert.Equal(newSubscriptionPk, subscriptionContract.PrimaryKey); + Assert.Equal(newSubscriptionName, subscriptionContract.DisplayName); + + var subscriptionResponse = await testBase.client.Subscription.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + newSubscriptionId); + + Assert.NotNull(subscriptionResponse); + Assert.NotNull(subscriptionResponse.Headers.ETag); + + // patch the subscription + string patchedName = TestUtilities.GenerateName("patchedName"); + string patchedPk = TestUtilities.GenerateName("patchedPk"); + string patchedSk = TestUtilities.GenerateName("patchedSk"); + var patchedExpirationDate = new DateTime(2025, 5 + 2, 20); + + testBase.client.Subscription.Update( + testBase.rgName, + testBase.serviceName, + newSubscriptionId, + new SubscriptionUpdateParameters + { + DisplayName = patchedName, + PrimaryKey = patchedPk, + SecondaryKey = patchedSk, + ExpirationDate = patchedExpirationDate + }, + subscriptionResponse.Headers.ETag); + + // get patched subscription to check it was actually patched + getResponse = testBase.client.Subscription.Get( + testBase.rgName, + testBase.serviceName, + newSubscriptionId); + + Assert.NotNull(getResponse); + Assert.Equal(newSubscriptionId, getResponse.Name); + Assert.Equal(patchedName, getResponse.DisplayName); + Assert.Equal(patchedPk, getResponse.PrimaryKey); + Assert.Equal(patchedSk, getResponse.SecondaryKey); + Assert.Equal(newSubscriptionState, getResponse.State); + Assert.Equal(patchedExpirationDate, getResponse.ExpirationDate); + + // regenerate primary key + testBase.client.Subscription.RegeneratePrimaryKey( + testBase.rgName, + testBase.serviceName, + newSubscriptionId); + + // get the subscription to check the key + getResponse = testBase.client.Subscription.Get( + testBase.rgName, + testBase.serviceName, + newSubscriptionId); + + Assert.NotNull(getResponse); + Assert.NotEqual(patchedPk, getResponse.PrimaryKey); + Assert.Equal(patchedSk, getResponse.SecondaryKey); + + // regenerate secondary key + testBase.client.Subscription.RegenerateSecondaryKey( + testBase.rgName, + testBase.serviceName, + newSubscriptionId); + + // get the subscription to check the key + subscriptionResponse = await testBase.client.Subscription.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + newSubscriptionId); + + Assert.NotNull(subscriptionResponse); + Assert.NotNull(subscriptionResponse.Headers.ETag); + Assert.NotEqual(patchedPk, subscriptionResponse.Body.PrimaryKey); + Assert.NotEqual(patchedSk, subscriptionResponse.Body.SecondaryKey); + + // delete the subscription + testBase.client.Subscription.Delete( + testBase.rgName, + testBase.serviceName, + newSubscriptionId, + subscriptionResponse.Headers.ETag); + + // get the deleted subscription to make sure it was deleted + try + { + testBase.client.Subscription.Get(testBase.rgName, testBase.serviceName, newSubscriptionId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + } + finally + { + testBase.client.Subscription.Delete( + testBase.rgName, + testBase.serviceName, + newSubscriptionId, + "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessGitTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessGitTests.cs new file mode 100644 index 000000000000..21484bf2d701 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessGitTests.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Xunit; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class TenantAccessGitTests : TestBase + { + [Fact] + public async Task GetUpdateKeys() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // get settings + var getResponse = testBase.client.TenantAccessGit.Get( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse); + Assert.True(getResponse.Enabled); // git access is always enabled + Assert.NotNull(getResponse.PrimaryKey); + Assert.NotNull(getResponse.SecondaryKey); + + testBase.client.TenantAccessGit.RegeneratePrimaryKey( + testBase.rgName, + testBase.serviceName); + + var getResponse2 = testBase.client.TenantAccessGit.Get( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getResponse2); + Assert.Equal(getResponse.SecondaryKey, getResponse2.SecondaryKey); + Assert.NotEqual(getResponse.PrimaryKey, getResponse2.PrimaryKey); + + testBase.client.TenantAccessGit.RegenerateSecondaryKey( + testBase.rgName, + testBase.serviceName); + + var getTenantAccessResponse = await testBase.client.TenantAccessGit.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getTenantAccessResponse); + Assert.NotNull(getTenantAccessResponse.Body); + Assert.NotNull(getTenantAccessResponse.Headers.ETag); + Assert.NotEqual(getResponse.SecondaryKey, getTenantAccessResponse.Body.SecondaryKey); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessTests.cs new file mode 100644 index 000000000000..bd74f3254f05 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantAccessTests.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class TenantAccessTests : TestBase + { + [Fact] + public async Task EnableGetAndUpdateKeys() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // get settings + var getResponse = testBase.client.TenantAccess.Get( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getResponse); + Assert.False(getResponse.Enabled); + + try + { + // add more settings + var parameters = new AccessInformationUpdateParameters + { + Enabled = true + }; + testBase.client.TenantAccess.Update( + testBase.rgName, + testBase.serviceName, + parameters, + "*"); + + var getHttpResponse = await testBase.client.TenantAccess.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getHttpResponse); + Assert.True(getHttpResponse.Body.Enabled); + Assert.NotNull(getHttpResponse.Headers.ETag); + + testBase.client.TenantAccess.RegeneratePrimaryKey(testBase.rgName, testBase.serviceName); + + var getResponse2 = testBase.client.TenantAccess.Get(testBase.rgName, testBase.serviceName); + + Assert.NotNull(getResponse2); + Assert.Equal(getResponse.SecondaryKey, getResponse2.SecondaryKey); + Assert.NotEqual(getResponse.PrimaryKey, getResponse2.PrimaryKey); + + testBase.client.TenantAccess.RegenerateSecondaryKey(testBase.rgName, testBase.serviceName); + + getResponse2 = testBase.client.TenantAccess.Get(testBase.rgName, testBase.serviceName); + + Assert.NotNull(getResponse2); + Assert.NotEqual(getResponse.SecondaryKey, getResponse2.SecondaryKey); + } + finally + { + testBase.client.TenantAccess.Update( + testBase.rgName, + testBase.serviceName, + new AccessInformationUpdateParameters(enabled: false), + "*"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantGitTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantGitTests.cs new file mode 100644 index 000000000000..9e428a62ff7d --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/TenantGitTests.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. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Threading.Tasks; +using System; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class TenantGitTests : TestBase + { + [Fact] + public async Task ValidateSaveDeploy() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // test git is enabled + var getResponse = testBase.client.TenantAccessGit.Get( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getResponse); + Assert.True(getResponse.Enabled); + + // get the sync state of the repository + var getSyncState = testBase.client.TenantConfiguration.GetSyncState( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getSyncState); + Assert.NotNull(getSyncState); + Assert.True(getSyncState.IsGitEnabled); + + // save changes in current database to configuration database + var saveConfigurationParameters = new SaveConfigurationParameter("master"); + var getSaveResponse = testBase.client.TenantConfiguration.Save( + testBase.rgName, + testBase.serviceName, + saveConfigurationParameters); + + Assert.NotNull(getSaveResponse); + Assert.NotNull(getSaveResponse.Status); + Assert.NotNull(getSaveResponse.ResultInfo); + Assert.Equal(AsyncOperationStatus.Succeeded, getSaveResponse.Status); + + // get the sync state of the repository after Save + getSyncState = testBase.client.TenantConfiguration.GetSyncState( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getSyncState); + Assert.True(getSyncState.IsGitEnabled); + Assert.Equal("master", getSyncState.Branch); + + // validate changes in current database to configuration database + var deployConfigurationParameters = new DeployConfigurationParameters("master"); + var getValidateResponse = testBase.client.TenantConfiguration.Validate( + testBase.rgName, + testBase.serviceName, + deployConfigurationParameters); + + Assert.NotNull(getValidateResponse); + Assert.NotNull(getSaveResponse.ResultInfo); + Assert.Equal(AsyncOperationStatus.Succeeded, getSaveResponse.Status); + + // deploy changes in current database to configuration database + var getDeployResponse = testBase.client.TenantConfiguration.Deploy( + testBase.rgName, + testBase.serviceName, + deployConfigurationParameters); + + Assert.NotNull(getDeployResponse); + Assert.NotNull(getDeployResponse.ResultInfo); + Assert.Equal(AsyncOperationStatus.Succeeded, getDeployResponse.Status); + + // get the sync state of the repository + var getSyncStateResponse = await testBase.client.TenantConfiguration.GetSyncStateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName); + + Assert.NotNull(getSyncStateResponse); + Assert.NotNull(getSyncStateResponse.Body.CommitId); + Assert.True(getSyncStateResponse.Body.IsGitEnabled); + Assert.True(getSyncStateResponse.Body.IsSynced); + Assert.False(getSyncStateResponse.Body.IsExport); + Assert.NotNull(getSyncStateResponse.Body.SyncDate); + Assert.Equal("master", getSyncStateResponse.Body.Branch); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/UserTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/UserTests.cs new file mode 100644 index 000000000000..46104f10b317 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ManagementApiTests/UserTests.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Xunit; +using System.Linq; +using System.Threading.Tasks; +using System; +using System.Net; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class UserTests : TestBase + { + [Fact] + public async Task CreateListUpdateDelete() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list users + var listUsersResponse = testBase.client.User.ListByService( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listUsersResponse); + Assert.Equal(1, listUsersResponse.Count()); + + // create user + string userId = TestUtilities.GenerateName("userId"); + + try + { + string userEmail = "contoso@microsoft.com"; + string userFirstName = TestUtilities.GenerateName("userFirstName"); + string userLastName = TestUtilities.GenerateName("userLastName"); + string userPassword = TestUtilities.GenerateName("userPassword"); + string userNote = TestUtilities.GenerateName("userNote"); + UserState? userSate = UserState.Active; + + var userCreateParameters = new UserCreateParameters + { + Email = userEmail, + FirstName = userFirstName, + LastName = userLastName, + Password = userPassword, + Note = userNote, + State = userSate + }; + + var createUserResponse = testBase.client.User.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + userId, + userCreateParameters); + + Assert.NotNull(createUserResponse); + + // get the user to check it was added + var getUserResponse = await testBase.client.User.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + userId); + + Assert.NotNull(getUserResponse); + Assert.NotNull(getUserResponse.Headers.ETag); + Assert.Equal(userId, getUserResponse.Body.Name); + Assert.Equal(userEmail, getUserResponse.Body.Email); + Assert.Equal(userFirstName, getUserResponse.Body.FirstName); + Assert.Equal(userLastName, getUserResponse.Body.LastName); + Assert.Equal(userNote, getUserResponse.Body.Note); + Assert.Equal(userSate, getUserResponse.Body.State); + + // list users + listUsersResponse = testBase.client.User.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 1 }); + + Assert.NotNull(listUsersResponse); + Assert.NotNull(listUsersResponse.NextPageLink); + Assert.Equal(1, listUsersResponse.Count()); + + // generate SSO token URL + var genrateSsoResponse = testBase.client.User.GenerateSsoUrl( + testBase.rgName, + testBase.serviceName, + userId); + + Assert.NotNull(genrateSsoResponse); + Assert.NotNull(genrateSsoResponse.Value); + Uri uri; + Assert.True(Uri.TryCreate(genrateSsoResponse.Value, UriKind.Absolute, out uri)); + + // generate token for user + var userTokenParameters = new UserTokenParameters(KeyType.Primary, DateTime.UtcNow.AddDays(30)); + var genrateTokenResponse = testBase.client.User.GetSharedAccessToken( + testBase.rgName, + testBase.serviceName, + userId, + userTokenParameters); + + Assert.NotNull(genrateTokenResponse); + Assert.NotNull(genrateTokenResponse.Value); + + // remove the user + testBase.client.User.Delete( + testBase.rgName, + testBase.serviceName, + userId, + getUserResponse.Headers.ETag, + deleteSubscriptions: true); + + // get the deleted user to make sure it was deleted + try + { + testBase.client.User.Get(testBase.rgName, testBase.serviceName, userId); + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal(HttpStatusCode.NotFound, ex.Response.StatusCode); + } + } + finally + { + testBase.client.User.Delete( + testBase.rgName, + testBase.serviceName, + userId, + "*", + deleteSubscriptions: true); + } + } + } + + [Fact] + public void UserIdentities() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // there should be 'Echo API' which is created by default for every new instance of API Management and + // 'Starter' product + + var listUsersResponse = testBase.client.User.ListByService( + testBase.rgName, + testBase.serviceName, + new Microsoft.Rest.Azure.OData.ODataQuery { Filter = "firstName eq 'Administrator'" }); + + Assert.NotNull(listUsersResponse); + Assert.Equal(1, listUsersResponse.Count()); + + var user = listUsersResponse.Single(); + + // list user identities + var listResponse = testBase.client.UserIdentities.List( + testBase.rgName, + testBase.serviceName, + user.Name); + + Assert.NotNull(listResponse); + + // there should be Azure identification + Assert.Equal(1, listResponse.Value.Count()); + Assert.Equal(user.Email, listResponse.Value.Single().Id); + Assert.Equal("Azure", listResponse.Value.Single().Provider); + } + } + + [Fact] + public void GroupsListAddRemove() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // create new group + string gid = TestUtilities.GenerateName("groupId"); + + try + { + var createGroupParams = new GroupCreateParameters + { + DisplayName = TestUtilities.GenerateName("groupName"), + Type = GroupType.Custom, + }; + + testBase.client.Group.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + gid, + createGroupParams); + + // get the group + var getGroupResponse = testBase.client.Group.Get( + testBase.rgName, + testBase.serviceName, + gid); + + // create new user and add it to the group + string userId = TestUtilities.GenerateName("userId"); + try + { + var creteUserParameters = new UserCreateParameters + { + FirstName = TestUtilities.GenerateName("Ivan"), + LastName = TestUtilities.GenerateName("Ivanov"), + Email = TestUtilities.GenerateName("ivan.ivanov") + "@contoso.com", + Password = TestUtilities.GenerateName("pwd"), + State = UserState.Active, + Note = TestUtilities.GenerateName("note") + }; + + testBase.client.User.CreateOrUpdate( + testBase.rgName, + testBase.serviceName, + userId, + creteUserParameters); + + // list user groups + var listUserGroupsResponse = testBase.client.UserGroup.List( + testBase.rgName, + testBase.serviceName, + userId, + null); + + Assert.NotNull(listUserGroupsResponse); + + // there should be 'Developers' group by default + Assert.Equal(1, listUserGroupsResponse.Count()); + var group = listUserGroupsResponse.First(); + + // add the user to the group + var addResponse = testBase.client.GroupUser.Create( + testBase.rgName, + testBase.serviceName, + gid, + userId); + + Assert.NotNull(addResponse); + + // list user groups + listUserGroupsResponse = testBase.client.UserGroup.List( + testBase.rgName, + testBase.serviceName, + userId, + null); + + Assert.NotNull(listUserGroupsResponse); + // there should be two groups now + Assert.Equal(2, listUserGroupsResponse.Count()); + + var userGroup = listUserGroupsResponse.Single(g => g.Name == group.Name); + Assert.Equal(group.Id, userGroup.Id); + Assert.Equal(group.Name, userGroup.Name); + Assert.Equal(group.Description, userGroup.Description); + Assert.Equal(group.ExternalId, userGroup.ExternalId); + Assert.Equal(group.GroupContractType, userGroup.GroupContractType); + + // remove the user from the group + testBase.client.GroupUser.Delete( + testBase.rgName, + testBase.serviceName, + gid, + userId); + + // list to make sure it was removed + listUserGroupsResponse = testBase.client.UserGroup.List( + testBase.rgName, + testBase.serviceName, + userId, + null); + + Assert.NotNull(listUserGroupsResponse); + + // there should be default 'Developers' group + Assert.Equal(1, listUserGroupsResponse.Count()); + Assert.Equal("developers", listUserGroupsResponse.Single().Name); + } + finally + { + // delete the user + testBase.client.User.Delete(testBase.rgName, testBase.serviceName, userId, "*", true); + } + } + finally + { + testBase.client.Group.Delete(testBase.rgName, testBase.serviceName, gid, "*"); + } + } + } + + [Fact] + public void SubscriptionsList() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + var usersResponse = testBase.client.User.ListByService(testBase.rgName, testBase.serviceName, null); + var user = usersResponse.First(); + + // list subscriptions of a user: there should be two by default + var listResponse = testBase.client.UserSubscription.List( + testBase.rgName, + testBase.serviceName, + user.Name, + null); + + Assert.NotNull(listResponse); + Assert.True(listResponse.Count() >= 2); + Assert.NotNull(listResponse.NextPageLink); + + // list paged + listResponse = testBase.client.UserSubscription.List( + testBase.rgName, + testBase.serviceName, + user.Name, + new Microsoft.Rest.Azure.OData.ODataQuery { Top = 1 }); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + + // list next page + listResponse = testBase.client.UserSubscription.ListNext(listResponse.NextPageLink); + + Assert.NotNull(listResponse); + Assert.Equal(1, listResponse.Count()); + Assert.NotNull(listResponse.NextPageLink); + } + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/BackupRestoreTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/BackupRestoreTests.cs new file mode 100644 index 000000000000..c0a43f34f898 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/BackupRestoreTests.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.Storage; +using Microsoft.Azure.Management.Storage.Models; +using System.Linq; +using Xunit; +using System; + +namespace ApiManagement.Tests.ResourceProviderTests +{ + public partial class ApiManagementServiceTests + { + [Fact] + public void BackupAndRestoreService() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + + var createdService = testBase.client.ApiManagementService.CreateOrUpdate( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName, + parameters: testBase.serviceProperties); + + var storageAccountName = TestUtilities.GenerateName("sdkapimbackup"); + Assert.True(testBase.storageClient.StorageAccounts.CheckNameAvailability(storageAccountName).NameAvailable); + + var storageAccountCreate = new StorageAccountCreateParameters() + { + Location = testBase.location, + Sku = new Sku { Name = SkuName.StandardGRS }, + Kind = Kind.Storage + }; + + testBase.storageClient.StorageAccounts.Create(testBase.rgName, storageAccountName, storageAccountCreate); + var storageKeys = testBase.storageClient.StorageAccounts.ListKeys(testBase.rgName, storageAccountName); + + const string apimBackupContainerName = "apimbackupcontainer"; + const string apimBackupName = "apimbackup.zip"; + var parameters = new ApiManagementServiceBackupRestoreParameters() + { + StorageAccount = storageAccountName, + AccessKey = storageKeys.Keys.First().Value, + BackupName = apimBackupName, + ContainerName = apimBackupContainerName + }; + + var backupServiceResponse = testBase.client.ApiManagementService.Backup(testBase.rgName, testBase.serviceName, parameters); + Assert.NotNull(backupServiceResponse); + ValidateService(backupServiceResponse, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + + var restoreServiceResponse = testBase.client.ApiManagementService.Restore(testBase.rgName, testBase.serviceName, parameters); + Assert.NotNull(restoreServiceResponse); + ValidateService(restoreServiceResponse, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateInsideVirtualNetworkTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateInsideVirtualNetworkTests.cs new file mode 100644 index 000000000000..2fd5947f7251 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateInsideVirtualNetworkTests.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Management.Network; +using Microsoft.Azure.Management.Network.Models; +using System.Collections.Generic; +using Xunit; +using System; + +namespace ApiManagement.Tests.ResourceProviderTests +{ + public partial class ApiManagementServiceTests + { + [Fact] + public void CreateInVirtualNetworkTest() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + + var virtualNetworkName = TestUtilities.GenerateName("apimvnet"); + var subnetName = TestUtilities.GenerateName("apimsubnet"); + + var vnet = new VirtualNetwork() + { + Location = testBase.location, + + AddressSpace = new AddressSpace() + { + AddressPrefixes = new List() + { + "10.0.0.0/16", + } + }, + Subnets = new List() + { + new Subnet() + { + Name = subnetName, + AddressPrefix = "10.0.1.0/24", + }, + } + }; + + // Put Vnet + var putVnetResponse = testBase.networkClient.VirtualNetworks.CreateOrUpdate(testBase.rgName, virtualNetworkName, vnet); + Assert.Equal("Succeeded", putVnetResponse.ProvisioningState); + + var getSubnetResponse = testBase.networkClient.Subnets.Get(testBase.rgName, virtualNetworkName, subnetName); + Assert.NotNull(getSubnetResponse); + Assert.NotNull(getSubnetResponse.Id); + + testBase.serviceProperties.VirtualNetworkType = VirtualNetworkType.External; + testBase.serviceProperties.VirtualNetworkConfiguration = new VirtualNetworkConfiguration() + { + SubnetResourceId = getSubnetResponse.Id + }; + + var createdService = testBase.client.ApiManagementService.CreateOrUpdate( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName, + parameters: testBase.serviceProperties); + + ValidateService(createdService, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + + Assert.Equal(VirtualNetworkType.External, createdService.VirtualNetworkType); + Assert.NotNull(createdService.VirtualNetworkConfiguration); + Assert.Equal(getSubnetResponse.Id, createdService.VirtualNetworkConfiguration.SubnetResourceId); + + // apply network configuration + var applyNetworkConfigParameters = new ApiManagementServiceApplyNetworkConfigurationParameters() + { + Location = createdService.Location + }; + + var applyNetworkServiceResponse = testBase.client.ApiManagementService.ApplyNetworkConfigurationUpdates( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName, + parameters: applyNetworkConfigParameters); + + Assert.NotNull(applyNetworkServiceResponse); + Assert.Equal(createdService.Name, applyNetworkServiceResponse.Name); + Assert.NotNull(applyNetworkServiceResponse.VirtualNetworkConfiguration); + Assert.Equal(VirtualNetworkType.External, applyNetworkServiceResponse.VirtualNetworkType); + + // Delete + testBase.client.ApiManagementService.Delete( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + + Assert.Throws(() => + { + testBase.client.ApiManagementService.Get( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + }); + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateListDeleteTests.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateListDeleteTests.cs new file mode 100644 index 000000000000..e1ecee1fe0c6 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateListDeleteTests.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using System.Linq; +using Xunit; + +namespace ApiManagement.Tests.ResourceProviderTests +{ + public partial class ApiManagementServiceTests + { + [Fact] + public void CreateListDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + + // check name availability api + var parameters = new ApiManagementServiceCheckNameAvailabilityParameters() + { + Name = testBase.serviceName + }; + var checkNameResponse = testBase.client.ApiManagementService.CheckNameAvailability(parameters); + Assert.NotNull(checkNameResponse); + Assert.True(checkNameResponse.NameAvailable); + + // create service + var createdService = testBase.client.ApiManagementService.CreateOrUpdate( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName, + parameters: testBase.serviceProperties); + + ValidateService(createdService, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + + // list service + var listServiceResponse = testBase.client.ApiManagementService.ListByResourceGroup( + resourceGroupName: testBase.rgName); + + Assert.NotNull(listServiceResponse); + Assert.True(listServiceResponse.Any()); + + var serviceResponse = listServiceResponse.FirstOrDefault(); + + ValidateService(serviceResponse, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + + // get sso token + var ssoTokenResponse = testBase.client.ApiManagementService.GetSsoToken( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + + Assert.NotNull(ssoTokenResponse); + Assert.NotNull(ssoTokenResponse.RedirectUri); + + // Delete + testBase.client.ApiManagementService.Delete( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + + Assert.Throws(() => + { + testBase.client.ApiManagementService.Get( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + }); + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiHostNameService.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiHostNameService.cs new file mode 100644 index 000000000000..f76245e4a01b --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiHostNameService.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Xunit; + +namespace ApiManagement.Tests.ResourceProviderTests +{ + public partial class ApiManagementServiceTests + { + [Fact] + public void CreateMultiHostNameService() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + + testBase.serviceProperties.Sku.Name = SkuType.Premium; + var hostnameConfig1 = new HostnameConfiguration() + { + Type = HostnameType.Proxy, + HostName = "gateway1.powershelltest.net", + EncodedCertificate = testBase.base64EncodedTestCertificateData, + CertificatePassword = testBase.testCertificatePassword + }; + + var hostnameConfig2 = new HostnameConfiguration() + { + Type = HostnameType.Proxy, + HostName = "gateway2.powershelltest.net", + EncodedCertificate = testBase.base64EncodedTestCertificateData, + CertificatePassword = testBase.testCertificatePassword + }; + + var hostnameConfig3 = new HostnameConfiguration() + { + Type = HostnameType.Portal, + HostName = "portal1.powershelltest.net", + EncodedCertificate = testBase.base64EncodedTestCertificateData, + CertificatePassword = testBase.testCertificatePassword + }; + + testBase.serviceProperties.HostnameConfigurations = new List + { + hostnameConfig1, + hostnameConfig2, + hostnameConfig3 + }; + + var base64ArrayCertificate = Convert.FromBase64String(testBase.base64EncodedTestCertificateData); + var cert = new X509Certificate2(base64ArrayCertificate, testBase.testCertificatePassword); + + var createdService = testBase.client.ApiManagementService.CreateOrUpdate( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName, + parameters: testBase.serviceProperties); + + ValidateService(createdService, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + + Assert.NotNull(createdService.HostnameConfigurations); + Assert.Equal(3, createdService.HostnameConfigurations.Count()); + foreach(HostnameConfiguration hostnameConfig in testBase.serviceProperties.HostnameConfigurations) + { + var hostnameConfiguration = createdService.HostnameConfigurations + .SingleOrDefault(h => hostnameConfig.HostName.Equals(h.HostName)); + Assert.NotNull(hostnameConfiguration); + Assert.Equal(hostnameConfig.Type, hostnameConfiguration.Type); + Assert.NotNull(hostnameConfiguration.Certificate); + Assert.NotNull(hostnameConfiguration.Certificate.Subject); + Assert.Equal(cert.Thumbprint, hostnameConfiguration.Certificate.Thumbprint); + Assert.Equal(false, hostnameConfiguration.NegotiateClientCertificate); + } + + // Delete + testBase.client.ApiManagementService.Delete( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + + Assert.Throws(() => + { + testBase.client.ApiManagementService.Get( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + }); + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiRegionService.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiRegionService.cs new file mode 100644 index 000000000000..04cbdb8fb1fc --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/CreateMultiRegionService.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using Microsoft.Azure.Management.ApiManagement; +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace ApiManagement.Tests.ResourceProviderTests +{ + public partial class ApiManagementServiceTests + { + [Fact] + public void CreateMultiRegionService() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var testBase = new ApiManagementTestBase(context); + + var additionalLocation = new AdditionalLocation() + { + Location = testBase.GetLocation("Europe"), + Sku = new ApiManagementServiceSkuProperties(SkuType.Premium) + }; + + // only premium sku supports multi-region + testBase.serviceProperties.Sku.Name = SkuType.Premium; + testBase.serviceProperties.AdditionalLocations = new List() + { + additionalLocation + }; + + var createdService = testBase.client.ApiManagementService.CreateOrUpdate( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName, + parameters: testBase.serviceProperties); + + ValidateService(createdService, + testBase.serviceName, + testBase.rgName, + testBase.subscriptionId, + testBase.location, + testBase.serviceProperties.PublisherEmail, + testBase.serviceProperties.PublisherName, + testBase.serviceProperties.Sku.Name, + testBase.tags); + + Assert.NotNull(createdService.AdditionalLocations); + Assert.Equal(1, createdService.AdditionalLocations.Count()); + Assert.Equal(additionalLocation.Location.ToLowerInvariant().Replace(" ", string.Empty), + createdService.AdditionalLocations.First().Location.ToLowerInvariant().Replace(" ", string.Empty)); + + // Delete + testBase.client.ApiManagementService.Delete( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + + Assert.Throws(() => + { + testBase.client.ApiManagementService.Get( + resourceGroupName: testBase.rgName, + serviceName: testBase.serviceName); + }); + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/ResourceProviderTestBase.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/ResourceProviderTestBase.cs new file mode 100644 index 000000000000..835229ce378f --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ResourceProviderTests/ResourceProviderTestBase.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.Collections.Generic; +using Xunit; +using ApiManagementManagement.Tests.Helpers; + +namespace ApiManagement.Tests.ResourceProviderTests +{ + public partial class ApiManagementServiceTests : TestBase + { + private void ValidateService( + ApiManagementServiceResource service, + string expectedServiceName, + string expectedResourceGroupName, + string expectedSubId, + string expectedLocation, + string expectedPublisherEmail, + string expectedPublisherName, + SkuType expectedSku, + Dictionary expectedTags) + { + Assert.NotNull(service); + + string resourceIdFormat = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ApiManagement/service/{2}"; + string expectedResourceId = string.Format(resourceIdFormat, expectedSubId, expectedResourceGroupName, expectedServiceName); + + Assert.Equal(expectedResourceId, service.Id); + Assert.Equal(expectedLocation, service.Location); + Assert.Equal(expectedSku, service.Sku.Name); + Assert.Equal(expectedServiceName, service.Name); + Assert.True(expectedTags.DictionaryEqual(service.Tags)); + Assert.NotNull(service.PortalUrl); + Assert.NotNull(service.GatewayUrl); + Assert.NotNull(service.ManagementApiUrl); + Assert.NotNull(service.ScmUrl); + Assert.NotNull(service.StaticIps); + Assert.Equal(expectedPublisherName, service.PublisherName); + Assert.Equal(expectedPublisherEmail, service.PublisherEmail); + } + } +} diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/Resources/SwaggerPetStoreV2.json b/src/SDKs/ApiManagement/ApiManagement.Tests/Resources/SwaggerPetStoreV2.json new file mode 100644 index 000000000000..52a56b57e9bf --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/Resources/SwaggerPetStoreV2.json @@ -0,0 +1,459 @@ +{ + "x-comment": "This file was extended from /github.com/swagger-api/swagger-spec/blob/master/examples/v2.0/json/petstore-with-external-docs.json", + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore Extensive", + "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", + "termsOfService": "http://helloreverb.com/terms/", + "contact": { + "name": "Wordnik API Team", + "email": "foo@example.com", + "url": "http://madskristensen.net" + }, + "license": { + "name": "MIT", + "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" + } + }, + "externalDocs": { + "description": "find more info here", + "url": "https://helloreverb.com/about" + }, + "host": "petstore.swagger.wordnik.com", + "basePath": "/api", + "schemes": [ + "http" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/mySamplePath?willbeignored={willbeignored}": { + "post": { + "description": "Dummy desc", + "operationId": "dummyid1", + "parameters": [ + { + "name": "dummyDateHeaderParam", + "in": "header", + "description": "dummyDateHeaderParam description", + "required": true, + "type": "string", + "format": "date" + }, + { + "name": "dummyReqQueryParam", + "in": "query", + "description": "dummyReqQueryParam description", + "required": true, + "type": "string" + }, + { + "name": "dummyNotReqQueryParam", + "in": "query", + "description": "dummyNotReqQueryParam description", + "required": false, + "type": "string" + }, + { + "name": "dummyBodyParam", + "in": "body", + "description": "dummyBodyParam description", + "required": false, + "schema": { + "$ref": "#/definitions/pet", + "example": { + "id": 2, + "name": "myreqpet" + } + } + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/pet" + } + }, + "headers": { + "header1": { + "description": "sampleheader", + "type": "integer", + "format": "int64" + } + }, + "examples": { + "application/json": { + "id": 3, + "name": "myresppet" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/errorModel" + } + } + } + } + }, + "/resourceWithFormData": { + "post": { + "description": "resourceWithFormData desc", + "operationId": "resourceWithFormDataPOST", + "consumes": [ "multipart/form-data" ], + "parameters": [ + { + "name": "dummyFormDataParam", + "in": "formData", + "description": "dummyFormDataParam description", + "required": true, + "type": "string" + }, + { + "name": "dummyReqQueryParam", + "in": "query", + "description": "dummyReqQueryParam description", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "sample response" + } + } + } + }, + "/mySamplePath2?definedQueryParam={definedQueryParam}": { + "post": { + "produces": [ + "contenttype1", + "application/xml" + ], + "description": "Dummy desc", + "operationId": "dummyid2", + "parameters": [ + { + "$ref": "#/parameters/dummyQueryParameterDef" + }, + { + "$ref": "#/parameters/dummyBodyParameterDef" + } + ], + "responses": { + "204": { + "$ref": "#/responses/dummyResponseDef" + } + } + } + }, + "/pets2?dummyParam={dummyParam}": { + "get": { + "description": "Dummy description", + "operationId": "dummyOperationId", + "parameters": [ + { + "name": "dummyParam", + "in": "query", + "description": "dummyParam desc", + "required": true, + "type": "string", + "collectionFormat": "csv" + }, + { + "name": "limit", + "in": "query", + "description": "maximum number of results to return", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/errorModel" + } + } + } + } + }, + "/pets": { + "get": { + "description": "Returns all pets from the system that the user has access to", + "operationId": "findPets", + "externalDocs": { + "description": "find more info here", + "url": "https://helloreverb.com/about" + }, + "produces": [ + "application/json", + "application/xml" + ], + "consumes": [ + "text/xml", + "text/html" + ], + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "tags to filter by", + "required": false, + "type": "string", + "collectionFormat": "csv" + }, + { + "name": "limit", + "in": "query", + "description": "maximum number of results to return", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/pet" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/errorModel" + } + } + } + }, + "post": { + "description": "Creates a new pet in the store. Duplicates are allowed", + "operationId": "addPet", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "pet", + "in": "body", + "description": "Pet to add to the store", + "required": true, + "schema": { + "$ref": "#/definitions/newPet" + } + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "$ref": "#/definitions/pet" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/errorModel" + } + } + } + } + }, + "/pets/{id}": { + "get": { + "description": "Returns a user based on a single ID, if the user does not have access to the pet", + "operationId": "findPetById", + "produces": [ + "application/json", + "application/xml", + "text/xml", + "text/html" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "$ref": "#/definitions/pet" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/errorModel" + } + } + } + }, + "delete": { + "description": "deletes a single pet based on the ID supplied", + "operationId": "deletePet", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to delete", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "description": "pet deleted" + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/errorModel" + } + } + } + } + } + }, + "definitions": { + "pet": { + "required": [ + "id", + "name" + ], + "externalDocs": { + "description": "find more info here", + "url": "https://helloreverb.com/about" + }, + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "newPet": { + "allOf": [ + { + "$ref": "#/definitions/pet" + }, + { + "required": [ + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "errorModel": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + }, + "parameters": { + "dummyBodyParameterDef": { + "name": "definedBodyParam", + "in": "body", + "description": "definedBodyParam description", + "required": true, + "schema": { + "title": "Example Schema", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "age": { + "description": "Age in years", + "type": "integer", + "minimum": 0 + } + }, + "required": [ "firstName", "lastName" ] + } + }, + "dummyQueryParameterDef": { + "name": "definedQueryParam", + "in": "query", + "description": "definedQueryParam description", + "required": true, + "type": "string", + "format": "whateverformat" + } + }, + "responses": { + "dummyResponseDef": { + "description": "dummyResponseDef description", + "schema": { + "$ref": "#/definitions/pet" + }, + "headers": { + "header1": { + "type": "integer" + }, + "header2": { + "type": "integer" + } + }, + "examples": { + "contenttype1": "contenttype1 example", + "contenttype2": "contenttype2 example" + } + } + } +} + diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/Resources/WADLYahoo.xml b/src/SDKs/ApiManagement/ApiManagement.Tests/Resources/WADLYahoo.xml new file mode 100644 index 000000000000..f844ee0dfd77 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/Resources/WADLYahoo.xml @@ -0,0 +1,70 @@ + + + Yahoo News Search API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiOperationTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiOperationTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..284623f022de --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiOperationTests/CreateListUpdateDelete.json @@ -0,0 +1,911 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "b1a5e849-7abb-4558-9e7b-88b0c9192023" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fcab415a-d0f7-494f-9fed-e692432a7671", + "e96a9859-42c0-4ede-b65f-541d6ea8b0aa" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "dd17d214-de5c-4241-8478-ce5af995f996" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191829Z:dd17d214-de5c-4241-8478-ce5af995f996" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "38583363-6a96-4274-9334-27d209f11dba" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e2da8f46-eb9f-42ea-8fd9-0b5fab802e8a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "2d3c80f0-3a55-4b1f-b82a-be7662a7609a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191829Z:2d3c80f0-3a55-4b1f-b82a-be7662a7609a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fe8688a7-25b4-4807-bb65-593a4c205389" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8e8b4dae-8a83-41e6-a499-e879e2f4d654" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "778b6e53-dea7-4668-aec8-63d6d674edfd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191830Z:778b6e53-dea7-4668-aec8-63d6d674edfd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a5454ade-15f0-4823-af07-c37f2a28bc01" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/create-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"create-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Create resource\",\r\n \"method\": \"POST\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"modify-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Modify Resource\",\r\n \"method\": \"PUT\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a PUT call handled by the same \\\"echo\\\" backend as above. You can now specify a request body in addition to headers and it will be returned as well.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/remove-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"remove-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Remove resource\",\r\n \"method\": \"DELETE\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a DELETE call which traditionally deletes the resource. It is based on the same \\\"echo\\\" backend as in all other operations so nothing is actually deleted.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-header-only\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-header-only\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve header only\",\r\n \"method\": \"HEAD\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"The HEAD operation returns only headers. In this demonstration a policy is used to set additional headers when the response is returned and to enable JSONP.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve resource\",\r\n \"method\": \"GET\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a GET call on a sample resource. It is handled by an \\\"echo\\\" backend which returns a response equal to the request (the supplied headers and body are being returned as received).\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-resource-cached\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-resource-cached\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve resource (cached)\",\r\n \"method\": \"GET\",\r\n \"urlTemplate\": \"/resource-cached\",\r\n \"description\": \"A demonstration of a GET call with caching enabled on the same \\\"echo\\\" backend as above. Cache TTL is set to 1 hour. When you make the first request the headers you supplied will be cached. Subsequent calls will return the same headers as the first time even if you change them in your request.\",\r\n \"policies\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eba61599-f802-4299-8284-62827e0d30d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "fb87b8fa-3610-4763-8f25-2351ab761f80" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191830Z:fb87b8fa-3610-4763-8f25-2351ab761f80" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations?$top=3&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnM/JHRvcD0zJmFwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0b61104c-67d5-4b70-a942-2c690e82878f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/create-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"create-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Create resource\",\r\n \"method\": \"POST\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"modify-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Modify Resource\",\r\n \"method\": \"PUT\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a PUT call handled by the same \\\"echo\\\" backend as above. You can now specify a request body in addition to headers and it will be returned as well.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/remove-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"remove-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Remove resource\",\r\n \"method\": \"DELETE\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a DELETE call which traditionally deletes the resource. It is based on the same \\\"echo\\\" backend as in all other operations so nothing is actually deleted.\",\r\n \"policies\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations?%24top=3&api-version=2017-03-01&%24skip=3\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "652bbe61-c97f-437e-be1e-ebe5ee1395d2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "eabdf3bc-28d1-47ca-8289-de2a3c6cc950" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191830Z:eabdf3bc-28d1-47ca-8289-de2a3c6cc950" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations?%24top=3&api-version=2017-03-01&%24skip=3", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnM/JTI0dG9wPTMmYXBpLXZlcnNpb249MjAxNy0wMy0wMSYlMjRza2lwPTM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b2164263-ab10-4601-8bf7-2222ed3a6256" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-header-only\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-header-only\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve header only\",\r\n \"method\": \"HEAD\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"The HEAD operation returns only headers. In this demonstration a policy is used to set additional headers when the response is returned and to enable JSONP.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve resource\",\r\n \"method\": \"GET\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a GET call on a sample resource. It is handled by an \\\"echo\\\" backend which returns a response equal to the request (the supplied headers and body are being returned as received).\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-resource-cached\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-resource-cached\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve resource (cached)\",\r\n \"method\": \"GET\",\r\n \"urlTemplate\": \"/resource-cached\",\r\n \"description\": \"A demonstration of a GET call with caching enabled on the same \\\"echo\\\" backend as above. Cache TTL is set to 1 hour. When you make the first request the headers you supplied will be cached. Subsequent calls will return the same headers as the first time even if you change them in your request.\",\r\n \"policies\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3faf5ba8-7b79-478c-bdf8-58a77425a88f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "d8a9f282-4aff-4535-bf41-ead6fe90f7a7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191830Z:d8a9f282-4aff-4535-bf41-ead6fe90f7a7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-header-only?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvcmV0cmlldmUtaGVhZGVyLW9ubHk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d61b76ff-e47e-4a3b-98c5-d17fe9936470" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-header-only\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-header-only\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve header only\",\r\n \"method\": \"HEAD\",\r\n \"urlTemplate\": \"/resource\",\r\n \"templateParameters\": [],\r\n \"description\": \"The HEAD operation returns only headers. In this demonstration a policy is used to set additional headers when the response is returned and to enable JSONP.\",\r\n \"request\": {\r\n \"description\": null,\r\n \"queryParameters\": [],\r\n \"headers\": [],\r\n \"representations\": []\r\n },\r\n \"responses\": [\r\n {\r\n \"statusCode\": 200,\r\n \"description\": null,\r\n \"representations\": [],\r\n \"headers\": []\r\n }\r\n ],\r\n \"policies\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAADDA=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9d73238f-333e-4379-8650-51666e7689fa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "09d65c87-84f7-4151-9e4a-58d4d1f6cbdd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191831Z:09d65c87-84f7-4151-9e4a-58d4d1f6cbdd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"operationDescription8663\",\r\n \"request\": {\r\n \"description\": \"operationRequestDescription9632\",\r\n \"queryParameters\": [\r\n {\r\n \"name\": \"newOperationRequestParmName4765\",\r\n \"description\": \"newOperationRequestParamDescr990\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestParamDefaultValue6624\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestParamDefaultValue6624\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"headers\": [\r\n {\r\n \"name\": \"newOperationRequestHeaderParmName4650\",\r\n \"description\": \"newOperationRequestHeaderParamDescr7704\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationRequestRepresentationContentType8907\",\r\n \"sample\": \"newOperationRequestRepresentationSample7279\"\r\n }\r\n ]\r\n },\r\n \"responses\": [\r\n {\r\n \"statusCode\": 1980785443,\r\n \"description\": \"newOperationResponseDescription5050\",\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationResponseRepresentationContentType8695\",\r\n \"sample\": \"newOperationResponseRepresentationSample1493\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"displayName\": \"operationName5974\",\r\n \"method\": \"PATCH\",\r\n \"urlTemplate\": \"/newresource\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1744" + ], + "x-ms-client-request-id": [ + "79534d7f-8cc8-4f35-8990-68a3c1bfbafd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"operationid2082\",\r\n \"properties\": {\r\n \"displayName\": \"operationName5974\",\r\n \"method\": \"PATCH\",\r\n \"urlTemplate\": \"/newresource\",\r\n \"templateParameters\": [],\r\n \"description\": \"operationDescription8663\",\r\n \"request\": {\r\n \"description\": \"operationRequestDescription9632\",\r\n \"queryParameters\": [\r\n {\r\n \"name\": \"newOperationRequestParmName4765\",\r\n \"description\": \"newOperationRequestParamDescr990\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestParamDefaultValue6624\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestParamDefaultValue6624\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"headers\": [\r\n {\r\n \"name\": \"newOperationRequestHeaderParmName4650\",\r\n \"description\": \"newOperationRequestHeaderParamDescr7704\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationRequestRepresentationContentType8907\",\r\n \"sample\": \"newOperationRequestRepresentationSample7279\"\r\n }\r\n ]\r\n },\r\n \"responses\": [\r\n {\r\n \"statusCode\": 1980785443,\r\n \"description\": \"newOperationResponseDescription5050\",\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationResponseRepresentationContentType8695\",\r\n \"sample\": \"newOperationResponseRepresentationSample1493\"\r\n }\r\n ],\r\n \"headers\": []\r\n }\r\n ],\r\n \"policies\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2113" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD98=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eb5ec554-7f24-47e3-8230-51007c7b25ec" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "123edad4-a397-4a99-a9e9-36630966550e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191832Z:123edad4-a397-4a99-a9e9-36630966550e" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ecaf9670-63ec-4535-9ca9-6378fc18fda3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"operationid2082\",\r\n \"properties\": {\r\n \"displayName\": \"operationName5974\",\r\n \"method\": \"PATCH\",\r\n \"urlTemplate\": \"/newresource\",\r\n \"templateParameters\": [],\r\n \"description\": \"operationDescription8663\",\r\n \"request\": {\r\n \"description\": \"operationRequestDescription9632\",\r\n \"queryParameters\": [\r\n {\r\n \"name\": \"newOperationRequestParmName4765\",\r\n \"description\": \"newOperationRequestParamDescr990\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestParamDefaultValue6624\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestParamDefaultValue6624\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"headers\": [\r\n {\r\n \"name\": \"newOperationRequestHeaderParmName4650\",\r\n \"description\": \"newOperationRequestHeaderParamDescr7704\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationRequestRepresentationContentType8907\",\r\n \"sample\": \"newOperationRequestRepresentationSample7279\"\r\n }\r\n ]\r\n },\r\n \"responses\": [\r\n {\r\n \"statusCode\": 1980785443,\r\n \"description\": \"newOperationResponseDescription5050\",\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationResponseRepresentationContentType8695\",\r\n \"sample\": \"newOperationResponseRepresentationSample1493\"\r\n }\r\n ],\r\n \"headers\": []\r\n }\r\n ],\r\n \"policies\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD98=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e3ed637e-062a-49d3-a67d-cc001e4d1c23" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "0005a221-b70e-4b82-8d66-725751149c61" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191833Z:0005a221-b70e-4b82-8d66-725751149c61" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b9b51809-23ec-4e0b-8031-e037446de88c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"operationid2082\",\r\n \"properties\": {\r\n \"displayName\": \"patchedName5468\",\r\n \"method\": \"HEAD\",\r\n \"urlTemplate\": \"/newresource\",\r\n \"templateParameters\": [],\r\n \"description\": \"patchedDescription331\",\r\n \"request\": {\r\n \"description\": \"operationRequestDescription9632\",\r\n \"queryParameters\": [\r\n {\r\n \"name\": \"newOperationRequestParmName4765\",\r\n \"description\": \"newOperationRequestParamDescr990\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestParamDefaultValue6624\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestParamDefaultValue6624\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"headers\": [\r\n {\r\n \"name\": \"newOperationRequestHeaderParmName4650\",\r\n \"description\": \"newOperationRequestHeaderParamDescr7704\",\r\n \"type\": \"string\",\r\n \"defaultValue\": \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"required\": true,\r\n \"values\": [\r\n \"newOperationRequestHeaderParamDefaultValue2552\",\r\n \"1\",\r\n \"2\",\r\n \"3\"\r\n ]\r\n }\r\n ],\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationRequestRepresentationContentType8907\",\r\n \"sample\": \"newOperationRequestRepresentationSample7279\"\r\n }\r\n ]\r\n },\r\n \"responses\": [\r\n {\r\n \"statusCode\": 1980785443,\r\n \"description\": \"newOperationResponseDescription5050\",\r\n \"representations\": [\r\n {\r\n \"contentType\": \"newOperationResponseRepresentationContentType8695\",\r\n \"sample\": \"newOperationResponseRepresentationSample1493\"\r\n }\r\n ],\r\n \"headers\": []\r\n }\r\n ],\r\n \"policies\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD+A=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "91ffc1a7-437f-4705-be19-41c89c8c8758" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "35ff4cfa-35f7-4c90-b709-2b68cb8b7ac1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191834Z:35ff4cfa-35f7-4c90-b709-2b68cb8b7ac1" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "52afd753-e5af-460f-a36b-7d1d10323d28" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Operation not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "85" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f45db283-c754-4bc8-a0ec-e9f8ca0669f0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "561c27ff-e0b9-4e16-960e-3bb7f32c5223" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191835Z:561c27ff-e0b9-4e16-960e-3bb7f32c5223" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"patchedDescription331\",\r\n \"displayName\": \"patchedName5468\",\r\n \"method\": \"HEAD\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "134" + ], + "x-ms-client-request-id": [ + "1fc3da6a-529c-4f34-9ad5-6f0e57b1b87b" + ], + "If-Match": [ + "\"AAAAAAAAD98=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "146d63b3-fdfd-4a9f-a179-470ac6f80896" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "9d239f47-fddc-4708-8d1a-e06102df831d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191834Z:9d239f47-fddc-4708-8d1a-e06102df831d" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b2689322-ab0b-4f1e-8332-9edd1d50c79d" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2640d326-4f33-4350-b618-e24d1a2483db" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "61e0a073-02ef-4c32-9f3a-64ada3f4aaa3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191835Z:61e0a073-02ef-4c32-9f3a-64ada3f4aaa3" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/operationid2082?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvb3BlcmF0aW9uaWQyMDgyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ac0609b-6adf-4cbb-8c40-7ec1e33b6c4b" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "41e4ddf8-ff17-4cf1-9e03-eec96b09de1c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "698cb700-57f9-465a-b462-fbd5838aa884" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191835Z:698cb700-57f9-465a-b462-fbd5838aa884" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "operationid2082", + "operationName5974", + "operationDescription8663", + "operationRequestDescription9632", + "newOperationRequestHeaderParmName4650", + "newOperationRequestHeaderParamDescr7704", + "newOperationRequestHeaderParamDefaultValue2552", + "newOperationRequestParmName4765", + "newOperationRequestParamDescr990", + "newOperationRequestParamDefaultValue6624", + "newOperationRequestRepresentationContentType8907", + "newOperationRequestRepresentationSample7279", + "newOperationResponseDescription5050", + "newOperationResponseRepresentationContentType8695", + "newOperationResponseRepresentationSample1493", + "patchedName5468", + "patchedDescription331" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiProductTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiProductTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..b739230e3cc6 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiProductTests/CreateListUpdateDelete.json @@ -0,0 +1,394 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "675972b9-9c9a-426b-984a-5c3bc15a759f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "07f2cff4-f994-4b99-baa7-8c6befab1a8c", + "dff3986c-6c96-4339-88d8-7682ccb6d7da" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "7ce6d5c3-5c2f-4f9f-a2e6-8c541f646432" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191454Z:7ce6d5c3-5c2f-4f9f-a2e6-8c541f646432" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8c8e212b-c3b6-45c6-952f-7a2f36439a2b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "50ae8e6a-1a1c-4c4e-a2a8-0e31d4b5b121" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14963" + ], + "x-ms-correlation-request-id": [ + "84898482-dece-41b7-8591-f268cf1eba95" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191454Z:84898482-dece-41b7-8591-f268cf1eba95" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d8aa53f6-1b70-4aa4-a7d4-d4cd53307cf7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "52efa94f-32a7-4b94-a3b4-aa78cf02aa68" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "242f2a48-d24a-4605-90a5-4a188939909e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191455Z:242f2a48-d24a-4605-90a5-4a188939909e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/products?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3Byb2R1Y3RzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4c9d7dfc-4525-4c56-83c9-17c60a3dbd14" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/products\",\r\n \"name\": \"starter\",\r\n \"properties\": {\r\n \"displayName\": \"Starter\",\r\n \"description\": \"Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.\",\r\n \"terms\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": false,\r\n \"subscriptionsLimit\": 2147483647,\r\n \"state\": \"published\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/products\",\r\n \"name\": \"unlimited\",\r\n \"properties\": {\r\n \"displayName\": \"Unlimited\",\r\n \"description\": \"Subscribers have completely unlimited access to the API. Administrator approval is required.\",\r\n \"terms\": null,\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 1,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dc0f4c5b-b892-4009-9c6f-4d4b79b3ab70" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14961" + ], + "x-ms-correlation-request-id": [ + "3f3135d9-8537-4512-9123-394016b064db" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191455Z:3f3135d9-8537-4512-9123-394016b064db" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/products?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3Byb2R1Y3RzPyR0b3A9MSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "13de5d94-8dc4-4d7a-aa0e-6238264e4191" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/products\",\r\n \"name\": \"starter\",\r\n \"properties\": {\r\n \"displayName\": \"Starter\",\r\n \"description\": \"Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.\",\r\n \"terms\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": false,\r\n \"subscriptionsLimit\": 2147483647,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/products?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fcf5d10c-a4bc-421c-af44-08d22d9beb5d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14960" + ], + "x-ms-correlation-request-id": [ + "6c5842ac-aee9-4cef-bc6d-b1d3fa35f5e8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191455Z:6c5842ac-aee9-4cef-bc6d-b1d3fa35f5e8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/products?$skip=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3Byb2R1Y3RzPyRza2lwPTEmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bb746d97-7917-4ec1-baf7-19377292ea09" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/products\",\r\n \"name\": \"unlimited\",\r\n \"properties\": {\r\n \"displayName\": \"Unlimited\",\r\n \"description\": \"Subscribers have completely unlimited access to the API. Administrator approval is required.\",\r\n \"terms\": null,\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 1,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a694efa3-cb81-4aec-bd79-edf2bd594723" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14959" + ], + "x-ms-correlation-request-id": [ + "5c9c427d-899e-46e5-a11f-f8f756ae3224" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191455Z:5c9c427d-899e-46e5-a11f-f8f756ae3224" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..8d526bc52daa --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/CreateListUpdateDelete.json @@ -0,0 +1,971 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "9b9c61ad-0e34-4058-b398-1080fa7bdcbb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "11d8b7d9-b85c-487c-a433-a34093c82c0b", + "5722822f-6257-4392-8c2f-ee976837bb63" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "62f874e3-9014-4528-aafc-4a924ab3770f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191024Z:62f874e3-9014-4528-aafc-4a924ab3770f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4b3185b8-4a0f-45f7-aef0-0face473a095" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "95a81975-e9eb-4cdd-8185-caf624c5bb0c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "d734f239-2888-4244-b874-720130cce1b8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191024Z:d734f239-2888-4244-b874-720130cce1b8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c2a4ae34-c3a5-4044-8af9-889368f804fb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cd998eb4-5fbd-4610-92b9-4a8573f70810" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "0d05a290-2304-42e5-acda-28411e4ae950" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191025Z:0d05a290-2304-42e5-acda-28411e4ae950" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "50655484-3fdb-4ac1-924e-7b65fea0f148" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"Ocp-Apim-Subscription-Key\",\r\n \"query\": \"subscription-key\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD10=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4fba5e91-78bb-4c83-9885-5185a85fda02" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "3b887b20-39b4-4926-a4b4-7e340d96126c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191025Z:3b887b20-39b4-4926-a4b4-7e340d96126c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authorizationServerId3937?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRob3JpemF0aW9uU2VydmVySWQzOTM3P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"defaultScope\": \"oauth2scope1484\",\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"displayName\": \"authName2942\",\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"implicit\"\r\n ],\r\n \"clientId\": \"clientid7319\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "546" + ], + "x-ms-client-request-id": [ + "322b6d03-45cd-420a-bd1e-092689efcd9d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authorizationServerId3937\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationServers\",\r\n \"name\": \"authorizationServerId3937\",\r\n \"properties\": {\r\n \"displayName\": \"authName2942\",\r\n \"description\": null,\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"clientAuthenticationMethod\": null,\r\n \"tokenBodyParameters\": null,\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"supportState\": false,\r\n \"defaultScope\": \"oauth2scope1484\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"implicit\"\r\n ],\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"clientId\": \"clientid7319\",\r\n \"clientSecret\": null,\r\n \"resourceOwnerUsername\": null,\r\n \"resourceOwnerPassword\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1086" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD2c=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7cb34bae-e793-4add-85a3-41d7ab67325f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "6e153919-dd53-4293-b6a5-740ca5318bd7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191026Z:6e153919-dd53-4293-b6a5-740ca5318bd7" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"apidescription3876\",\r\n \"authenticationSettings\": {\r\n \"oAuth2\": {\r\n \"authorizationServerId\": \"authorizationServerId3937\",\r\n \"scope\": \"oauth2scope7548\"\r\n }\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"header9497\",\r\n \"query\": \"query8804\"\r\n },\r\n \"displayName\": \"apiname6068\",\r\n \"serviceUrl\": \"http://newechoapi.cloudapp.net/api\",\r\n \"path\": \"newapiPath\",\r\n \"protocols\": [\r\n \"https\",\r\n \"http\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "521" + ], + "x-ms-client-request-id": [ + "91b687a7-fb31-4122-99de-7da25a11e5d1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"apiid6938\",\r\n \"properties\": {\r\n \"displayName\": \"apiname6068\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"apidescription3876\",\r\n \"serviceUrl\": \"http://newechoapi.cloudapp.net/api\",\r\n \"path\": \"newapiPath\",\r\n \"protocols\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": {\r\n \"authorizationServerId\": \"authorizationServerId3937\",\r\n \"scope\": \"oauth2scope7548\"\r\n },\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"header9497\",\r\n \"query\": \"query8804\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "841" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD2g=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "22ef358b-213c-47df-9b4c-5aca1ccafde2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "e2bb103a-8976-42e8-82c8-bc93b3eca9f9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191028Z:e2bb103a-8976-42e8-82c8-bc93b3eca9f9" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ceca7729-39c0-426d-a46e-9022046e8f46" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"apiid6938\",\r\n \"properties\": {\r\n \"displayName\": \"apiname6068\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"apidescription3876\",\r\n \"serviceUrl\": \"http://newechoapi.cloudapp.net/api\",\r\n \"path\": \"newapiPath\",\r\n \"protocols\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": {\r\n \"authorizationServerId\": \"authorizationServerId3937\",\r\n \"scope\": \"oauth2scope7548\"\r\n },\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"header9497\",\r\n \"query\": \"query8804\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD2g=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6ca3bb1f-0355-40d5-8298-d6ee99421186" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "d267073c-f995-4151-ae49-d82754388d79" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191028Z:d267073c-f995-4151-ae49-d82754388d79" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d7dfba96-b1be-4c23-88c1-c3d3950e1c30" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"apiid6938\",\r\n \"properties\": {\r\n \"displayName\": \"patchedname2460\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"patchedDescription9761\",\r\n \"serviceUrl\": \"http://newechoapi.cloudapp.net/api\",\r\n \"path\": \"patchedPath6461\",\r\n \"protocols\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"header9497\",\r\n \"query\": \"query8804\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD2o=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c0a65d62-1320-40ec-8e4a-f3d88230dfc4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "46ee555c-bd8f-44a0-9db8-73b120bc79b8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191030Z:46ee555c-bd8f-44a0-9db8-73b120bc79b8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e945d45f-5f5f-4a08-8457-b5e5890ab4cd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Api not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "79" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eb82e52d-4477-4e42-8176-a7b2e04dc7e3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "26442218-3b60-40e9-bd9e-5d6d07e72b6d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191032Z:26442218-3b60-40e9-bd9e-5d6d07e72b6d" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"patchedDescription9761\",\r\n \"authenticationSettings\": {},\r\n \"displayName\": \"patchedname2460\",\r\n \"path\": \"patchedPath6461\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "179" + ], + "x-ms-client-request-id": [ + "b3565b93-d2e9-4462-a7ba-2aebc3d7a55b" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c98f0a70-31ea-4dbd-b7d0-6217002306bc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "8034fa41-4055-4631-925d-d5999ae639ba" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191030Z:8034fa41-4055-4631-925d-d5999ae639ba" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzPyR0b3A9MSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ab0cbac9-3887-4608-8411-69d79b4396bf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c3d88164-02b1-4fe9-9db6-7ce30188764e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "48da9999-6818-4261-8027-3a0fb997de48" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191031Z:48da9999-6818-4261-8027-3a0fb997de48" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?%24top=1&api-version=2017-03-01&%24skip=1", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzPyUyNHRvcD0xJmFwaS12ZXJzaW9uPTIwMTctMDMtMDEmJTI0c2tpcD0x", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "76f0ea04-9d87-4278-b293-e9c2f1b16849" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"apiid6938\",\r\n \"properties\": {\r\n \"displayName\": \"patchedname2460\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"patchedDescription9761\",\r\n \"serviceUrl\": \"http://newechoapi.cloudapp.net/api\",\r\n \"path\": \"patchedPath6461\",\r\n \"protocols\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "afe14ea5-ff55-4dda-825f-a57e1f274bd3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "2ab7f3e5-6b9d-4442-9e09-1f9c5e81f2ac" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191031Z:2ab7f3e5-6b9d-4442-9e09-1f9c5e81f2ac" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "392fd362-7474-44ae-9048-7d4c3d32e4d9" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a65cdc61-0893-4c67-9ade-a7d8e0b43e00" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "f8e2a712-bb53-4604-b2af-5e452a4ca8ac" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191032Z:f8e2a712-bb53-4604-b2af-5e452a4ca8ac" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/apiid6938?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FwaWlkNjkzOD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "856bd1a7-3f28-4df0-a0dd-dc902877cabc" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b87cffdd-f2bf-4234-a6f0-5d6ed8387c68" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "7a6976a0-2db4-4fee-b065-22c417386b12" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191032Z:7a6976a0-2db4-4fee-b065-22c417386b12" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authorizationServerId3937?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRob3JpemF0aW9uU2VydmVySWQzOTM3P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7484f4de-092a-4a2f-abec-1317376cd0c0" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f097e13b-ebd6-458d-8f60-12dfc7e46399" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "01f30488-1f6e-437e-9c5f-21621cf5189c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191033Z:01f30488-1f6e-437e-9c5f-21621cf5189c" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "authorizationServerId3937", + "apiid6938", + "authName2942", + "oauth2scope1484", + "clientid7319", + "apiname6068", + "apidescription3876", + "header9497", + "query8804", + "oauth2scope7548", + "patchedname2460", + "patchedDescription9761", + "patchedPath6461" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromSwaggerDocument.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromSwaggerDocument.json new file mode 100644 index 000000000000..d3dcaeb8d898 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromSwaggerDocument.json @@ -0,0 +1,343 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "bbbb4ba5-8a40-4dfc-b2fb-d10744c3f2ea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "289dba35-82ac-406b-8e47-0b20829cb5ba", + "fe42680b-2a4f-4418-9ebe-d96ad6513586" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "76a9d9ec-a360-4377-888a-04591298770b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191050Z:76a9d9ec-a360-4377-888a-04591298770b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3fce9581-3a54-4ddc-9ab0-1cc433e5ccf3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "944823d7-a0f3-45b6-8076-29de94e2873c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "ea1dd2ae-7166-4e88-bdcd-606b89bf8c16" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191050Z:ea1dd2ae-7166-4e88-bdcd-606b89bf8c16" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid8570?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FpZDg1NzA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"path\": \"swaggerApi\",\r\n \"contentValue\": \"{\\r\\n \\\"x-comment\\\": \\\"This file was extended from /github.com/swagger-api/swagger-spec/blob/master/examples/v2.0/json/petstore-with-external-docs.json\\\",\\r\\n \\\"swagger\\\": \\\"2.0\\\",\\r\\n \\\"info\\\": {\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"title\\\": \\\"Swagger Petstore Extensive\\\",\\r\\n \\\"description\\\": \\\"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\\\",\\r\\n \\\"termsOfService\\\": \\\"http://helloreverb.com/terms/\\\",\\r\\n \\\"contact\\\": {\\r\\n \\\"name\\\": \\\"Wordnik API Team\\\",\\r\\n \\\"email\\\": \\\"foo@example.com\\\",\\r\\n \\\"url\\\": \\\"http://madskristensen.net\\\"\\r\\n },\\r\\n \\\"license\\\": {\\r\\n \\\"name\\\": \\\"MIT\\\",\\r\\n \\\"url\\\": \\\"http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\\\"\\r\\n }\\r\\n },\\r\\n \\\"externalDocs\\\": {\\r\\n \\\"description\\\": \\\"find more info here\\\",\\r\\n \\\"url\\\": \\\"https://helloreverb.com/about\\\"\\r\\n },\\r\\n \\\"host\\\": \\\"petstore.swagger.wordnik.com\\\",\\r\\n \\\"basePath\\\": \\\"/api\\\",\\r\\n \\\"schemes\\\": [\\r\\n \\\"http\\\"\\r\\n ],\\r\\n \\\"consumes\\\": [\\r\\n \\\"application/json\\\"\\r\\n ],\\r\\n \\\"produces\\\": [\\r\\n \\\"application/json\\\"\\r\\n ],\\r\\n \\\"paths\\\": {\\r\\n \\\"/mySamplePath?willbeignored={willbeignored}\\\": {\\r\\n \\\"post\\\": {\\r\\n \\\"description\\\": \\\"Dummy desc\\\",\\r\\n \\\"operationId\\\": \\\"dummyid1\\\",\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"dummyDateHeaderParam\\\",\\r\\n \\\"in\\\": \\\"header\\\",\\r\\n \\\"description\\\": \\\"dummyDateHeaderParam description\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"string\\\",\\r\\n \\\"format\\\": \\\"date\\\"\\r\\n },\\r\\n {\\r\\n \\\"name\\\": \\\"dummyReqQueryParam\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"dummyReqQueryParam description\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n },\\r\\n {\\r\\n \\\"name\\\": \\\"dummyNotReqQueryParam\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"dummyNotReqQueryParam description\\\",\\r\\n \\\"required\\\": false,\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n },\\r\\n {\\r\\n \\\"name\\\": \\\"dummyBodyParam\\\",\\r\\n \\\"in\\\": \\\"body\\\",\\r\\n \\\"description\\\": \\\"dummyBodyParam description\\\",\\r\\n \\\"required\\\": false,\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\",\\r\\n \\\"example\\\": {\\r\\n \\\"id\\\": 2,\\r\\n \\\"name\\\": \\\"myreqpet\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"200\\\": {\\r\\n \\\"description\\\": \\\"pet response\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"type\\\": \\\"array\\\",\\r\\n \\\"items\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\"\\r\\n }\\r\\n },\\r\\n \\\"headers\\\": {\\r\\n \\\"header1\\\": {\\r\\n \\\"description\\\": \\\"sampleheader\\\",\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int64\\\"\\r\\n }\\r\\n },\\r\\n \\\"examples\\\": {\\r\\n \\\"application/json\\\": {\\r\\n \\\"id\\\": 3,\\r\\n \\\"name\\\": \\\"myresppet\\\" \\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"default\\\": {\\r\\n \\\"description\\\": \\\"unexpected error\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/errorModel\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"/resourceWithFormData\\\": {\\r\\n \\\"post\\\": {\\r\\n \\\"description\\\": \\\"resourceWithFormData desc\\\",\\r\\n \\\"operationId\\\": \\\"resourceWithFormDataPOST\\\",\\r\\n \\\"consumes\\\": [ \\\"multipart/form-data\\\" ],\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"dummyFormDataParam\\\",\\r\\n \\\"in\\\": \\\"formData\\\",\\r\\n \\\"description\\\": \\\"dummyFormDataParam description\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n },\\r\\n {\\r\\n \\\"name\\\": \\\"dummyReqQueryParam\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"dummyReqQueryParam description\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"200\\\": {\\r\\n \\\"description\\\": \\\"sample response\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"/mySamplePath2?definedQueryParam={definedQueryParam}\\\": {\\r\\n \\\"post\\\": {\\r\\n \\\"produces\\\": [\\r\\n \\\"contenttype1\\\",\\r\\n \\\"application/xml\\\"\\r\\n ],\\r\\n \\\"description\\\": \\\"Dummy desc\\\",\\r\\n \\\"operationId\\\": \\\"dummyid2\\\",\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"$ref\\\": \\\"#/parameters/dummyQueryParameterDef\\\"\\r\\n },\\r\\n {\\r\\n \\\"$ref\\\": \\\"#/parameters/dummyBodyParameterDef\\\"\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"204\\\": {\\r\\n \\\"$ref\\\": \\\"#/responses/dummyResponseDef\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"/pets2?dummyParam={dummyParam}\\\": {\\r\\n \\\"get\\\": {\\r\\n \\\"description\\\": \\\"Dummy description\\\",\\r\\n \\\"operationId\\\": \\\"dummyOperationId\\\",\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"dummyParam\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"dummyParam desc\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"string\\\",\\r\\n \\\"collectionFormat\\\": \\\"csv\\\"\\r\\n },\\r\\n {\\r\\n \\\"name\\\": \\\"limit\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"maximum number of results to return\\\",\\r\\n \\\"required\\\": false,\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int32\\\"\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"200\\\": {\\r\\n \\\"description\\\": \\\"pet response\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"type\\\": \\\"array\\\",\\r\\n \\\"items\\\": {\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"default\\\": {\\r\\n \\\"description\\\": \\\"unexpected error\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/errorModel\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"/pets\\\": {\\r\\n \\\"get\\\": {\\r\\n \\\"description\\\": \\\"Returns all pets from the system that the user has access to\\\",\\r\\n \\\"operationId\\\": \\\"findPets\\\",\\r\\n \\\"externalDocs\\\": {\\r\\n \\\"description\\\": \\\"find more info here\\\",\\r\\n \\\"url\\\": \\\"https://helloreverb.com/about\\\"\\r\\n },\\r\\n \\\"produces\\\": [\\r\\n \\\"application/json\\\",\\r\\n \\\"application/xml\\\"\\r\\n ],\\r\\n \\\"consumes\\\": [\\r\\n \\\"text/xml\\\",\\r\\n \\\"text/html\\\"\\r\\n ],\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"tags\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"tags to filter by\\\",\\r\\n \\\"required\\\": false,\\r\\n \\\"type\\\": \\\"string\\\",\\r\\n \\\"collectionFormat\\\": \\\"csv\\\"\\r\\n },\\r\\n {\\r\\n \\\"name\\\": \\\"limit\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"maximum number of results to return\\\",\\r\\n \\\"required\\\": false,\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int32\\\"\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"200\\\": {\\r\\n \\\"description\\\": \\\"pet response\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"type\\\": \\\"array\\\",\\r\\n \\\"items\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\"\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"default\\\": {\\r\\n \\\"description\\\": \\\"unexpected error\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/errorModel\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"post\\\": {\\r\\n \\\"description\\\": \\\"Creates a new pet in the store. Duplicates are allowed\\\",\\r\\n \\\"operationId\\\": \\\"addPet\\\",\\r\\n \\\"produces\\\": [\\r\\n \\\"application/json\\\"\\r\\n ],\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"pet\\\",\\r\\n \\\"in\\\": \\\"body\\\",\\r\\n \\\"description\\\": \\\"Pet to add to the store\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/newPet\\\"\\r\\n }\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"200\\\": {\\r\\n \\\"description\\\": \\\"pet response\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\"\\r\\n }\\r\\n },\\r\\n \\\"default\\\": {\\r\\n \\\"description\\\": \\\"unexpected error\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/errorModel\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"/pets/{id}\\\": {\\r\\n \\\"get\\\": {\\r\\n \\\"description\\\": \\\"Returns a user based on a single ID, if the user does not have access to the pet\\\",\\r\\n \\\"operationId\\\": \\\"findPetById\\\",\\r\\n \\\"produces\\\": [\\r\\n \\\"application/json\\\",\\r\\n \\\"application/xml\\\",\\r\\n \\\"text/xml\\\",\\r\\n \\\"text/html\\\"\\r\\n ],\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"id\\\",\\r\\n \\\"in\\\": \\\"path\\\",\\r\\n \\\"description\\\": \\\"ID of pet to fetch\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int64\\\"\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"200\\\": {\\r\\n \\\"description\\\": \\\"pet response\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\"\\r\\n }\\r\\n },\\r\\n \\\"default\\\": {\\r\\n \\\"description\\\": \\\"unexpected error\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/errorModel\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"delete\\\": {\\r\\n \\\"description\\\": \\\"deletes a single pet based on the ID supplied\\\",\\r\\n \\\"operationId\\\": \\\"deletePet\\\",\\r\\n \\\"parameters\\\": [\\r\\n {\\r\\n \\\"name\\\": \\\"id\\\",\\r\\n \\\"in\\\": \\\"path\\\",\\r\\n \\\"description\\\": \\\"ID of pet to delete\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int64\\\"\\r\\n }\\r\\n ],\\r\\n \\\"responses\\\": {\\r\\n \\\"204\\\": {\\r\\n \\\"description\\\": \\\"pet deleted\\\"\\r\\n },\\r\\n \\\"default\\\": {\\r\\n \\\"description\\\": \\\"unexpected error\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/errorModel\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"definitions\\\": {\\r\\n \\\"pet\\\": {\\r\\n \\\"required\\\": [\\r\\n \\\"id\\\",\\r\\n \\\"name\\\"\\r\\n ],\\r\\n \\\"externalDocs\\\": {\\r\\n \\\"description\\\": \\\"find more info here\\\",\\r\\n \\\"url\\\": \\\"https://helloreverb.com/about\\\"\\r\\n },\\r\\n \\\"properties\\\": {\\r\\n \\\"id\\\": {\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int64\\\"\\r\\n },\\r\\n \\\"name\\\": {\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n },\\r\\n \\\"tag\\\": {\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"newPet\\\": {\\r\\n \\\"allOf\\\": [\\r\\n {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\"\\r\\n },\\r\\n {\\r\\n \\\"required\\\": [\\r\\n \\\"name\\\"\\r\\n ],\\r\\n \\\"properties\\\": {\\r\\n \\\"id\\\": {\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int64\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n ]\\r\\n },\\r\\n \\\"errorModel\\\": {\\r\\n \\\"required\\\": [\\r\\n \\\"code\\\",\\r\\n \\\"message\\\"\\r\\n ],\\r\\n \\\"properties\\\": {\\r\\n \\\"code\\\": {\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"format\\\": \\\"int32\\\"\\r\\n },\\r\\n \\\"message\\\": {\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n \\\"parameters\\\": {\\r\\n \\\"dummyBodyParameterDef\\\": {\\r\\n \\\"name\\\": \\\"definedBodyParam\\\",\\r\\n \\\"in\\\": \\\"body\\\",\\r\\n \\\"description\\\": \\\"definedBodyParam description\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"schema\\\": {\\r\\n \\\"title\\\": \\\"Example Schema\\\",\\r\\n \\\"type\\\": \\\"object\\\",\\r\\n \\\"properties\\\": {\\r\\n \\\"firstName\\\": {\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n },\\r\\n \\\"lastName\\\": {\\r\\n \\\"type\\\": \\\"string\\\"\\r\\n },\\r\\n \\\"age\\\": {\\r\\n \\\"description\\\": \\\"Age in years\\\",\\r\\n \\\"type\\\": \\\"integer\\\",\\r\\n \\\"minimum\\\": 0\\r\\n }\\r\\n },\\r\\n \\\"required\\\": [ \\\"firstName\\\", \\\"lastName\\\" ]\\r\\n }\\r\\n },\\r\\n \\\"dummyQueryParameterDef\\\": {\\r\\n \\\"name\\\": \\\"definedQueryParam\\\",\\r\\n \\\"in\\\": \\\"query\\\",\\r\\n \\\"description\\\": \\\"definedQueryParam description\\\",\\r\\n \\\"required\\\": true,\\r\\n \\\"type\\\": \\\"string\\\",\\r\\n \\\"format\\\": \\\"whateverformat\\\"\\r\\n }\\r\\n },\\r\\n \\\"responses\\\": {\\r\\n \\\"dummyResponseDef\\\": {\\r\\n \\\"description\\\": \\\"dummyResponseDef description\\\",\\r\\n \\\"schema\\\": {\\r\\n \\\"$ref\\\": \\\"#/definitions/pet\\\"\\r\\n },\\r\\n \\\"headers\\\": {\\r\\n \\\"header1\\\": {\\r\\n \\\"type\\\": \\\"integer\\\"\\r\\n },\\r\\n \\\"header2\\\": {\\r\\n \\\"type\\\": \\\"integer\\\"\\r\\n }\\r\\n },\\r\\n \\\"examples\\\": {\\r\\n \\\"contenttype1\\\": \\\"contenttype1 example\\\",\\r\\n \\\"contenttype2\\\": \\\"contenttype2 example\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\n\",\r\n \"contentFormat\": \"swagger-json\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "18238" + ], + "x-ms-client-request-id": [ + "c0659a90-b82d-43ce-a23c-253b02e931d1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid8570\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"aid8570\",\r\n \"properties\": {\r\n \"displayName\": \"Swagger Petstore Extensive\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\r\n \"serviceUrl\": \"http://petstore.swagger.wordnik.com/api\",\r\n \"path\": \"swaggerApi\",\r\n \"protocols\": [\r\n \"http\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"Ocp-Apim-Subscription-Key\",\r\n \"query\": \"subscription-key\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "844" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD3I=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ac264ad4-bb7f-4cda-8a78-46d9f66ffc99" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "9eacf0a1-0177-4939-b507-6a4f0566709c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191052Z:9eacf0a1-0177-4939-b507-6a4f0566709c" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid8570?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FpZDg1NzA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4d46fb29-e6f7-4865-a84d-711407c5cfed" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid8570\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"aid8570\",\r\n \"properties\": {\r\n \"displayName\": \"Swagger Petstore Extensive\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification\",\r\n \"serviceUrl\": \"http://petstore.swagger.wordnik.com/api\",\r\n \"path\": \"swaggerApi\",\r\n \"protocols\": [\r\n \"http\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"Ocp-Apim-Subscription-Key\",\r\n \"query\": \"subscription-key\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD3I=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8bae78ec-2243-400f-b409-2a14cd88c2d7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "c8563fa6-ee60-4a1c-9810-33cc8103671f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191053Z:c8563fa6-ee60-4a1c-9810-33cc8103671f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid8570?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FpZDg1NzA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6df6f658-120b-4d1f-a73a-d18039159957" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8cc9df8e-01a4-4432-99d0-8302b41bd97d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "815b1c30-b823-49e1-bb95-205762148f0b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191053Z:815b1c30-b823-49e1-bb95-205762148f0b" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "ImportFromSwaggerDocument": [ + "aid8570" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromWadlDocument.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromWadlDocument.json new file mode 100644 index 000000000000..f25d5d1815f0 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ApiTests/ImportFromWadlDocument.json @@ -0,0 +1,343 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "8a5e52f1-d231-444a-a109-18d146a906df" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dcd37e3c-8fda-4f71-ae57-1a7d1294419c", + "a7d1b105-6043-4522-9cd2-f34c2cc61b84" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "a0ea7188-f6b7-4d0a-a26e-62420f866bbf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191040Z:a0ea7188-f6b7-4d0a-a26e-62420f866bbf" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "582e8757-ee16-486f-a972-3dcc91ca724f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b7ed6bbc-236a-4c28-b619-8dc0c54356ef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "c8b3c141-b561-4721-ba66-1399922d8b03" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191040Z:c8b3c141-b561-4721-ba66-1399922d8b03" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid4660?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FpZDQ2NjA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"path\": \"yahooWadl\",\r\n \"contentValue\": \"\\r\\n\\r\\n Yahoo News Search API\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\",\r\n \"contentFormat\": \"wadl-xml\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "4325" + ], + "x-ms-client-request-id": [ + "ce3addb5-119a-4dad-9341-10580411733f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid4660\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"aid4660\",\r\n \"properties\": {\r\n \"displayName\": \"Yahoo News Search\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"Yahoo News Search API\",\r\n \"serviceUrl\": \"http://api.search.yahoo.com/NewsSearchService/V1/\",\r\n \"path\": \"yahooWadl\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"Ocp-Apim-Subscription-Key\",\r\n \"query\": \"subscription-key\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "762" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD24=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9413af0a-c8d1-4507-af14-5750a3007787" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "c0c8e097-c704-4783-8c0d-552c0932d996" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191043Z:c0c8e097-c704-4783-8c0d-552c0932d996" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid4660?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FpZDQ2NjA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "463f320f-a793-4a47-b499-7e6b68897290" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid4660\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"aid4660\",\r\n \"properties\": {\r\n \"displayName\": \"Yahoo News Search\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"Yahoo News Search API\",\r\n \"serviceUrl\": \"http://api.search.yahoo.com/NewsSearchService/V1/\",\r\n \"path\": \"yahooWadl\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"Ocp-Apim-Subscription-Key\",\r\n \"query\": \"subscription-key\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD24=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6265a89e-b711-4b9b-9cf1-8bbb1596253d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "8359915a-8335-4f1a-8030-3e606d775a00" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191043Z:8359915a-8335-4f1a-8030-3e606d775a00" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/aid4660?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2FpZDQ2NjA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a753f85d-e7f9-4b05-a1f4-74fbb386fdfd" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "41e85ad2-211e-4b39-b689-2817db7767e3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7e97d9e5-3b53-427f-a02a-820c11b3b5b2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191043Z:7e97d9e5-3b53-427f-a02a-820c11b3b5b2" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "ImportFromWadlDocument": [ + "aid4660" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.AuthorizationServerTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.AuthorizationServerTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..8ccefdc09050 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.AuthorizationServerTests/CreateListUpdateDelete.json @@ -0,0 +1,718 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "683f84ba-8e8d-4c89-8995-3f6bcd874c1e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fe134c8b-9598-4e05-a692-96a7e900657d", + "7234927c-f9c0-4601-bc50-b5b43e7264e9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "1e23fed5-0d5b-419b-951f-cfefb32d163a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191128Z:1e23fed5-0d5b-419b-951f-cfefb32d163a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b318052c-f577-4d52-820f-1d21d89fb254" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8909cde5-5c8d-471d-bd47-2b1338cb969b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "6ccfe626-4b05-4397-9f57-67ec2c6a2249" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191128Z:6ccfe626-4b05-4397-9f57-67ec2c6a2249" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b8a4e1a9-877f-4662-be69-a309c8e904ee" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8bc4a514-99b2-48ee-9b91-d18afb423a48" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "7f4c38ae-47bd-4ff1-a299-2fbc56952bdc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191129Z:7f4c38ae-47bd-4ff1-a299-2fbc56952bdc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dff39b98-1888-43d6-9647-bd685e2428a4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationServers\",\r\n \"name\": \"authsid5862\",\r\n \"properties\": {\r\n \"displayName\": \"authName9163\",\r\n \"description\": \"authdescription1684\",\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"clientAuthenticationMethod\": [\r\n \"Basic\"\r\n ],\r\n \"tokenBodyParameters\": [\r\n {\r\n \"name\": \"tokenname350\",\r\n \"value\": \"tokenvalue8541\"\r\n }\r\n ],\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"supportState\": true,\r\n \"defaultScope\": \"oauth2scope5724\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"implicit\",\r\n \"resourceOwnerPassword\"\r\n ],\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"clientId\": \"clientid2882\",\r\n \"clientSecret\": \"authclientsecret8192\",\r\n \"resourceOwnerUsername\": \"authresourceownerusername6029\",\r\n \"resourceOwnerPassword\": \"authresourceownerpwd2951\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d759aabf-59fb-4a00-874f-1b4a0d12f457" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "18fd72db-922d-4a77-891d-391b2e0b7f82" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191130Z:18fd72db-922d-4a77-891d-391b2e0b7f82" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"authdescription1684\",\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"clientAuthenticationMethod\": [\r\n \"Basic\"\r\n ],\r\n \"tokenBodyParameters\": [\r\n {\r\n \"name\": \"tokenname350\",\r\n \"value\": \"tokenvalue8541\"\r\n }\r\n ],\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"supportState\": true,\r\n \"defaultScope\": \"oauth2scope5724\",\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"clientSecret\": \"authclientsecret8192\",\r\n \"resourceOwnerUsername\": \"authresourceownerusername6029\",\r\n \"resourceOwnerPassword\": \"authresourceownerpwd2951\",\r\n \"displayName\": \"authName9163\",\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"implicit\",\r\n \"resourceOwnerPassword\"\r\n ],\r\n \"clientId\": \"clientid2882\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "998" + ], + "x-ms-client-request-id": [ + "ae98386d-219b-4dc8-91ea-6c50ec1611ea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationServers\",\r\n \"name\": \"authsid5862\",\r\n \"properties\": {\r\n \"displayName\": \"authName9163\",\r\n \"description\": \"authdescription1684\",\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"clientAuthenticationMethod\": [\r\n \"Basic\"\r\n ],\r\n \"tokenBodyParameters\": [\r\n {\r\n \"name\": \"tokenname350\",\r\n \"value\": \"tokenvalue8541\"\r\n }\r\n ],\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"supportState\": true,\r\n \"defaultScope\": \"oauth2scope5724\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"implicit\",\r\n \"resourceOwnerPassword\"\r\n ],\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"clientId\": \"clientid2882\",\r\n \"clientSecret\": \"authclientsecret8192\",\r\n \"resourceOwnerUsername\": \"authresourceownerusername6029\",\r\n \"resourceOwnerPassword\": \"authresourceownerpwd2951\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1282" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD5Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2ab3c28c-ec8e-4c63-b527-6daaca43e1df" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "2fbb4221-f8ed-42c2-bcc9-4ab8d5afa496" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191129Z:2fbb4221-f8ed-42c2-bcc9-4ab8d5afa496" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bab15bc0-df7a-4f06-a678-f80d700ee0a3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationServers\",\r\n \"name\": \"authsid5862\",\r\n \"properties\": {\r\n \"displayName\": \"authName9163\",\r\n \"description\": \"authdescription1684\",\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"clientAuthenticationMethod\": [\r\n \"Basic\"\r\n ],\r\n \"tokenBodyParameters\": [\r\n {\r\n \"name\": \"tokenname350\",\r\n \"value\": \"tokenvalue8541\"\r\n }\r\n ],\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"supportState\": true,\r\n \"defaultScope\": \"oauth2scope5724\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"implicit\",\r\n \"resourceOwnerPassword\"\r\n ],\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"clientId\": \"clientid2882\",\r\n \"clientSecret\": \"authclientsecret8192\",\r\n \"resourceOwnerUsername\": \"authresourceownerusername6029\",\r\n \"resourceOwnerPassword\": \"authresourceownerpwd2951\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD5Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b2eb29f0-6999-46ba-8c45-6068e64db219" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "dc2b1274-87f6-4317-baf4-4b9e1d2bceb9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191129Z:dc2b1274-87f6-4317-baf4-4b9e1d2bceb9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1321a196-aa1b-4c21-a404-0545b006e5b2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationServers\",\r\n \"name\": \"authsid5862\",\r\n \"properties\": {\r\n \"displayName\": \"authName9163\",\r\n \"description\": \"authdescription1684\",\r\n \"clientRegistrationEndpoint\": \"https://contoso.com/clients/reg\",\r\n \"authorizationEndpoint\": \"https://contoso.com/auth\",\r\n \"authorizationMethods\": [\r\n \"POST\",\r\n \"GET\"\r\n ],\r\n \"clientAuthenticationMethod\": [\r\n \"Basic\"\r\n ],\r\n \"tokenBodyParameters\": [\r\n {\r\n \"name\": \"tokenname350\",\r\n \"value\": \"tokenvalue8541\"\r\n }\r\n ],\r\n \"tokenEndpoint\": \"https://contoso.com/token\",\r\n \"supportState\": true,\r\n \"defaultScope\": \"oauth2scope5724\",\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"resourceOwnerPassword\"\r\n ],\r\n \"bearerTokenSendingMethods\": [\r\n \"authorizationHeader\",\r\n \"query\"\r\n ],\r\n \"clientId\": \"clientid2882\",\r\n \"clientSecret\": \"authclientsecret8192\",\r\n \"resourceOwnerUsername\": \"authresourceownerusername6029\",\r\n \"resourceOwnerPassword\": \"authresourceownerpwd2951\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD5c=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8db610aa-0fa3-4aba-a2de-578d346874ed" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "e6241bc4-9892-4746-8c34-d33feecd1164" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191130Z:e6241bc4-9892-4746-8c34-d33feecd1164" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ac0bdf76-13eb-4aa5-8b0e-2d8f6af8cd26" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"OAuth2AuthorizationServer not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "101" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0a79fbe4-2386-4b15-9796-16c6c4fa3617" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "2269d04d-0fa0-49ee-aa4e-3c44e78bd4d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191130Z:2269d04d-0fa0-49ee-aa4e-3c44e78bd4d2" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"grantTypes\": [\r\n \"authorizationCode\",\r\n \"resourceOwnerPassword\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "115" + ], + "x-ms-client-request-id": [ + "27b1802a-5fe2-4d35-a676-e43bb23cee2a" + ], + "If-Match": [ + "\"AAAAAAAAD5Y=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "15b8e947-8fa5-43de-8f45-a1a4b234e4cc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "1a38998a-5394-4d11-85cf-d74f0a997142" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191130Z:1a38998a-5394-4d11-85cf-d74f0a997142" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "88dd923b-abaa-46dc-8827-7769844736a9" + ], + "If-Match": [ + "\"AAAAAAAAD5c=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bb5b0129-5bfc-4559-84b4-cae9a2733a30" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "a7b4171d-52f6-4030-9be8-8b6216820864" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191130Z:a7b4171d-52f6-4030-9be8-8b6216820864" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/authorizationServers/authsid5862?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hdXRob3JpemF0aW9uU2VydmVycy9hdXRoc2lkNTg2Mj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6e61ea27-f78a-4a3f-88fc-53b46f40e753" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "97ae8458-9892-4b1d-946c-9d45c5854884" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "5fee5e7a-73a9-4cd6-ac7b-b77d1a4676b3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191131Z:5fee5e7a-73a9-4cd6-ac7b-b77d1a4676b3" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "authsid5862", + "authName9163", + "oauth2scope5724", + "clientid2882", + "authdescription1684", + "authclientsecret8192", + "authresourceownerpwd2951", + "authresourceownerusername6029", + "tokenname350", + "tokenvalue8541" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..d0ac941c4e39 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/CreateListUpdateDelete.json @@ -0,0 +1,651 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "ef9acc90-853a-46b2-9493-436aa7661376" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "31641f51-1ab5-4c07-b0ef-e59ff717ecda", + "494dd76b-6e8a-43b8-a086-7b67799b7319" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "8012f82f-6fc9-4116-ba78-37fba1b6e89e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191729Z:8012f82f-6fc9-4116-ba78-37fba1b6e89e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ee5491ba-ee76-4470-b0b6-9d47adb61cc6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b5f20a4c-0ab7-44e1-b10f-503d6a5c77e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "c2629511-acab-4964-b078-cd745e1daed5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191729Z:c2629511-acab-4964-b078-cd745e1daed5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"description731\",\r\n \"credentials\": {\r\n \"query\": {\r\n \"sv\": [\r\n \"xx\",\r\n \"bb\",\r\n \"cc\"\r\n ]\r\n },\r\n \"header\": {\r\n \"x-my-1\": [\r\n \"val1\",\r\n \"val2\"\r\n ]\r\n },\r\n \"authorization\": {\r\n \"scheme\": \"basic\",\r\n \"parameter\": \"opensemame\"\r\n }\r\n },\r\n \"tls\": {\r\n \"validateCertificateChain\": true,\r\n \"validateCertificateName\": true\r\n },\r\n \"url\": \"https://backendname9562/\",\r\n \"protocol\": \"http\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "564" + ], + "x-ms-client-request-id": [ + "7d4fa18a-960d-47c9-a888-d85f508446fa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"backendid5332\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"description731\",\r\n \"url\": \"https://backendname9562/\",\r\n \"protocol\": \"http\",\r\n \"credentials\": {\r\n \"query\": {\r\n \"sv\": [\r\n \"xx\",\r\n \"bb\",\r\n \"cc\"\r\n ]\r\n },\r\n \"header\": {\r\n \"x-my-1\": [\r\n \"val1\",\r\n \"val2\"\r\n ]\r\n },\r\n \"authorization\": {\r\n \"scheme\": \"basic\",\r\n \"parameter\": \"opensemame\"\r\n }\r\n },\r\n \"tls\": {\r\n \"validateCertificateChain\": true,\r\n \"validateCertificateName\": true\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "848" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD8c=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0ad26661-a289-4a4e-a38f-4733aeb197e5" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "30a8c50f-1123-48c4-af55-087477a2c222" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191730Z:30a8c50f-1123-48c4-af55-087477a2c222" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9026d4ac-a670-4b0e-ab61-a5da8c02806b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"backendid5332\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"description731\",\r\n \"url\": \"https://backendname9562/\",\r\n \"protocol\": \"http\",\r\n \"credentials\": {\r\n \"query\": {\r\n \"sv\": [\r\n \"xx\",\r\n \"bb\",\r\n \"cc\"\r\n ]\r\n },\r\n \"header\": {\r\n \"x-my-1\": [\r\n \"val1\",\r\n \"val2\"\r\n ]\r\n },\r\n \"authorization\": {\r\n \"scheme\": \"basic\",\r\n \"parameter\": \"opensemame\"\r\n }\r\n },\r\n \"tls\": {\r\n \"validateCertificateChain\": true,\r\n \"validateCertificateName\": true\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8c=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "857c4dfe-558e-4bac-abaa-a30f92749efb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "d167f428-d4e5-4388-ac2e-7839d27507ca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191730Z:d167f428-d4e5-4388-ac2e-7839d27507ca" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "68b76602-d826-4508-8c29-f75eb5cf4272" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"backendid5332\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"patchedDescription1012\",\r\n \"url\": \"https://backendname9562/\",\r\n \"protocol\": \"http\",\r\n \"credentials\": {\r\n \"query\": {\r\n \"sv\": [\r\n \"xx\",\r\n \"bb\",\r\n \"cc\"\r\n ]\r\n },\r\n \"header\": {\r\n \"x-my-1\": [\r\n \"val1\",\r\n \"val2\"\r\n ]\r\n },\r\n \"authorization\": {\r\n \"scheme\": \"basic\",\r\n \"parameter\": \"opensemame\"\r\n }\r\n },\r\n \"tls\": {\r\n \"validateCertificateChain\": true,\r\n \"validateCertificateName\": true\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8g=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e001d8fc-6c2e-4655-8177-7dc792f33d5b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "a5f91d72-a232-47ca-a17c-4a276b6ff843" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191732Z:a5f91d72-a232-47ca-a17c-4a276b6ff843" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a514b118-a23c-434c-a34f-24cb5ad9e92d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Backend not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "83" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ba7cc517-06a4-4863-a247-15b989d4a136" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "d6ddc043-cb6c-4522-83d5-151bab408ad5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191732Z:d6ddc043-cb6c-4522-83d5-151bab408ad5" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1b237c5b-4462-4120-bb4d-d7d6e155e591" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"backendid5332\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"description731\",\r\n \"url\": \"https://backendname9562/\",\r\n \"protocol\": \"http\",\r\n \"credentials\": {\r\n \"query\": {\r\n \"sv\": [\r\n \"xx\",\r\n \"bb\",\r\n \"cc\"\r\n ]\r\n },\r\n \"header\": {\r\n \"x-my-1\": [\r\n \"val1\",\r\n \"val2\"\r\n ]\r\n },\r\n \"authorization\": {\r\n \"scheme\": \"basic\",\r\n \"parameter\": \"opensemame\"\r\n }\r\n },\r\n \"tls\": {\r\n \"validateCertificateChain\": true,\r\n \"validateCertificateName\": true\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b30a190e-9b94-4ce2-ab8e-954a9eacbfd9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "dd6e81fb-6f6e-4d37-abea-877dde0e0a0a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191731Z:dd6e81fb-6f6e-4d37-abea-877dde0e0a0a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"description\": \"patchedDescription1012\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "47" + ], + "x-ms-client-request-id": [ + "d2b48008-45a4-4c98-909e-0fe74c49804b" + ], + "If-Match": [ + "\"AAAAAAAAD8c=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "20c64b35-e5d3-4634-964a-7eeb2aa70e1c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "9783cdaa-dcd2-43b1-ad37-100ea116f4c4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191731Z:9783cdaa-dcd2-43b1-ad37-100ea116f4c4" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "12a5c7b1-851f-4468-a883-bcd480dd846f" + ], + "If-Match": [ + "\"AAAAAAAAD8g=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ff9f9d89-b058-43bf-9879-7d5cf2c37710" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "dbdbe1e0-2550-4cd1-aab1-a253b99d52dc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191732Z:dbdbe1e0-2550-4cd1-aab1-a253b99d52dc" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/backendid5332?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9iYWNrZW5kaWQ1MzMyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "03228a99-b82c-45ca-bd8d-c1762951c5a6" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "04f16d04-4ca0-41a4-9a40-629b56416caf" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "67d8fdf4-a6e3-4d8b-bacc-bac0797702cc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191732Z:67d8fdf4-a6e3-4d8b-bacc-bac0797702cc" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "backendid5332", + "backendName9562", + "description731", + "patchedDescription1012" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/ServiceFabricCreateUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/ServiceFabricCreateUpdateDelete.json new file mode 100644 index 000000000000..6a45c019e329 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.BackendTests/ServiceFabricCreateUpdateDelete.json @@ -0,0 +1,777 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "f71b8336-3f89-4ea7-b3f5-de225762e3ae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "681f1d1a-cdec-41cc-bd31-819d1cd5b610", + "a1031ed5-c85b-43cf-9f1c-a7b867d75e2a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "62412d32-d4d2-4abd-986d-8c5012dc16da" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191739Z:62412d32-d4d2-4abd-986d-8c5012dc16da" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9bc27270-4441-4b3f-b8a8-80e3fbdd4e25" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "70dac882-1416-43e9-97de-722a8186264a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "409bf67e-2ece-404b-bfef-267306ad12e4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191739Z:409bf67e-2ece-404b-bfef-267306ad12e4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId1110?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXMvY2VydGlmaWNhdGVJZDExMTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"data\": \"MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ\",\r\n \"password\": \"g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "3521" + ], + "x-ms-client-request-id": [ + "78dd37a5-f554-4b32-9443-acdc7dd33a10" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId1110\",\r\n \"type\": \"Microsoft.ApiManagement/service/certificates\",\r\n \"name\": \"certificateId1110\",\r\n \"properties\": {\r\n \"subject\": \"CN=*.powershelltest.net\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"expirationDate\": \"2017-09-22T00:00:00-07:00\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "465" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD8k=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fe589f44-0c16-43bf-a6bb-bf8c75509c58" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "f33a7116-61e7-462d-a509-c1ef18b71347" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191740Z:f33a7116-61e7-462d-a509-c1ef18b71347" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"description424\",\r\n \"properties\": {\r\n \"serviceFabricCluster\": {\r\n \"clientCertificatethumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"maxPartitionResolutionRetries\": 5,\r\n \"managementEndpoints\": [\r\n \"https://backendname1492/\"\r\n ],\r\n \"serverX509Names\": [\r\n {\r\n \"name\": \"serverCommonName1\",\r\n \"issuerCertificateThumbprint\": \"issuerThumbprint1\"\r\n }\r\n ]\r\n }\r\n },\r\n \"url\": \"https://backendname1492/\",\r\n \"protocol\": \"http\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "587" + ], + "x-ms-client-request-id": [ + "1863de72-521b-4e86-a87c-771fd49ff275" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"sfbackend3183\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"description424\",\r\n \"url\": \"https://backendname1492/\",\r\n \"protocol\": \"http\",\r\n \"properties\": {\r\n \"serviceFabricCluster\": {\r\n \"managementEndpoints\": [\r\n \"https://backendname1492/\"\r\n ],\r\n \"clientCertificateThumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"serverX509Names\": [\r\n {\r\n \"name\": \"serverCommonName1\",\r\n \"issuerCertificateThumbprint\": \"issuerThumbprint1\"\r\n }\r\n ],\r\n \"maxPartitionResolutionRetries\": 5\r\n }\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "871" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD8o=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "47c8883a-5290-4cb5-bf2e-3a03cc92cba2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "bddb615b-233a-43d5-a2b6-200c91e5331a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191741Z:bddb615b-233a-43d5-a2b6-200c91e5331a" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4599ebfe-04c9-4987-8111-cdea9feb05bc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"sfbackend3183\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"description424\",\r\n \"url\": \"https://backendname1492/\",\r\n \"protocol\": \"http\",\r\n \"properties\": {\r\n \"serviceFabricCluster\": {\r\n \"managementEndpoints\": [\r\n \"https://backendname1492/\"\r\n ],\r\n \"clientCertificateThumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"serverX509Names\": [\r\n {\r\n \"name\": \"serverCommonName1\",\r\n \"issuerCertificateThumbprint\": \"issuerThumbprint1\"\r\n }\r\n ],\r\n \"maxPartitionResolutionRetries\": 5\r\n }\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8o=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "17eb3a11-6dae-48d7-8606-fc7eeb6eca85" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "551f096c-9625-4600-9ca3-7f9150fc5945" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191741Z:551f096c-9625-4600-9ca3-7f9150fc5945" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "07f18356-4684-4f3c-91da-fe68c9fa8ced" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"sfbackend3183\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"patchedDescription7038\",\r\n \"url\": \"https://backendname1492/\",\r\n \"protocol\": \"http\",\r\n \"properties\": {\r\n \"serviceFabricCluster\": {\r\n \"managementEndpoints\": [\r\n \"https://backendname1492/\"\r\n ],\r\n \"clientCertificateThumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"serverX509Names\": [\r\n {\r\n \"name\": \"serverCommonName1\",\r\n \"issuerCertificateThumbprint\": \"issuerThumbprint1\"\r\n }\r\n ],\r\n \"maxPartitionResolutionRetries\": 5\r\n }\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8s=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e52ccf71-95cd-4d2e-863a-253ec782f259" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "7743ae14-4885-43cc-a4bd-45514041d431" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191742Z:7743ae14-4885-43cc-a4bd-45514041d431" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e503e522-3689-45f9-9c66-5ae0612ff0a8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Backend not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "83" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "64bea5c3-b206-4205-9cf8-f23a9cb04361" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "82637d70-eb82-493e-aae3-d046e4841e5a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191743Z:82637d70-eb82-493e-aae3-d046e4841e5a" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "55d6f7c5-debb-498f-97ce-961f98fe1e72" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183\",\r\n \"type\": \"Microsoft.ApiManagement/service/backends\",\r\n \"name\": \"sfbackend3183\",\r\n \"properties\": {\r\n \"title\": null,\r\n \"description\": \"description424\",\r\n \"url\": \"https://backendname1492/\",\r\n \"protocol\": \"http\",\r\n \"properties\": {\r\n \"serviceFabricCluster\": {\r\n \"managementEndpoints\": [\r\n \"https://backendname1492/\"\r\n ],\r\n \"clientCertificateThumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"serverX509Names\": [\r\n {\r\n \"name\": \"serverCommonName1\",\r\n \"issuerCertificateThumbprint\": \"issuerThumbprint1\"\r\n }\r\n ],\r\n \"maxPartitionResolutionRetries\": 5\r\n }\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "966d8ea1-5690-41b8-9e9f-fb1b1730ba65" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "25db6a5b-7f60-46ce-891f-90619d4cc033" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191742Z:25db6a5b-7f60-46ce-891f-90619d4cc033" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"description\": \"patchedDescription7038\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "47" + ], + "x-ms-client-request-id": [ + "a551fc2a-0534-4b23-834b-58c870b70b76" + ], + "If-Match": [ + "\"AAAAAAAAD8o=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "67297bcd-93aa-49cb-8425-0b09a56f851e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "672b707f-4f79-4cf1-9c56-59ceae7056b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191742Z:672b707f-4f79-4cf1-9c56-59ceae7056b7" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8e277651-cbe8-46b1-993b-5daabb24594a" + ], + "If-Match": [ + "\"AAAAAAAAD8s=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b77f314d-b9d1-4f7c-b81c-8c145d91edce" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "213ce4af-b531-446e-8e3d-c09993d7f917" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191742Z:213ce4af-b531-446e-8e3d-c09993d7f917" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/backends/sfbackend3183?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9iYWNrZW5kcy9zZmJhY2tlbmQzMTgzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "58e9dea3-0b03-4cb6-b0ca-c8646c03f0c6" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "586ce284-9c7b-4a84-8cee-866c8e02bb81" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "7ee7730b-5687-4716-9a93-9287e171fb28" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191743Z:7ee7730b-5687-4716-9a93-9287e171fb28" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId1110?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXMvY2VydGlmaWNhdGVJZDExMTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e38d4a98-b188-497a-be04-be3de38d6efc" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "35c8e963-5125-462e-8eb1-008844956ae7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "dae618eb-4174-415c-9722-6c3a9db3e7d6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191743Z:dae618eb-4174-415c-9722-6c3a9db3e7d6" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "ServiceFabricCreateUpdateDelete": [ + "sfbackend3183", + "certificateId1110", + "backendName1492", + "description424", + "patchedDescription7038" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.CertificateTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.CertificateTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..49acb486c162 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.CertificateTests/CreateListUpdateDelete.json @@ -0,0 +1,584 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "9b11acb0-4fa8-4c3e-9612-92b9ca9b2710" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "502602d2-d23b-4c32-a469-e0ee3b1e5a61", + "04a8c3aa-9d92-4ce0-ad47-27f6b3661155" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "73b38727-9263-4fc0-ab63-0193ce06c0b0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191700Z:73b38727-9263-4fc0-ab63-0193ce06c0b0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f47cd476-4591-4533-8a13-ab0d3f2b7ff7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "34d7c857-0b75-4d84-a78d-bf818e2bdc8a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "a72cc68d-a353-4d1e-a16f-2e9957969f58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191700Z:a72cc68d-a353-4d1e-a16f-2e9957969f58" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c65b1f30-ac74-4cb4-b17f-5989604fbe50" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4b8be01a-5813-4174-8967-14e0c3e69e48" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "cf87bb85-ac2a-446d-a1ec-e42997e8a058" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191701Z:cf87bb85-ac2a-446d-a1ec-e42997e8a058" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "83e2a6e9-d789-466f-b1ae-537194b2a017" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401\",\r\n \"type\": \"Microsoft.ApiManagement/service/certificates\",\r\n \"name\": \"certificateId401\",\r\n \"properties\": {\r\n \"subject\": \"CN=*.powershelltest.net\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"expirationDate\": \"2017-09-22T07:00:00\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "77f2b878-e65b-4d0e-af98-87045a95e6ae" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "d4cb65f0-729d-4041-995b-47cafcc16882" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191703Z:d4cb65f0-729d-4041-995b-47cafcc16882" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "13a41728-6248-416c-bad1-ddf7fdce082f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f4599ac3-699b-44b4-83eb-e580ce966053" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "2ef7939c-8cfe-426e-b00d-9d76a6f41d79" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191704Z:2ef7939c-8cfe-426e-b00d-9d76a6f41d79" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXMvY2VydGlmaWNhdGVJZDQwMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"data\": \"MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ\",\r\n \"password\": \"g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "3521" + ], + "x-ms-client-request-id": [ + "4abe7ea7-5a1a-4f64-a504-8732e16917c0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401\",\r\n \"type\": \"Microsoft.ApiManagement/service/certificates\",\r\n \"name\": \"certificateId401\",\r\n \"properties\": {\r\n \"subject\": \"CN=*.powershelltest.net\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"expirationDate\": \"2017-09-22T00:00:00-07:00\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "463" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD8Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b152e94f-7145-409e-a393-15228232db5d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "090cfff1-2650-4ab2-9e31-939ad3d2d918" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191702Z:090cfff1-2650-4ab2-9e31-939ad3d2d918" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXMvY2VydGlmaWNhdGVJZDQwMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2b41e31d-1923-42a8-8593-3add58cf62e9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401\",\r\n \"type\": \"Microsoft.ApiManagement/service/certificates\",\r\n \"name\": \"certificateId401\",\r\n \"properties\": {\r\n \"subject\": \"CN=*.powershelltest.net\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"expirationDate\": \"2017-09-22T07:00:00\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "065b7142-aed8-4d4b-b38c-202ac9502b9b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "fc60bbd0-e2c5-4ee1-934d-ee5f7b7d2d67" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191703Z:fc60bbd0-e2c5-4ee1-934d-ee5f7b7d2d67" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXMvY2VydGlmaWNhdGVJZDQwMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db9cf222-b5de-4b54-baed-892e4b289847" + ], + "If-Match": [ + "\"AAAAAAAAD8Y=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c7511e9b-72a9-4356-8590-aa08fa0bc0f3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "182e816e-ab7e-43ce-8c51-f8627ffc2928" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191703Z:182e816e-ab7e-43ce-8c51-f8627ffc2928" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/certificates/certificateId401?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9jZXJ0aWZpY2F0ZXMvY2VydGlmaWNhdGVJZDQwMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e2a6bac4-9e5c-47da-86a9-643db5418ce5" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0a5d579c-ac00-4fca-a028-37363388cc75" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "10f22ce8-f1d0-4c79-9ac1-42dad9784921" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191704Z:10f22ce8-f1d0-4c79-9ac1-42dad9784921" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "certificateId401" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.EmailTemplateTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.EmailTemplateTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..61e83dcedbe3 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.EmailTemplateTests/CreateListUpdateDelete.json @@ -0,0 +1,522 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "be1383d5-da96-4de3-af18-e4327d4c2f30" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1843cdb5-36f9-4e6f-973e-f8bf36cbed3a", + "b3676c65-91e5-4b72-88d7-8d08c41fd133" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "f6380b63-02f6-4d29-a576-f44ab13612ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191751Z:f6380b63-02f6-4d29-a576-f44ab13612ff" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "717dc528-322e-49b9-a3e6-075a05406f3e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5dd57bb1-ccdf-4021-8662-c6e9b615cac7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "ddee4284-db47-47d1-8a6e-d662f2dd8fa4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191751Z:ddee4284-db47-47d1-8a6e-d662f2dd8fa4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW1wbGF0ZXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fbcbfa0f-bf44-4e8c-8113-f628b3b2b6e9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"ApplicationApprovedNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your application $AppName is published in the application gallery\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed here.\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"Application gallery submission approved\",\r\n \"description\": \"Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"AppId\",\r\n \"title\": \"Application id\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"AppName\",\r\n \"title\": \"Application name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/AccountClosedDeveloper\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"AccountClosedDeveloper\",\r\n \"properties\": {\r\n \"subject\": \"Thank you for using the $OrganizationName API!\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n On behalf of $OrganizationName and our customers we thank you for giving us a try. Your $OrganizationName API account is now closed.\\r\\n

\\r\\n

Thank you,

\\r\\n

Your $OrganizationName Team

\\r\\n $DevPortalUrl\\r\\n

\\r\\n \\r\\n\",\r\n \"title\": \"Developer farewell letter\",\r\n \"description\": \"Developers receive this fairwell email after they close their account.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/QuotaLimitApproachingDeveloperNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"QuotaLimitApproachingDeveloperNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"You are approaching an API quota limit\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n

Greetings $DevFirstName $DevLastName!

\\r\\n

\\r\\n You are approaching the quota limit on you subscription to the $ProdName product (primary key $SubPrimaryKey).\\r\\n #if ($QuotaResetDate != \\\"\\\")\\r\\n This quota will be renewed on $QuotaResetDate.\\r\\n #else\\r\\n This quota will not be renewed.\\r\\n #end\\r\\n

\\r\\n

Below are details on quota usage for the subscription:

\\r\\n

\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n #foreach ($api in $Apis)\\r\\n \\r\\n #foreach ($operation in $api.Operations)\\r\\n \\r\\n #end\\r\\n #end\\r\\n \\r\\n
Quota ScopeCallsCall QuotaBandwidthBandwidth Quota
Subscription\\r\\n #if ($CallsAlert == true)\\r\\n $Calls\\r\\n #else\\r\\n $Calls\\r\\n #end\\r\\n $CallQuota\\r\\n #if ($BandwidthAlert == true)\\r\\n $Bandwidth\\r\\n #else\\r\\n $Bandwidth\\r\\n #end\\r\\n $BandwidthQuota
API: $api.Name\\r\\n #if ($api.CallsAlert == true)\\r\\n $api.Calls\\r\\n #else\\r\\n $api.Calls\\r\\n #end\\r\\n $api.CallQuota\\r\\n #if ($api.BandwidthAlert == true)\\r\\n $api.Bandwidth\\r\\n #else\\r\\n $api.Bandwidth\\r\\n #end\\r\\n $api.BandwidthQuota
Operation: $operation.Name\\r\\n #if ($operation.CallsAlert == true)\\r\\n $operation.Calls\\r\\n #else\\r\\n $operation.Calls\\r\\n #end\\r\\n $operation.CallQuota\\r\\n #if ($operation.BandwidthAlert == true)\\r\\n $operation.Bandwidth\\r\\n #else\\r\\n $operation.Bandwidth\\r\\n #end\\r\\n $operation.BandwidthQuota
\\r\\n

\\r\\n

Thank you,

\\r\\n

$OrganizationName API Team

\\r\\n $DevPortalUrl\\r\\n

\\r\\n \\r\\n\",\r\n \"title\": \"Developer quota limit approaching notification\",\r\n \"description\": \"Developers receive this email to alert them when they are approaching a quota limit.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ProdName\",\r\n \"title\": \"Product name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"SubPrimaryKey\",\r\n \"title\": \"Primary Subscription key\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"QuotaResetDate\",\r\n \"title\": \"Quota reset date\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/NewDeveloperNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"NewDeveloperNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Welcome to the $OrganizationName API!\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n Letter\\r\\n \\r\\n \\r\\n

\\r\\n Welcome to $OrganizationName API!

\\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

Your $OrganizationName API program registration is completed and we are thrilled to have you as a customer. Here are a few important bits of information for your reference:

\\r\\n \\r\\n \\r\\n #if ($IdentityProvider == \\\"Basic\\\")\\r\\n \\r\\n #else\\r\\n \\r\\n #end\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n Please use the following username when signing into any of the ${OrganizationName}-hosted developer portals:\\r\\n $DevUsername\\r\\n Please use the following $IdentityProvider account when signing into any of the ${OrganizationName}-hosted developer portals:\\r\\n $DevUsername
\\r\\n We will direct all communications to the following email address:\\r\\n \\r\\n \\r\\n $DevEmail\\r\\n \\r\\n
\\r\\n

Best of luck in your API pursuits!

\\r\\n

$OrganizationName API Team

\\r\\n

\\r\\n $DevPortalUrl\\r\\n

\\r\\n \\r\\n\",\r\n \"title\": \"Developer welcome letter\",\r\n \"description\": \"Developers receive this “welcome” email after they confirm their new account.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevUsername\",\r\n \"title\": \"Developer user name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevEmail\",\r\n \"title\": \"Developer email\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"IdentityProvider\",\r\n \"title\": \"Identity Provider selected by Organization\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/EmailChangeIdentityDefault\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"EmailChangeIdentityDefault\",\r\n \"properties\": {\r\n \"subject\": \"Please confirm the new email associated with your $OrganizationName API account\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n Letter\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n

You are receiving this email because you made a change to the email address on your $OrganizationName API account.

\\r\\n

Please click on the following link to confirm the change:

\\r\\n

\\r\\n \\r\\n $ConfirmUrl\\r\\n \\r\\n

\\r\\n

If clicking the link does not work, please copy-and-paste or re-type it into your browser's address bar and hit \\\"Enter\\\".

\\r\\n

Thank you,

\\r\\n

$OrganizationName API Team

\\r\\n

\\r\\n $DevPortalUrl\\r\\n

\\r\\n
\\r\\n \\r\\n\",\r\n \"title\": \"Email change confirmation\",\r\n \"description\": \"Developers receive this email to confirm a new e-mail address after they change their existing one associated with their account.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ConfirmUrl\",\r\n \"title\": \"Developer confirmation URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/InviteUserNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"InviteUserNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"You are invited to join the $OrganizationName developer network\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n Your account has been created. Please follow the link below to visit the $OrganizationName developer portal and claim it:\\r\\n

\\r\\n

\\r\\n $ConfirmUrl\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"Invite user\",\r\n \"description\": \"An e-mail invitation to create an account, sent on request by API publishers.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ConfirmUrl\",\r\n \"title\": \"Confirmation link\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/NewCommentNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"NewCommentNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"$IssueName issue has a new comment\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

This is a brief note to let you know that $CommenterFirstName $CommenterLastName made the following comment on the issue $IssueName you created:

\\r\\n

$CommentText

\\r\\n

\\r\\n To view the issue on the developer portal click here.\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"New comment added to an issue\",\r\n \"description\": \"Developers receive this email when someone comments on the issue they created on the Issues page of the developer portal.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"CommenterFirstName\",\r\n \"title\": \"Commenter first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"CommenterLastName\",\r\n \"title\": \"Commenter last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"IssueId\",\r\n \"title\": \"Issue id\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"IssueName\",\r\n \"title\": \"Issue name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"CommentText\",\r\n \"title\": \"Comment text\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ConfirmSignUpIdentityDefault\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"ConfirmSignUpIdentityDefault\",\r\n \"properties\": {\r\n \"subject\": \"Please confirm your new $OrganizationName API account\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n Letter\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n

Thank you for joining the $OrganizationName API program! We host a growing number of cool APIs and strive to provide an awesome experience for API developers.

\\r\\n

First order of business is to activate your account and get you going. To that end, please click on the following link:

\\r\\n

\\r\\n \\r\\n $ConfirmUrl\\r\\n \\r\\n

\\r\\n

If clicking the link does not work, please copy-and-paste or re-type it into your browser's address bar and hit \\\"Enter\\\".

\\r\\n

Thank you,

\\r\\n

$OrganizationName API Team

\\r\\n

\\r\\n $DevPortalUrl\\r\\n

\\r\\n
\\r\\n \\r\\n\",\r\n \"title\": \"New developer account confirmation\",\r\n \"description\": \"Developers receive this email to confirm their e-mail address after they sign up for a new account.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ConfirmUrl\",\r\n \"title\": \"Developer activation URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/NewIssueNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"NewIssueNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your request $IssueName was received\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

Thank you for contacting us. Our API team will review your issue and get back to you soon.

\\r\\n

\\r\\n Click this link to view or edit your request.\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"New issue received\",\r\n \"description\": \"This email is sent to developers after they create a new topic on the Issues page of the developer portal.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"IssueId\",\r\n \"title\": \"Issue id\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"IssueName\",\r\n \"title\": \"Issue name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/PurchaseDeveloperNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"PurchaseDeveloperNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your subscription to the $ProdName\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Greetings $DevFirstName $DevLastName!

\\r\\n

\\r\\n Thank you for subscribing to the $ProdName and welcome to the $OrganizationName developer community. We are delighted to have you as part of the team and are looking forward to the amazing applications you will build using our API!\\r\\n

\\r\\n

Below are a few subscription details for your reference:

\\r\\n

\\r\\n

    \\r\\n #if ($SubStartDate != \\\"\\\")\\r\\n
  • Start date: $SubStartDate
  • \\r\\n #end\\r\\n \\r\\n #if ($SubTerm != \\\"\\\")\\r\\n
  • Subscription term: $SubTerm
  • \\r\\n #end\\r\\n
\\r\\n

\\r\\n

\\r\\n Visit the developer profile area to manage your subscription and subscription keys\\r\\n

\\r\\n

A couple of pointers to help get you started:

\\r\\n

\\r\\n \\r\\n Learn about the API\\r\\n \\r\\n

\\r\\n

The API documentation provides all information necessary to make a request and to process a response. Code samples are provided per API operation in a variety of languages. Moreover, an interactive console allows making API calls directly from the developer portal without writing any code.

\\r\\n

\\r\\n \\r\\n Feature your app in the app gallery\\r\\n \\r\\n

\\r\\n

You can publish your application on our gallery for increased visibility to potential new users.

\\r\\n

\\r\\n \\r\\n Stay in touch\\r\\n \\r\\n

\\r\\n

\\r\\n If you have an issue, a question, a suggestion, a request, or if you just want to tell us something, go to the Issues page on the developer portal and create a new topic.\\r\\n

\\r\\n

Happy hacking,

\\r\\n

The $OrganizationName API Team

\\r\\n $DevPortalUrl\\r\\n \\r\\n\",\r\n \"title\": \"New subscription activated\",\r\n \"description\": \"Developers receive this acknowledgement email after subscribing to a product.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ProdName\",\r\n \"title\": \"Product name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"SubStartDate\",\r\n \"title\": \"Subscription start date\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"SubTerm\",\r\n \"title\": \"Subscription term\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/PasswordResetIdentityDefault\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"PasswordResetIdentityDefault\",\r\n \"properties\": {\r\n \"subject\": \"Your password change request\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n Letter\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n

You are receiving this email because you requested to change the password on your $OrganizationName API account.

\\r\\n

Please click on the link below and follow instructions to create your new password:

\\r\\n

\\r\\n \\r\\n $ConfirmUrl\\r\\n \\r\\n

\\r\\n

If clicking the link does not work, please copy-and-paste or re-type it into your browser's address bar and hit \\\"Enter\\\".

\\r\\n

Thank you,

\\r\\n

$OrganizationName API Team

\\r\\n

\\r\\n $DevPortalUrl\\r\\n

\\r\\n
\\r\\n \\r\\n\",\r\n \"title\": \"Password change confirmation\",\r\n \"description\": \"Developers receive this email when they request a password change of their account. The purpose of the email is to verify that the account owner made the request and to provide a one-time perishable URL for changing the password.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ConfirmUrl\",\r\n \"title\": \"Developer new password instruction URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/PasswordResetByAdminNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"PasswordResetByAdminNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your password was reset\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n

The password of your $OrganizationName API account has been reset, per your request.

\\r\\n

\\r\\n Your new password is: $DevPassword

\\r\\n

Please make sure to change it next time you sign in.

\\r\\n

Thank you,

\\r\\n

$OrganizationName API Team

\\r\\n

\\r\\n $DevPortalUrl\\r\\n

\\r\\n
\\r\\n \\r\\n\",\r\n \"title\": \"Password reset by publisher notification (Password reset by admin)\",\r\n \"description\": \"Developers receive this email when the publisher resets their password.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPassword\",\r\n \"title\": \"New Developer password\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/RejectDeveloperNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"RejectDeveloperNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your subscription request for the $ProdName\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n We would like to inform you that we reviewed your subscription request for the $ProdName.\\r\\n

\\r\\n #if ($SubDeclineReason == \\\"\\\")\\r\\n

Regretfully, we were unable to approve it, as subscriptions are temporarily suspended at this time.

\\r\\n #else\\r\\n

\\r\\n Regretfully, we were unable to approve it at this time for the following reason:\\r\\n

$SubDeclineReason

\\r\\n #end\\r\\n

We truly appreciate your interest.

All the best,

The $OrganizationName API Team

$DevPortalUrl\\r\\n\",\r\n \"title\": \"Subscription request declined\",\r\n \"description\": \"This email is sent to developers when their subscription requests for products requiring publisher approval is declined.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"SubDeclineReason\",\r\n \"title\": \"Reason for declining subscription\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ProdName\",\r\n \"title\": \"Product name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/RequestDeveloperNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"RequestDeveloperNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your subscription request for the $ProdName\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n Thank you for your interest in our $ProdName API product!\\r\\n

\\r\\n

\\r\\n We were delighted to receive your subscription request. We will promptly review it and get back to you at $DevEmail.\\r\\n

\\r\\n

Thank you,

\\r\\n

The $OrganizationName API Team

\\r\\n $DevPortalUrl\\r\\n \\r\\n\",\r\n \"title\": \"Subscription request received\",\r\n \"description\": \"This email is sent to developers to acknowledge receipt of their subscription requests for products requiring publisher approval.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevEmail\",\r\n \"title\": \"Developer email\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"ProdName\",\r\n \"title\": \"Product name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5510795b-bba8-4d64-b239-221dd858d3c3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "014eb4cc-ffe5-4a16-8f7f-0f9aa475ed33" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191752Z:014eb4cc-ffe5-4a16-8f7f-0f9aa475ed33" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW1wbGF0ZXMvQXBwbGljYXRpb25BcHByb3ZlZE5vdGlmaWNhdGlvbk1lc3NhZ2U/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"subject\": \"New Subject\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "58" + ], + "x-ms-client-request-id": [ + "f855dd15-41ef-4ba0-a713-111a14f235ce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"ApplicationApprovedNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"New Subject\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed here.\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"Application gallery submission approved\",\r\n \"description\": \"Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.\",\r\n \"isDefault\": false,\r\n \"parameters\": [\r\n {\r\n \"name\": \"AppId\",\r\n \"title\": \"Application id\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"AppName\",\r\n \"title\": \"Application name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2078" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD8w=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f27705b8-d205-4264-8a15-fb8fdd9ef7a6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "664eb7fe-debf-46f8-942a-2c1eb597fc04" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191753Z:664eb7fe-debf-46f8-942a-2c1eb597fc04" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW1wbGF0ZXMvQXBwbGljYXRpb25BcHByb3ZlZE5vdGlmaWNhdGlvbk1lc3NhZ2U/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b630385f-b0c8-497b-a6c9-6e4f5fa80928" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"ApplicationApprovedNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"New Subject\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed here.\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"Application gallery submission approved\",\r\n \"description\": \"Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.\",\r\n \"isDefault\": false,\r\n \"parameters\": [\r\n {\r\n \"name\": \"AppId\",\r\n \"title\": \"Application id\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"AppName\",\r\n \"title\": \"Application name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8w=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9a6bc5af-2871-483a-a9ec-c4fa96c5b108" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "a3551961-65ce-41fe-a9b3-cf63d9c7d5fc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191753Z:a3551961-65ce-41fe-a9b3-cf63d9c7d5fc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW1wbGF0ZXMvQXBwbGljYXRpb25BcHByb3ZlZE5vdGlmaWNhdGlvbk1lc3NhZ2U/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "df79b065-e4ee-4176-91a3-da0f919458e4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage\",\r\n \"type\": \"Microsoft.ApiManagement/service/templates\",\r\n \"name\": \"ApplicationApprovedNotificationMessage\",\r\n \"properties\": {\r\n \"subject\": \"Your application $AppName is published in the application gallery\",\r\n \"body\": \"\\r\\n\\r\\n \\r\\n \\r\\n

Dear $DevFirstName $DevLastName,

\\r\\n

\\r\\n We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed here.\\r\\n

\\r\\n

Best,

\\r\\n

The $OrganizationName API Team

\\r\\n \\r\\n\",\r\n \"title\": \"Application gallery submission approved\",\r\n \"description\": \"Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.\",\r\n \"isDefault\": true,\r\n \"parameters\": [\r\n {\r\n \"name\": \"AppId\",\r\n \"title\": \"Application id\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"AppName\",\r\n \"title\": \"Application name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevFirstName\",\r\n \"title\": \"Developer first name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevLastName\",\r\n \"title\": \"Developer last name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"OrganizationName\",\r\n \"title\": \"Organization name\",\r\n \"description\": null\r\n },\r\n {\r\n \"name\": \"DevPortalUrl\",\r\n \"title\": \"Developer portal URL\",\r\n \"description\": null\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAAAA=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "25448179-ca8c-47b1-9e24-8012e09321e3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "bdc5c8f6-b95a-4ba0-b224-545478235077" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191753Z:bdc5c8f6-b95a-4ba0-b224-545478235077" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW1wbGF0ZXMvQXBwbGljYXRpb25BcHByb3ZlZE5vdGlmaWNhdGlvbk1lc3NhZ2U/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2aaf0906-ded1-4092-9bda-1ee9d66e9cae" + ], + "If-Match": [ + "\"AAAAAAAAD8w=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8b7b9020-1930-40ec-8217-29c3b0733e5d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "5aa07855-e479-4e3d-ae98-f79ed3c11238" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191753Z:5aa07855-e479-4e3d-ae98-f79ed3c11238" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/templates/ApplicationApprovedNotificationMessage?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW1wbGF0ZXMvQXBwbGljYXRpb25BcHByb3ZlZE5vdGlmaWNhdGlvbk1lc3NhZ2U/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "93bcdecf-57d4-4b43-8c54-d198bf4c1515" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "db155af2-aae8-408c-b9b7-8173a83b98e1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "dc276740-9768-4c3e-87d5-aab2107bcd97" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191754Z:dc276740-9768-4c3e-87d5-aab2107bcd97" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..c8666321fa72 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupTests/CreateListUpdateDelete.json @@ -0,0 +1,710 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "6a8bf6b3-a344-42a8-89c6-912474c1cdce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f9304724-8add-4af2-9e20-725e73bd185f", + "74c094c8-3197-4f79-b209-46494f101812" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "45c9d9b8-2b11-4384-a7d0-382f892b48e9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191801Z:45c9d9b8-2b11-4384-a7d0-382f892b48e9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41d03762-5392-419f-bc2d-c2209315f8b4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "184916bd-de71-4182-8f0a-0369e631c4ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "3e28ca84-2dc1-4a36-8b18-d502a82ed4bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191801Z:3e28ca84-2dc1-4a36-8b18-d502a82ed4bd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cfd46078-a200-4217-9b28-094df78c2b86" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/administrators\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"administrators\",\r\n \"properties\": {\r\n \"displayName\": \"Administrators\",\r\n \"description\": \"Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/guests\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"guests\",\r\n \"properties\": {\r\n \"displayName\": \"Guests\",\r\n \"description\": \"Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9e93ec9c-f715-41ec-9333-126dead898fb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "6c95bbf6-42b1-4d1b-ad31-6041668579c0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191801Z:6c95bbf6-42b1-4d1b-ad31-6041668579c0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHM/JHRvcD0xJmFwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2064e612-0dc0-43a2-9ba6-83ed065c5509" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/administrators\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"administrators\",\r\n \"properties\": {\r\n \"displayName\": \"Administrators\",\r\n \"description\": \"Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f78ceecf-ab7b-4fb2-841f-f0da76674707" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "1878be6e-1994-452c-9865-3bd231e83292" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191801Z:1878be6e-1994-452c-9865-3bd231e83292" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"sdkGroup1758\",\r\n \"description\": \"Group created from Sdk client\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "116" + ], + "x-ms-client-request-id": [ + "73d98b56-5ed1-4d1e-ae74-3d1876ba8336" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"sdkGroupId8089\",\r\n \"properties\": {\r\n \"displayName\": \"sdkGroup1758\",\r\n \"description\": \"Group created from Sdk client\",\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "449" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD80=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ebed625f-60fd-4598-b2d4-443020ee9e58" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "21f823cc-2348-4701-8850-5f611d4872c3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191802Z:21f823cc-2348-4701-8850-5f611d4872c3" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0153b195-084b-4d90-b4ac-46cf7a60d3e3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"sdkGroupId8089\",\r\n \"properties\": {\r\n \"displayName\": \"sdkGroup1758\",\r\n \"description\": \"Group created from Sdk client\",\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD80=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "03c7b5a6-48db-4d10-a785-53513b47c22f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "85a8f3e3-bc94-468c-8540-3db9b2a3d4fe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191802Z:85a8f3e3-bc94-468c-8540-3db9b2a3d4fe" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "727d2eb1-d5ed-46aa-839b-fed5000a56ad" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"sdkGroupId8089\",\r\n \"properties\": {\r\n \"displayName\": \"sdkGroup1758\",\r\n \"description\": \"Updating the description of the Sdk\",\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD84=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "55446f5d-8f96-431b-a281-29741d335de6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "8a1ee4b5-2202-4459-8f2c-81367baf61e9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191803Z:8a1ee4b5-2202-4459-8f2c-81367baf61e9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fbfeb2e6-0d8e-48a0-9476-81a42a1cfb5e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Group not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "81" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3be93e21-0de2-4bbd-8897-e58114aa63a2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "2d00a070-e4dc-46db-b450-110a0930d412" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191803Z:2d00a070-e4dc-46db-b450-110a0930d412" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"Updating the description of the Sdk\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "86" + ], + "x-ms-client-request-id": [ + "f0045773-f393-4aee-b7bc-974342d30eea" + ], + "If-Match": [ + "\"AAAAAAAAD80=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "670679a7-d3d4-4409-973f-12fc49488a2c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "16bdaab1-6274-458d-b221-dd8fef6fef5f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191802Z:16bdaab1-6274-458d-b221-dd8fef6fef5f" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4b4e27f3-7089-46d8-bf58-b1f6b057062c" + ], + "If-Match": [ + "\"AAAAAAAAD84=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3b112fd8-96a5-4c1e-b3d7-d36dec1f00be" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "a03cbb65-1a3f-4d24-a07d-5ad82068c31a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191803Z:a03cbb65-1a3f-4d24-a07d-5ad82068c31a" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId8089?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDgwODk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c9fb2f00-760f-411f-b7e1-6b02ff82542c" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e8c944dc-c11e-410f-b4a0-b5bd9607face" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "fd312b09-752d-416a-acb6-0b92d36027d7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191803Z:fd312b09-752d-416a-acb6-0b92d36027d7" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "sdkGroupId8089", + "sdkGroup1758" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupUserTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupUserTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..26f3b16057b3 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.GroupUserTests/CreateListUpdateDelete.json @@ -0,0 +1,708 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "5ef95536-853b-4175-a601-94afe10691de" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "073728de-29f8-4c67-87cf-50fa978d1e90", + "a167521f-140d-43dd-9bee-a2f6c0181e99" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "81cdd4f9-6ff6-42c7-add8-16e77be60317" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191811Z:81cdd4f9-6ff6-42c7-add8-16e77be60317" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f45d0563-7a7b-4190-90d5-2d5ca53422d1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2ecee320-5175-450d-97e9-81fdc32d4658" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "bf7d087c-4887-48cd-83d7-7e17557ee1b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191811Z:bf7d087c-4887-48cd-83d7-7e17557ee1b7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"sdkGroup5719\",\r\n \"description\": \"Group created from Sdk client\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "116" + ], + "x-ms-client-request-id": [ + "1d34c4c0-efad-48f7-b9a3-b7a0ff13a578" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"sdkGroupId5129\",\r\n \"properties\": {\r\n \"displayName\": \"sdkGroup5719\",\r\n \"description\": \"Group created from Sdk client\",\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "449" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD88=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "263adbf0-8839-43d1-a52c-987de18aca1d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "48e68ec0-691a-4ec0-8092-0b29f22dace0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191811Z:48e68ec0-691a-4ec0-8092-0b29f22dace0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129/users?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjkvdXNlcnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "64105860-8822-4f49-b184-46d2fee1472c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "03ef5520-3329-42b4-8e55-2e14873845da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "86e699d8-25ed-42d9-915c-1a0a3b1f07b1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191811Z:86e699d8-25ed-42d9-915c-1a0a3b1f07b1" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129/users?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjkvdXNlcnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ee190995-a5db-47fe-a0a9-09b1148a0f32" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/sdkUserId8055\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups/users\",\r\n \"name\": \"sdkUserId8055\",\r\n \"properties\": {\r\n \"firstName\": \"sdkFirst6274\",\r\n \"lastName\": \"sdkLast1361\",\r\n \"email\": \"sdkFirst.Last9227@contoso.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:18:12.073\",\r\n \"note\": \"dummy note\",\r\n \"identities\": [\r\n {\r\n \"provider\": \"Basic\",\r\n \"id\": \"sdkFirst.Last9227@contoso.com\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ff0d6d15-7523-4181-9767-5dc03de0c07c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "942eb7ae-88d7-48c8-828b-4be8dfe80c84" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191812Z:942eb7ae-88d7-48c8-828b-4be8dfe80c84" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129/users?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjkvdXNlcnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "39602fc8-e5eb-4baa-92d3-6651093c3422" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "afbb2188-3ad7-4bb3-85d9-56aab9740173" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "4905b9f8-f7d8-446b-a511-c71defb7fb58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191813Z:4905b9f8-f7d8-446b-a511-c71defb7fb58" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/sdkUserId8055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy9zZGtVc2VySWQ4MDU1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"active\",\r\n \"note\": \"dummy note\",\r\n \"email\": \"sdkFirst.Last9227@contoso.com\",\r\n \"firstName\": \"sdkFirst6274\",\r\n \"lastName\": \"sdkLast1361\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "191" + ], + "x-ms-client-request-id": [ + "f7ff8594-052e-4876-9b9b-a725be2d3b75" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/sdkUserId8055\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"sdkUserId8055\",\r\n \"properties\": {\r\n \"firstName\": \"sdkFirst6274\",\r\n \"lastName\": \"sdkLast1361\",\r\n \"email\": \"sdkFirst.Last9227@contoso.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:18:12.5753734Z\",\r\n \"note\": \"dummy note\",\r\n \"groups\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"name\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n ],\r\n \"identities\": [\r\n {\r\n \"provider\": \"Basic\",\r\n \"id\": \"sdkFirst.Last9227@contoso.com\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1105" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD9A=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "53e27791-b590-403a-9f2c-a2d699031758" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "b0ffe6a6-84f6-4a93-8baa-853d62f86eb2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191812Z:b0ffe6a6-84f6-4a93-8baa-853d62f86eb2" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129/users/sdkUserId8055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjkvdXNlcnMvc2RrVXNlcklkODA1NT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9913b7cf-c0d0-469c-bb21-c3e6cad6ec9c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/sdkUserId8055\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups/users\",\r\n \"name\": \"sdkUserId8055\",\r\n \"properties\": {\r\n \"firstName\": \"sdkFirst6274\",\r\n \"lastName\": \"sdkLast1361\",\r\n \"email\": \"sdkFirst.Last9227@contoso.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:18:12.073\",\r\n \"note\": \"dummy note\",\r\n \"groups\": [],\r\n \"identities\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "550" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD9U=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "212dcbf5-a583-4c4b-ba1c-38b65c2f2eb1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "60ad9586-a1f9-4907-89f2-913e2747563b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191812Z:60ad9586-a1f9-4907-89f2-913e2747563b" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129/users/sdkUserId8055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjkvdXNlcnMvc2RrVXNlcklkODA1NT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b17116ff-88fd-47ec-ad26-023edbb51b46" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8830428d-5cac-4e1c-b788-bd85ea40090f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "522178f6-1c54-486c-99ab-0dd389d807c4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191813Z:522178f6-1c54-486c-99ab-0dd389d807c4" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/sdkUserId8055?deleteSubscriptions=true&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy9zZGtVc2VySWQ4MDU1P2RlbGV0ZVN1YnNjcmlwdGlvbnM9dHJ1ZSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "479393c5-bfb3-4e01-8bd6-5b1ce113298c" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f2a5f8e3-65bd-4e8c-ba64-210072a0d95c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "052fe111-6917-49e7-ac9b-eb088a3b9973" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191813Z:052fe111-6917-49e7-ac9b-eb088a3b9973" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/sdkGroupId5129?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvc2RrR3JvdXBJZDUxMjk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43146d2b-69f1-4d37-8340-f92620615203" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f5bd077e-932b-4676-b634-60d42b196898" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "50840fc3-badc-4c25-8364-dac13bd25d9f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191814Z:50840fc3-badc-4c25-8364-dac13bd25d9f" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "sdkUserId8055", + "sdkGroupId5129", + "sdkGroup5719", + "sdkFirst6274", + "sdkLast1361", + "sdkFirst.Last9227" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.IdentityProviderTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.IdentityProviderTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..635a58ae3f4e --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.IdentityProviderTests/CreateListUpdateDelete.json @@ -0,0 +1,650 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "4f2ed45c-e814-4cdb-984f-c924897bbc02" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bd51c9e9-1dd4-4dac-aa01-26cc8d7b8b89", + "b39b5a35-47a3-4b15-9038-ff5f34138cea" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "9668aa59-e099-4556-a15b-626a2c4e5c2e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191012Z:9668aa59-e099-4556-a15b-626a2c4e5c2e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8e5e1b79-a8d5-4d41-a9f1-6737620228a2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7c8df162-9c4c-4c5a-b202-9f0dfcbb8020" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "c1f9d3f3-0718-4441-9c36-d785b8ad78b2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191013Z:c1f9d3f3-0718-4441-9c36-d785b8ad78b2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"clientId\": \"clientId4020\",\r\n \"clientSecret\": \"clientSecret2844\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "101" + ], + "x-ms-client-request-id": [ + "66c7f466-4166-43c2-8b9e-6f0e50a63ef7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/Facebook\",\r\n \"type\": \"Microsoft.ApiManagement/service/identityProviders\",\r\n \"name\": \"Facebook\",\r\n \"properties\": {\r\n \"clientId\": \"clientId4020\",\r\n \"clientSecret\": \"clientSecret2844\",\r\n \"type\": \"facebook\",\r\n \"allowedTenants\": null,\r\n \"signupPolicyName\": null,\r\n \"signinPolicyName\": null,\r\n \"profileEditingPolicyName\": null,\r\n \"passwordResetPolicyName\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "566" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD2U=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ae25ac65-a1a1-4db8-ab59-adda10982c15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "cfb168c8-da76-45cb-b524-9ccb5577b7b8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191014Z:cfb168c8-da76-45cb-b524-9ccb5577b7b8" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5a554f0f-90ea-4de9-a544-b4ec44e6ade6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/Facebook\",\r\n \"type\": \"Microsoft.ApiManagement/service/identityProviders\",\r\n \"name\": \"Facebook\",\r\n \"properties\": {\r\n \"clientId\": \"clientId4020\",\r\n \"clientSecret\": \"clientSecret2844\",\r\n \"type\": \"facebook\",\r\n \"allowedTenants\": null,\r\n \"signupPolicyName\": null,\r\n \"signinPolicyName\": null,\r\n \"profileEditingPolicyName\": null,\r\n \"passwordResetPolicyName\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD2U=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4dcd0b03-fb9d-476e-9d79-76b73e5bdcf6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "1b6ae8e6-2130-431c-b003-c9b83778e13e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191014Z:1b6ae8e6-2130-431c-b003-c9b83778e13e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "68507f91-9e6f-4b39-961f-79f88ed01701" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/Facebook\",\r\n \"type\": \"Microsoft.ApiManagement/service/identityProviders\",\r\n \"name\": \"Facebook\",\r\n \"properties\": {\r\n \"clientId\": \"clientId4020\",\r\n \"clientSecret\": \"clientSecret7694\",\r\n \"type\": \"facebook\",\r\n \"allowedTenants\": null,\r\n \"signupPolicyName\": null,\r\n \"signinPolicyName\": null,\r\n \"profileEditingPolicyName\": null,\r\n \"passwordResetPolicyName\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD2Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "17ea36f3-4016-4fa8-98a9-07d5567da3a0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "5a0f4fa3-c0fe-4df4-a5b9-4aa15ded1e08" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191015Z:5a0f4fa3-c0fe-4df4-a5b9-4aa15ded1e08" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c6206ced-162a-40bc-9a2f-655023f6d9de" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"IdentityProvider not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "92" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "56cafafd-5d28-4d12-a5e8-c2ed9935df79" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "ca49d75b-139c-4ac8-99e8-8210f5585122" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191015Z:ca49d75b-139c-4ac8-99e8-8210f5585122" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "54087704-3e06-4071-bd52-8cfdf20022a4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/Facebook\",\r\n \"type\": \"Microsoft.ApiManagement/service/identityProviders\",\r\n \"name\": \"Facebook\",\r\n \"properties\": {\r\n \"clientId\": \"clientId4020\",\r\n \"clientSecret\": \"clientSecret2844\",\r\n \"type\": \"facebook\",\r\n \"allowedTenants\": null,\r\n \"signupPolicyName\": null,\r\n \"signinPolicyName\": null,\r\n \"profileEditingPolicyName\": null,\r\n \"passwordResetPolicyName\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "aee2d789-83e3-4446-9d9c-5e7484b295a3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "029c00e3-81d9-4128-83ea-d949cd37da96" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191014Z:029c00e3-81d9-4128-83ea-d949cd37da96" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"clientSecret\": \"clientSecret7694\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "cdb02186-c646-4cbb-91f8-8abe7fc1e145" + ], + "If-Match": [ + "\"AAAAAAAAD2U=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "87e64acf-42ac-4ea7-bc70-17908a0ec9fe" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "abcfb994-530d-4945-a32a-79b7e9ebce17" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191015Z:abcfb994-530d-4945-a32a-79b7e9ebce17" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f09cec9c-e880-4ed2-95ad-3e61936e33ae" + ], + "If-Match": [ + "\"AAAAAAAAD2Y=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "82c64f24-999d-4aa7-b4d4-32479a504114" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "8f28ee48-db3a-4ba7-a6ba-276ed405f116" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191015Z:8f28ee48-db3a-4ba7-a6ba-276ed405f116" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/identityProviders/facebook?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9pZGVudGl0eVByb3ZpZGVycy9mYWNlYm9vaz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "618d0122-59d7-4147-9600-d1b491a0b253" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f6ebd7d6-15d7-43c7-b175-461a78ca7a2c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "a4e6e9ee-6b72-4c3a-bc1a-28803f05ed70" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191015Z:a4e6e9ee-6b72-4c3a-bc1a-28803f05ed70" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "clientId4020", + "clientSecret2844", + "clientSecret7694" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.LoggerTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.LoggerTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..2fd73b854c0b --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.LoggerTests/CreateListUpdateDelete.json @@ -0,0 +1,1164 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "24f4755b-f070-4cbd-bd43-5d0bbea4daad" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7b254f2c-c3e0-4549-aeef-732ce36b80f7", + "fff5a009-eba6-4760-8f97-b92a6929fe40" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "62b4ae8c-20e2-41da-a6b9-c9c15ab0b70b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191142Z:62b4ae8c-20e2-41da-a6b9-c9c15ab0b70b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "344877fc-7615-489d-9336-24ebd991e822" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7ec05a2c-8e39-4a6a-91fb-2c9e1b6aee12" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "267b71b3-acd8-4d18-a550-5d4edaac05c6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191142Z:267b71b3-acd8-4d18-a550-5d4edaac05c6" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"CentralUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "31" + ], + "x-ms-client-request-id": [ + "8956f91b-5519-4491-a0df-f8bc2ebb3498" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624\",\r\n \"name\": \"eventHubNamespace1624\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"Central US\",\r\n \"kind\": \"EventHub\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Unknown\",\r\n \"metricId\": \"bab08e11-7b12-4354-9fd1-4b5d64d40b68:eventhubnamespace1624\",\r\n \"enabled\": false,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "603432b3-702c-4daa-906a-bbb934f927cc_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "100f233b-97c0-4788-9008-212f22ff9e15" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191144Z:100f233b-97c0-4788-9008-212f22ff9e15" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624\",\r\n \"name\": \"eventHubNamespace1624\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"Central 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\": \"bab08e11-7b12-4354-9fd1-4b5d64d40b68:eventhubnamespace1624\",\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-08-02T19:11:42.27Z\",\r\n \"serviceBusEndpoint\": \"https://eventHubNamespace1624.servicebus.windows.net:443/\",\r\n \"enabled\": true,\r\n \"critical\": false,\r\n \"scaleUnit\": \"DM2-505\",\r\n \"dataCenter\": \"DM2\",\r\n \"updatedAt\": \"2017-08-02T19:12:07.667Z\",\r\n \"eventHubEnabled\": true,\r\n \"namespaceType\": \"EventHub\",\r\n \"messagingSku\": 2\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9935dbf5-7302-4930-a533-c7379e67801b_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "42b6b0f8-a17c-4e9c-8413-2faf8519eca4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191214Z:42b6b0f8-a17c-4e9c-8413-2faf8519eca4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/eventhubs/eventhubname6028?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0L2V2ZW50aHVicy9ldmVudGh1Ym5hbWU2MDI4P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"CentralUS\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "31" + ], + "x-ms-client-request-id": [ + "1ad4ad43-4d0b-45f2-8738-662ac53326ca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/eventhubs/eventhubname6028\",\r\n \"name\": \"eventhubname6028\",\r\n \"type\": \"Microsoft.EventHub/EventHubs\",\r\n \"location\": \"Central US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"messageRetentionInDays\": 7,\r\n \"status\": \"Active\",\r\n \"createdAt\": \"2017-08-02T19:12:17.567Z\",\r\n \"updatedAt\": \"2017-08-02T19:12:20.74Z\",\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" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f7c7176b-1c95-4f36-984b-347bfb99dc61_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "966e31eb-9e5b-4219-bc32-5b08e9f985bb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191225Z:966e31eb-9e5b-4219-bc32-5b08e9f985bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/eventhubs/eventhubname6028/authorizationRules/sendPolicy9509?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0L2V2ZW50aHVicy9ldmVudGh1Ym5hbWU2MDI4L2F1dGhvcml6YXRpb25SdWxlcy9zZW5kUG9saWN5OTUwOT9hcGktdmVyc2lvbj0yMDE1LTA4LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\"\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "66" + ], + "x-ms-client-request-id": [ + "30f05460-4369-4327-812e-10786780744b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/eventhubs/eventhubname6028/authorizationRules/sendPolicy9509\",\r\n \"name\": \"sendPolicy9509\",\r\n \"type\": \"Microsoft.EventHub/AuthorizationRules\",\r\n \"location\": \"Central US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"rights\": [\r\n \"Send\"\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1fea16b5-75e7-4a1e-87b8-0884b6f1edd7_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "5534c7a6-9f54-4a86-b89a-5cdb66465553" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191230Z:5534c7a6-9f54-4a86-b89a-5cdb66465553" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/eventhubs/eventhubname6028/authorizationRules/sendPolicy9509/ListKeys?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0L2V2ZW50aHVicy9ldmVudGh1Ym5hbWU2MDI4L2F1dGhvcml6YXRpb25SdWxlcy9zZW5kUG9saWN5OTUwOS9MaXN0S2V5cz9hcGktdmVyc2lvbj0yMDE1LTA4LTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7f267579-3691-421c-b600-a07c16b5ff84" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryConnectionString\": \"Endpoint=sb://eventhubnamespace1624.servicebus.windows.net/;SharedAccessKeyName=sendPolicy9509;SharedAccessKey=Jg4VrWYGFZ3DQHkzfr+AYhvhdS3XVKMecXE0ZVT8uFg=;EntityPath=eventhubname6028\",\r\n \"secondaryConnectionString\": \"Endpoint=sb://eventhubnamespace1624.servicebus.windows.net/;SharedAccessKeyName=sendPolicy9509;SharedAccessKey=z7OpTb/mcBzHLNk3Floz73UFj9C3IMQjC/4pSwoarMI=;EntityPath=eventhubname6028\",\r\n \"primaryKey\": \"Jg4VrWYGFZ3DQHkzfr+AYhvhdS3XVKMecXE0ZVT8uFg=\",\r\n \"secondaryKey\": \"z7OpTb/mcBzHLNk3Floz73UFj9C3IMQjC/4pSwoarMI=\",\r\n \"keyName\": \"sendPolicy9509\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bc9e03eb-f8f5-4d92-ac10-35e6fc41ce99_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "ba3f06e4-a3d7-4017-a77a-41ad62e12bb9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191230Z:ba3f06e4-a3d7-4017-a77a-41ad62e12bb9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"newloggerDescription9459\",\r\n \"credentials\": {\r\n \"name\": \"eventhubname6028\",\r\n \"connectionString\": \"Endpoint=sb://eventhubnamespace1624.servicebus.windows.net/;SharedAccessKeyName=sendPolicy9509;SharedAccessKey=Jg4VrWYGFZ3DQHkzfr+AYhvhdS3XVKMecXE0ZVT8uFg=;EntityPath=eventhubname6028\"\r\n },\r\n \"loggerType\": \"azureEventHub\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "389" + ], + "x-ms-client-request-id": [ + "fe8ba8b0-8325-4f27-9616-de6229e6f142" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055\",\r\n \"type\": \"Microsoft.ApiManagement/service/loggers\",\r\n \"name\": \"newlogger7055\",\r\n \"properties\": {\r\n \"loggerType\": \"azureEventHub\",\r\n \"description\": \"newloggerDescription9459\",\r\n \"credentials\": {\r\n \"name\": \"eventhubname6028\",\r\n \"connectionString\": \"{{5982242450f4b80f1009c31c}}\"\r\n },\r\n \"isBuffered\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "521" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD5k=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a11f808c-16b8-451d-a94b-83d3343fd20b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "ad4e8e15-9a55-40c3-9a22-e4893d98bd8f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191236Z:ad4e8e15-9a55-40c3-9a22-e4893d98bd8f" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0ad8532a-07cc-4f2f-9659-037da04c485a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055\",\r\n \"type\": \"Microsoft.ApiManagement/service/loggers\",\r\n \"name\": \"newlogger7055\",\r\n \"properties\": {\r\n \"loggerType\": \"azureEventHub\",\r\n \"description\": \"newloggerDescription9459\",\r\n \"credentials\": {\r\n \"name\": \"eventhubname6028\",\r\n \"connectionString\": \"{{Logger-Credentials-5982242450f4b80f1009c31d}}\"\r\n },\r\n \"isBuffered\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD5k=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dc4df788-2a27-42d2-b535-53800f470f92" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "f9af1c24-f2a7-4fd5-8b93-1f56e29515fc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191236Z:f9af1c24-f2a7-4fd5-8b93-1f56e29515fc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "62e9365a-407c-47db-880c-687cfbed3785" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055\",\r\n \"type\": \"Microsoft.ApiManagement/service/loggers\",\r\n \"name\": \"newlogger7055\",\r\n \"properties\": {\r\n \"loggerType\": \"azureEventHub\",\r\n \"description\": \"patchedDescription3602\",\r\n \"credentials\": {\r\n \"name\": \"eventhubname6028\",\r\n \"connectionString\": \"{{Logger-Credentials-5982242450f4b80f1009c31d}}\"\r\n },\r\n \"isBuffered\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD5o=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "050b9afc-e5aa-4637-ac7e-5358dd7abfab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "210726b4-df11-45b2-b097-494414d1afbe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191238Z:210726b4-df11-45b2-b097-494414d1afbe" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "86d9d7a8-45c9-4156-ab48-b22f4f155a70" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Logger not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "82" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cd266c7a-8098-488c-8f73-9bfc9aaabcab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "5b166d02-5516-477d-9419-f176d0a4df47" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191239Z:5b166d02-5516-477d-9419-f176d0a4df47" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ab2909e5-fb5a-4c45-b005-f538361a7696" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055\",\r\n \"type\": \"Microsoft.ApiManagement/service/loggers\",\r\n \"name\": \"newlogger7055\",\r\n \"properties\": {\r\n \"loggerType\": \"azureEventHub\",\r\n \"description\": \"newloggerDescription9459\",\r\n \"credentials\": {\r\n \"name\": \"eventhubname6028\",\r\n \"connectionString\": \"{{Logger-Credentials-5982242450f4b80f1009c31d}}\"\r\n },\r\n \"isBuffered\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1686fa7e-2e0d-415e-819e-ff1978877cda" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "ac34db76-6c82-4876-abb3-b5a7686303bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191237Z:ac34db76-6c82-4876-abb3-b5a7686303bd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"loggerType\": \"azureEventHub\",\r\n \"description\": \"patchedDescription3602\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "109" + ], + "x-ms-client-request-id": [ + "d9725de4-c224-495e-acaa-758d91817a08" + ], + "If-Match": [ + "\"AAAAAAAAD5k=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a0e6595b-33d0-4fcb-a9f4-e29b1a79981c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "3230d4da-d164-4286-aba5-7067de019a03" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191238Z:3230d4da-d164-4286-aba5-7067de019a03" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ad52be8d-e5bf-4284-bbc4-02e39311b551" + ], + "If-Match": [ + "\"AAAAAAAAD5o=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8c31dd32-3e8c-40f7-a718-17aef206f7e3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "7e3f9405-465e-4de5-b6bd-fb574c362a70" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191239Z:7e3f9405-465e-4de5-b6bd-fb574c362a70" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/loggers/newlogger7055?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9sb2dnZXJzL25ld2xvZ2dlcjcwNTU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "51abbaba-da46-4405-8d0c-832caabe109e" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d2fd12e0-f982-4eca-8a8f-a214bd46c5c9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "2a824a0a-faec-4895-b50e-32357ba4ffe1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191239Z:2a824a0a-faec-4895-b50e-32357ba4ffe1" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/eventhubs/eventhubname6028?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0L2V2ZW50aHVicy9ldmVudGh1Ym5hbWU2MDI4P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6b1c4a22-997a-45a6-b3e0-513ea8b1851d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "513c3bed-a7ed-43ea-9ea7-ea899b8b4c42" + ], + "x-ms-correlation-request-id": [ + "513c3bed-a7ed-43ea-9ea7-ea899b8b4c42" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191240Z:513c3bed-a7ed-43ea-9ea7-ea899b8b4c42" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fc889d15-cfc0-4998-bc26-0ba4ff115d1b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:12:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/operationresults/eventHubNamespace1624?api-version=2015-08-01" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "d7621502-2e24-4195-850f-6926bab8a318_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "ec6170ae-5a62-4434-8803-390c6eb16ee2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191241Z:ec6170ae-5a62-4434-8803-390c6eb16ee2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.EventHub/namespaces/eventHubNamespace1624/operationresults/eventHubNamespace1624?api-version=2015-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkV2ZW50SHViL25hbWVzcGFjZXMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0L29wZXJhdGlvbnJlc3VsdHMvZXZlbnRIdWJOYW1lc3BhY2UxNjI0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.EventHub.EventHubManagementClient/1.2.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Service-Bus-Resource-Provider/SN1", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "8c5dbcd6-34c9-4a04-bcd8-54557992833b_M3_M3" + ], + "Server-SB": [ + "Service-Bus-Resource-Provider/SN1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "3305f74b-82cb-47c5-91f9-5f4e5224371c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191311Z:3305f74b-82cb-47c5-91f9-5f4e5224371c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "newlogger7055", + "eventHubNamespace1624", + "eventhubname6028", + "sendPolicy9509", + "newloggerDescription9459", + "patchedDescription3602" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.OpenIdConnectProviderTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.OpenIdConnectProviderTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..e41e94208f77 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.OpenIdConnectProviderTests/CreateListUpdateDelete.json @@ -0,0 +1,1030 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "3adb6433-c9ba-467f-8e5e-c0bb4e398877" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "010db530-6d1f-48e8-abce-e894f4f0ec0a", + "8374b9b4-a096-4115-9edd-60c2a38b2010" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "161f2287-073d-485a-bbba-20f8c6fc5c99" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191101Z:161f2287-073d-485a-bbba-20f8c6fc5c99" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b800fe74-246a-4812-8721-b9b8e8c47fd3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "89bc1ec0-7cda-449b-a74d-b8bb5a363c9c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "e463f8fc-9e9a-4552-bd6a-872dddb4b55c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191101Z:e463f8fc-9e9a-4552-bd6a-872dddb4b55c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDU1MTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"openIdName2000\",\r\n \"metadataEndpoint\": \"https://provider418.endpoint4223\",\r\n \"clientId\": \"clientId2164\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ], + "x-ms-client-request-id": [ + "cd11297b-3712-4ade-8529-743574f1b9c0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId5510\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName2000\",\r\n \"description\": null,\r\n \"metadataEndpoint\": \"https://provider418.endpoint4223\",\r\n \"clientId\": \"clientId2164\",\r\n \"clientSecret\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "498" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD30=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "03eee779-6d21-4616-a341-1f439f119cc2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "65828dc5-72cb-4948-a6f8-07a70f6810cd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191102Z:65828dc5-72cb-4948-a6f8-07a70f6810cd" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDU1MTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2acade28-47cb-4825-9f40-89d9961c186d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId5510\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName2000\",\r\n \"description\": null,\r\n \"metadataEndpoint\": \"https://provider418.endpoint4223\",\r\n \"clientId\": \"clientId2164\",\r\n \"clientSecret\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD30=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8b205294-0a1a-4a99-ae62-970ce746b964" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "fe400c83-462f-4d2b-91e9-05bef35ebe0b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191102Z:fe400c83-462f-4d2b-91e9-05bef35ebe0b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDU1MTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e4443da3-1e13-484e-94f5-2a83c44ee649" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"OpenidConnectProvider not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a8c2ba25-754c-4e80-a66c-2ef4b725ae0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "82e66b79-287e-4032-b61b-ed9db08a78a9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191103Z:82e66b79-287e-4032-b61b-ed9db08a78a9" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"openIdName6716\",\r\n \"description\": \"description6618\",\r\n \"metadataEndpoint\": \"https://provider9197.endpoint6751\",\r\n \"clientId\": \"clientId751\",\r\n \"clientSecret\": \"clientSecret3875\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "239" + ], + "x-ms-client-request-id": [ + "5ee2ca8e-8eed-4ee4-8abd-d3513a2f389d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId4382\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName6716\",\r\n \"description\": \"description6618\",\r\n \"metadataEndpoint\": \"https://provider9197.endpoint6751\",\r\n \"clientId\": \"clientId751\",\r\n \"clientSecret\": \"clientSecret3875\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "525" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD34=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fa9697f5-c87c-43b2-b813-33a2f7b3a052" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "41ea224b-90e9-46c1-bfb9-9256a6e918b8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191102Z:41ea224b-90e9-46c1-bfb9-9256a6e918b8" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7c7cafb9-0e0a-4edf-8af9-6a60d5dd4a58" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId4382\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName6716\",\r\n \"description\": \"description6618\",\r\n \"metadataEndpoint\": \"https://provider9197.endpoint6751\",\r\n \"clientId\": \"clientId751\",\r\n \"clientSecret\": \"clientSecret3875\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD34=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f711dfb8-a553-466f-b739-9b74a50b6c94" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "7981ac30-2399-4c0e-81fa-7f4d720f4bee" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191102Z:7981ac30-2399-4c0e-81fa-7f4d720f4bee" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1dc70336-111f-48ed-b77a-e25a248eb45d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId4382\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName6716\",\r\n \"description\": \"description6618\",\r\n \"metadataEndpoint\": \"https://provider2355.endpoint7041\",\r\n \"clientId\": \"updatedClient2694\",\r\n \"clientSecret\": \"clientSecret3875\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD38=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6b403941-969d-4645-a835-3bcb3fe41337" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "0155d671-4443-4be9-a014-8997fdc41359" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191103Z:0155d671-4443-4be9-a014-8997fdc41359" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0b3a4152-9473-4673-94f3-4aa05192a942" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"OpenidConnectProvider not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d6198bf9-de41-4715-8ae7-af7f2810d6da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "758470d9-ffaa-4143-8b13-dde79d4b19fa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191104Z:758470d9-ffaa-4143-8b13-dde79d4b19fa" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a43f3ecd-1734-461d-a11b-9ac27478a973" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId5510\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName2000\",\r\n \"description\": null,\r\n \"metadataEndpoint\": \"https://provider418.endpoint4223\",\r\n \"clientId\": \"clientId2164\",\r\n \"clientSecret\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId4382\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName6716\",\r\n \"description\": \"description6618\",\r\n \"metadataEndpoint\": \"https://provider9197.endpoint6751\",\r\n \"clientId\": \"clientId751\",\r\n \"clientSecret\": \"clientSecret3875\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f33022d2-b8b2-41e7-99ce-8cc382332bc8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "71596fda-ca7d-4cad-85b4-4c8554bacd79" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191103Z:71596fda-ca7d-4cad-85b4-4c8554bacd79" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzPyR0b3A9MSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0fdbd387-9de8-4b28-9d80-aa08a3dc9046" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510\",\r\n \"type\": \"Microsoft.ApiManagement/service/openidConnectProviders\",\r\n \"name\": \"openId5510\",\r\n \"properties\": {\r\n \"displayName\": \"openIdName2000\",\r\n \"description\": null,\r\n \"metadataEndpoint\": \"https://provider418.endpoint4223\",\r\n \"clientId\": \"clientId2164\",\r\n \"clientSecret\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a6e8d83f-2721-4536-a141-43122f321d45" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "33716d92-131d-455f-bea1-dbdbf777b77d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191103Z:33716d92-131d-455f-bea1-dbdbf777b77d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDU1MTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "50ec31aa-bbca-42a0-ad49-80f1882cd717" + ], + "If-Match": [ + "\"AAAAAAAAD30=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7367c803-5996-4a83-a559-1aa6a6376031" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "75e0beeb-cb0d-46c2-bc9b-5c89fc6a49d4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191103Z:75e0beeb-cb0d-46c2-bc9b-5c89fc6a49d4" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId5510?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDU1MTA/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11104c93-c6d6-44fc-9a28-62d46641fffa" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8c0fdd3e-dc8a-4b57-92c5-1e330d021e80" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "137fe1d7-e143-4938-b53d-4c7a319847f0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191104Z:137fe1d7-e143-4938-b53d-4c7a319847f0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"metadataEndpoint\": \"https://provider2355.endpoint7041\",\r\n \"clientId\": \"updatedClient2694\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "127" + ], + "x-ms-client-request-id": [ + "bda7ac22-3e0b-4354-a3aa-e6b896f6b4c8" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "71132ed3-a9e5-4b45-9744-ddfa633d6687" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "2135431b-265f-43b9-bfee-e469384326dc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191103Z:2135431b-265f-43b9-bfee-e469384326dc" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a521d4a5-938c-4883-b25d-3b52c9b44d8f" + ], + "If-Match": [ + "\"AAAAAAAAD38=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ff97acaf-9dc5-4fb1-a784-dd2b762ec0c4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "090c2600-e921-4a4d-af58-5136a0e5d639" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191104Z:090c2600-e921-4a4d-af58-5136a0e5d639" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/openidConnectProviders/openId4382?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9vcGVuaWRDb25uZWN0UHJvdmlkZXJzL29wZW5JZDQzODI/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9d97dd89-4ce3-49ef-9d1f-d09d209c3316" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5c6e2309-98fc-47ea-b670-0fe0c25b85f8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "57f1e859-2d8a-40eb-8a7e-2fa7def5968c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191104Z:57f1e859-2d8a-40eb-8a7e-2fa7def5968c" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "openId5510", + "openId4382", + "openIdName2000", + "clientId2164", + "openIdName6716", + "clientId751", + "clientSecret3875", + "description6618", + "updatedClient2694" + ], + "GetHttpsUrl": [ + "provider418", + "endpoint4223", + "provider9197", + "endpoint6751", + "provider2355", + "endpoint7041" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PolicyTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PolicyTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..aedbd88f8367 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PolicyTests/CreateListUpdateDelete.json @@ -0,0 +1,1632 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "1a577dd2-f1e6-4c5b-83ae-f4e459070856" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "952a8a5f-8df3-4955-8fcb-86342d603c78", + "bc45ba00-bd14-47c0-8ce2-c78bf6072a5a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "9900910f-8384-4832-9120-9f5b12ede916" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190949Z:9900910f-8384-4832-9120-9f5b12ede916" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "654aa0d0-bdba-4e1b-8564-6b8e7da9a4da" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fd31f271-e0f1-4654-bf22-7d8c470b8e97" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "632bc8c5-e11f-4ad0-9a3f-c9362113333a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190949Z:632bc8c5-e11f-4ad0-9a3f-c9362113333a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wb2xpY2llcy9wb2xpY3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e558e33d-e23e-4985-a57b-bcb22aa369d6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAADpE=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "acb103ca-88a2-4e38-897b-15aa36d2a007" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "61c43c19-1505-4b7c-a364-b6dccb8bd5f4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190951Z:61c43c19-1505-4b7c-a364-b6dccb8bd5f4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wb2xpY2llcy9wb2xpY3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ebffac0-ecb8-4f5a-9265-cfacd82e72a6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAADpE=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "15b6f585-ac10-4630-a767-88bead8b5f28" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "ac8253af-3f8b-4a31-b8b2-2777a19c4553" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190954Z:ac8253af-3f8b-4a31-b8b2-2777a19c4553" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wb2xpY2llcy9wb2xpY3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "52cad490-20a0-482e-8cb0-5a249bcd9dee" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"PoliciesConfiguration not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a541b667-d75e-47e2-a67b-976f4610fc8f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "3767df49-1d95-440b-bf52-86ea20357127" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190955Z:3767df49-1d95-440b-bf52-86ea20357127" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wb2xpY2llcy9wb2xpY3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1064" + ], + "x-ms-client-request-id": [ + "9f5f3e86-79e3-487c-b654-59ad6869b2e9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAADpE=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "49dfdf9d-cb56-4c11-bccd-c492b9b6abcd" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "0827c49d-9367-4ce1-b024-aa779043fb7e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190954Z:0827c49d-9367-4ce1-b024-aa779043fb7e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wb2xpY2llcy9wb2xpY3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1064" + ], + "x-ms-client-request-id": [ + "8d4e0938-9b75-4c8f-9382-a186a9fc99ce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1314" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD1M=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f0ecbd52-4822-4808-b08a-398011539784" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "996911b1-3a32-42d9-9390-f4e996c79ae7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190956Z:996911b1-3a32-42d9-9390-f4e996c79ae7" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wb2xpY2llcy9wb2xpY3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "15d95406-d815-4481-aa42-05d0f605fc75" + ], + "If-Match": [ + "\"AAAAAAAADpE=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b4d5e45b-1f2a-49e5-a22e-3e59fc72f3db" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "d298e1ea-903c-4719-ab29-9d5b19eddf67" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190955Z:d298e1ea-903c-4719-ab29-9d5b19eddf67" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e8df15f0-64c6-495b-ad8f-67dd58c0357b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e12ae5da-3dd2-4b21-b59a-487f434dba6a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "ca791a58-5b85-4d72-ada3-9b42df4b8ddf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190956Z:ca791a58-5b85-4d72-ada3-9b42df4b8ddf" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/%2Fsubscriptions%2Fbab08e11-7b12-4354-9fd1-4b5d64d40b68%2FresourceGroups%2FApi-Default-CentralUS%2Fproviders%2FMicrosoft.ApiManagement%2Fservice%2Fsdktestservice%2Fapis%2Fecho-api/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzLyUyRnN1YnNjcmlwdGlvbnMlMkZiYWIwOGUxMS03YjEyLTQzNTQtOWZkMS00YjVkNjRkNDBiNjglMkZyZXNvdXJjZUdyb3VwcyUyRkFwaS1EZWZhdWx0LUNlbnRyYWxVUyUyRnByb3ZpZGVycyUyRk1pY3Jvc29mdC5BcGlNYW5hZ2VtZW50JTJGc2VydmljZSUyRnNka3Rlc3RzZXJ2aWNlJTJGYXBpcyUyRmVjaG8tYXBpL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7c54c345-95f2-475f-b400-dbd7f349e0ae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3122fdcd-2306-4744-9ed2-52980a8bc455" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "b09238fa-1b41-4e21-83f5-51ca6b6edeee" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190956Z:b09238fa-1b41-4e21-83f5-51ca6b6edeee" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n true\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "336" + ], + "x-ms-client-request-id": [ + "4310d2c5-0fe5-44b4-8f29-688a5f36fb6e" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n true\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "605" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD1s=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "86a6cbbe-acb5-4108-83ad-7c2514da9d92" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "7d92d7c2-d7a6-4e38-87ac-6b04c58c301b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190957Z:7d92d7c2-d7a6-4e38-87ac-6b04c58c301b" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "59c7d7e2-d524-4443-86ba-fadc1305a25a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n true\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD1s=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c374ea0c-566c-4d9f-bc41-31e1a6d37ead" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "cab39336-3a94-4830-a5b4-fbca94ae9f5a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190957Z:cab39336-3a94-4830-a5b4-fbca94ae9f5a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "be3df518-654e-4ecd-ad7e-4f6392d72b23" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"PoliciesConfiguration not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6832a154-53f1-4dd6-ae51-e89888f8ecdc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "003ae4fa-c505-4386-8423-c03ec5420ec0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190958Z:003ae4fa-c505-4386-8423-c03ec5420ec0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "32260e18-db53-47f6-a4ef-d8cdf472392e" + ], + "If-Match": [ + "\"AAAAAAAAD1s=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d8673bf6-a0c5-428c-aeb3-bed1f5f09150" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "6fd2e662-c8fa-4876-a18e-838bc0ff5094" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190958Z:6fd2e662-c8fa-4876-a18e-838bc0ff5094" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "615e6ae6-e702-4593-919d-750b8726e710" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/create-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"create-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Create resource\",\r\n \"method\": \"POST\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"modify-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Modify Resource\",\r\n \"method\": \"PUT\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a PUT call handled by the same \\\"echo\\\" backend as above. You can now specify a request body in addition to headers and it will be returned as well.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/remove-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"remove-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Remove resource\",\r\n \"method\": \"DELETE\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a DELETE call which traditionally deletes the resource. It is based on the same \\\"echo\\\" backend as in all other operations so nothing is actually deleted.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-header-only\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-header-only\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve header only\",\r\n \"method\": \"HEAD\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"The HEAD operation returns only headers. In this demonstration a policy is used to set additional headers when the response is returned and to enable JSONP.\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-resource\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-resource\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve resource\",\r\n \"method\": \"GET\",\r\n \"urlTemplate\": \"/resource\",\r\n \"description\": \"A demonstration of a GET call on a sample resource. It is handled by an \\\"echo\\\" backend which returns a response equal to the request (the supplied headers and body are being returned as received).\",\r\n \"policies\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/retrieve-resource-cached\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations\",\r\n \"name\": \"retrieve-resource-cached\",\r\n \"properties\": {\r\n \"displayName\": \"Retrieve resource (cached)\",\r\n \"method\": \"GET\",\r\n \"urlTemplate\": \"/resource-cached\",\r\n \"description\": \"A demonstration of a GET call with caching enabled on the same \\\"echo\\\" backend as above. Cache TTL is set to 1 hour. When you make the first request the headers you supplied will be cached. Subsequent calls will return the same headers as the first time even if you change them in your request.\",\r\n \"policies\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "38b8d126-6219-4c6b-bcc8-a0b1ab3aeaa7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "192e7175-e23b-4c32-9590-e816b590e860" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190958Z:192e7175-e23b-4c32-9590-e816b590e860" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvbW9kaWZ5LXJlc291cmNlL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2f78ab24-2fe1-4a8e-b9f9-b88c3655b3e0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"PoliciesConfiguration not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "88a7e925-06e5-4175-9b9e-e8dd5f2032ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "e755e1fe-35bd-487e-9927-4fc00bf6ddff" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190959Z:e755e1fe-35bd-487e-9927-4fc00bf6ddff" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvbW9kaWZ5LXJlc291cmNlL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ef28cb4b-afa7-4072-99c1-e30e7235ed6d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD14=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "752f355d-fee7-4a23-b83c-76745f9dec5c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "3f4276a9-c45b-48a7-b2f0-247c61516b39" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191000Z:3f4276a9-c45b-48a7-b2f0-247c61516b39" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvbW9kaWZ5LXJlc291cmNlL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "218964ca-7d0a-43d8-8a61-cb0766707856" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"PoliciesConfiguration not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1fa9068d-0ca3-419a-884f-529c52d0b6a8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "e0c93279-1679-41c0-a7dd-ea10273a40bc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191000Z:e0c93279-1679-41c0-a7dd-ea10273a40bc" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvbW9kaWZ5LXJlc291cmNlL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "267" + ], + "x-ms-client-request-id": [ + "6597f734-668d-4e75-8daf-7a3838e93374" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis/operations/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "574" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD14=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2b5d7bb9-185c-4ba4-a177-68ff1b9b3ce1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "f16235be-93d6-4959-a0d9-4cd6fc1cfbcf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T190959Z:f16235be-93d6-4959-a0d9-4cd6fc1cfbcf" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api/operations/modify-resource/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpL29wZXJhdGlvbnMvbW9kaWZ5LXJlc291cmNlL3BvbGljaWVzL3BvbGljeT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7d52cf36-f6b3-4ecc-a7fc-9b03d91fa13b" + ], + "If-Match": [ + "\"AAAAAAAAD14=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:09:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "db313ec3-2075-4743-83a5-598f64069f0f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "683e0065-8fda-4dd3-b6d4-b5ddf3b299d0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191000Z:683e0065-8fda-4dd3-b6d4-b5ddf3b299d0" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products?$filter=name%20eq%20'Unlimited'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cz8kZmlsdGVyPW5hbWUlMjBlcSUyMCdVbmxpbWl0ZWQnJmFwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2bd7936e-5001-491e-80b2-dc09693cc0bd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"unlimited\",\r\n \"properties\": {\r\n \"displayName\": \"Unlimited\",\r\n \"description\": \"Subscribers have completely unlimited access to the API. Administrator approval is required.\",\r\n \"terms\": null,\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 1,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f27b402a-318a-42e5-bc97-66159afb2c3a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "4627d4fb-8fce-4df4-8a9d-2470dccf55f5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191001Z:4627d4fb-8fce-4df4-8a9d-2470dccf55f5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy91bmxpbWl0ZWQvcG9saWNpZXMvcG9saWN5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "34f92fc7-a4cf-43d5-912e-38e1fc3fd3fa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"PoliciesConfiguration not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "23a6f486-2958-4c8c-b63f-ffdcaa1ff126" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "a4132bd0-2249-49ba-aba4-a0c9dccac519" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191001Z:a4132bd0-2249-49ba-aba4-a0c9dccac519" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy91bmxpbWl0ZWQvcG9saWNpZXMvcG9saWN5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fbeb641f-cd5d-49bd-908d-2d899b17d5d1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD2E=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e0133f46-0d6f-4a3a-809c-d295c60152b4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "a008f643-303a-48f1-9271-fb53505f18eb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191003Z:a008f643-303a-48f1-9271-fb53505f18eb" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy91bmxpbWl0ZWQvcG9saWNpZXMvcG9saWN5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a63b9221-b6a2-412c-ad40-1038f38f7f5d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"PoliciesConfiguration not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "97" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f20288ce-31a4-4ac1-b5fa-6c2360b5ae63" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "e25d59d7-8414-4c00-bedb-4cabc09028a8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191003Z:e25d59d7-8414-4c00-bedb-4cabc09028a8" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy91bmxpbWl0ZWQvcG9saWNpZXMvcG9saWN5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "334" + ], + "x-ms-client-request-id": [ + "aaa10edd-38bc-4c93-86e2-571febf6eed7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/policies\",\r\n \"name\": \"policy\",\r\n \"properties\": {\r\n \"policyContent\": \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD2E=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fc42c0fe-84ae-45fd-aba1-6d5be202e7a6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "5c7cf9ae-c746-478f-9b1b-feecf4116220" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191002Z:5c7cf9ae-c746-478f-9b1b-feecf4116220" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited/policies/policy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy91bmxpbWl0ZWQvcG9saWNpZXMvcG9saWN5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "03bf916a-33df-4fc3-a1a1-1f4d684ec32f" + ], + "If-Match": [ + "\"AAAAAAAAD2E=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:10:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "73dd8bb0-8040-4364-9572-8da665cbcb87" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "0812a7ed-ee76-4d59-875e-806e3e6c3e28" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191003Z:0812a7ed-ee76-4d59-875e-806e3e6c3e28" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/ApisListAddRemove.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/ApisListAddRemove.json new file mode 100644 index 000000000000..76aec2447b68 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/ApisListAddRemove.json @@ -0,0 +1,574 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "ac41ff05-1cd7-4727-821e-7e72fa3131a5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7c647eef-018b-42ec-a136-ee3ed18677cc", + "6fbe58b8-3be7-4f3f-b38e-30d60d9c9fcc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "6f5d6f05-37f9-47a6-9fa1-40613b1bd2ae" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191359Z:6f5d6f05-37f9-47a6-9fa1-40613b1bd2ae" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "70466cb3-c8ac-49cb-8642-b0dd96196e0b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "32a70a6d-3184-4386-9d3b-6c7e85800948" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "74ef2d89-3357-46d9-82fc-e4d5aba7c86a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191359Z:74ef2d89-3357-46d9-82fc-e4d5aba7c86a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products?$filter=name%20eq%20'Starter'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cz8kZmlsdGVyPW5hbWUlMjBlcSUyMCdTdGFydGVyJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2c76010f-809e-43e1-946a-87ad6c4881ed" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"starter\",\r\n \"properties\": {\r\n \"displayName\": \"Starter\",\r\n \"description\": \"Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.\",\r\n \"terms\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": false,\r\n \"subscriptionsLimit\": 2147483647,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0866485d-6de2-45d0-8cd5-b5b586d8e022" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "bf3ec5ad-6d46-441f-8172-d9795c63fd2f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191359Z:bf3ec5ad-6d46-441f-8172-d9795c63fd2f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2FwaXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2d4f2a55-6fcc-42be-97c2-5bece7a9f937" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a6e8271f-e521-44a6-aa9f-ffd20549f95d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "0509adf0-d274-43be-9f47-d73485f09f5a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191400Z:0509adf0-d274-43be-9f47-d73485f09f5a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2FwaXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "752ba745-55a7-461b-b213-0ccfcecf1f64" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "56c267b2-cda2-4ba6-a4d5-c4035bcabfbb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "5f0f22c6-3bf2-4fb3-be0b-f45e9ae7f235" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191401Z:5f0f22c6-3bf2-4fb3-be0b-f45e9ae7f235" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/apis?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2FwaXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "237b0c10-d476-49b4-8a1f-8c547fee918f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "df0f39a3-d242-46d7-8c8a-69786e509d37" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "7526bb11-3190-4645-a20e-aad6870560b7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191401Z:7526bb11-3190-4645-a20e-aad6870560b7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9hcGlzL2VjaG8tYXBpP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "252c9715-d13f-4c24-b5ef-f83ed82c4478" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": {\r\n \"oAuth2\": null,\r\n \"openid\": null\r\n },\r\n \"subscriptionKeyParameterNames\": {\r\n \"header\": \"Ocp-Apim-Subscription-Key\",\r\n \"query\": \"subscription-key\"\r\n },\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD10=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "337d4738-61e9-4741-8c97-11681b9840db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "61c8269e-5443-4f57-8482-0af25992a1a0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191400Z:61c8269e-5443-4f57-8482-0af25992a1a0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/apis/echo-api?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2FwaXMvZWNoby1hcGk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a4ffd2cd-1829-4294-8cb4-50164d11a166" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cc6e941a-59ec-4046-9ba7-314cf33a2618" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "aed72beb-be17-4d69-b241-01ec8f9df377" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191401Z:aed72beb-be17-4d69-b241-01ec8f9df377" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/apis/echo-api?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2FwaXMvZWNoby1hcGk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "82def67d-49fc-4646-85f8-e7086154e381" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": null,\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "569" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD10=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a4c39beb-aaa4-4bef-9821-56d4ab31cebb" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "b6812998-54a1-4bcc-aeb9-f5beb6a21623" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191401Z:b6812998-54a1-4bcc-aeb9-f5beb6a21623" + ] + }, + "StatusCode": 201 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..ce83406a86a5 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/CreateListUpdateDelete.json @@ -0,0 +1,654 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "abcc0afe-2a73-4b68-83f7-30d7cc6fcd3f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "221f84d8-12f1-4584-98f8-8d4d8a8dbcdd", + "76c5f523-a45d-4f68-a7a2-712d6293b0a5" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "606c2f52-a7bf-4726-854e-e099f5eb2276" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191324Z:606c2f52-a7bf-4726-854e-e099f5eb2276" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5403fb42-18d7-4f1f-a5ea-3722c630a724" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9c3fa446-f1a3-4c51-8751-836e74cd75b9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "b877b9e1-ec3f-47e4-976c-39bac70b7da1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191324Z:b877b9e1-ec3f-47e4-976c-39bac70b7da1" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5131fd3e-fffd-4ef0-b043-361246a768b0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"starter\",\r\n \"properties\": {\r\n \"displayName\": \"Starter\",\r\n \"description\": \"Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.\",\r\n \"terms\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": false,\r\n \"subscriptionsLimit\": 2147483647,\r\n \"state\": \"published\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"unlimited\",\r\n \"properties\": {\r\n \"displayName\": \"Unlimited\",\r\n \"description\": \"Subscribers have completely unlimited access to the API. Administrator approval is required.\",\r\n \"terms\": null,\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 1,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b14c4aaa-e0e5-412c-baa5-3f09d8357a18" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "4d88a782-229e-4e2d-8311-c6f52252d630" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191324Z:4d88a782-229e-4e2d-8311-c6f52252d630" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"productDescription7219\",\r\n \"terms\": \"productTerms7740\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 10,\r\n \"state\": \"notPublished\",\r\n \"displayName\": \"productName5530\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "273" + ], + "x-ms-client-request-id": [ + "8c60dece-f98b-4a6f-82c0-32a21d37216e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"newproduct8620\",\r\n \"properties\": {\r\n \"displayName\": \"productName5530\",\r\n \"description\": \"productDescription7219\",\r\n \"terms\": \"productTerms7740\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 10,\r\n \"state\": \"notPublished\",\r\n \"groups\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/administrators\",\r\n \"name\": \"Administrators\",\r\n \"description\": \"Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1054" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD5s=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d167fef4-96fd-42b9-a46d-8cba6cb71b8b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "e7e47305-8d9c-4da2-b351-d7ab40910ca1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191325Z:e7e47305-8d9c-4da2-b351-d7ab40910ca1" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7a68f71e-b848-41c5-8043-796338bf4fd1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"newproduct8620\",\r\n \"properties\": {\r\n \"displayName\": \"productName5530\",\r\n \"description\": \"productDescription7219\",\r\n \"terms\": \"productTerms7740\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 10,\r\n \"state\": \"notPublished\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD5s=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "99dc26b3-7c34-49a4-aee6-e0cc571b5ccb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "8f3b40e2-c107-4d9b-95d1-212d6b25819c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191326Z:8f3b40e2-c107-4d9b-95d1-212d6b25819c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ec92b095-eb14-4f5d-966f-c44cb568fd27" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"newproduct8620\",\r\n \"properties\": {\r\n \"displayName\": \"productName6190\",\r\n \"description\": \"productDescription733\",\r\n \"terms\": \"productTerms3444\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": true,\r\n \"subscriptionsLimit\": 10,\r\n \"state\": \"notPublished\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD58=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0b8ce750-4f89-4453-a66b-bbbad9123d0f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "75174b6d-595b-44f9-a59d-f7921020e223" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191326Z:75174b6d-595b-44f9-a59d-f7921020e223" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b081ad8c-bc92-497c-a142-17fbbd404dae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Product not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "83" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e2cfb89b-9ff4-4d1c-9472-5a28a740124d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "f482b177-2795-48d9-92b1-ea2523066712" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191327Z:f482b177-2795-48d9-92b1-ea2523066712" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"description\": \"productDescription733\",\r\n \"terms\": \"productTerms3444\",\r\n \"name\": \"productName6190\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "138" + ], + "x-ms-client-request-id": [ + "01050e9b-0265-4611-813d-b6d367cbca00" + ], + "If-Match": [ + "\"AAAAAAAAD5s=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "52e07152-1629-4031-b8c9-4de404fdd858" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "734becde-5134-4b36-9b0a-08c92438ea4e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191326Z:734becde-5134-4b36-9b0a-08c92438ea4e" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?deleteSubscriptions=true&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9kZWxldGVTdWJzY3JpcHRpb25zPXRydWUmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f3e90521-1d62-490e-8a65-e7c821ab8fe5" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1bde2523-9ba6-450d-bd8c-e1a97e5b31c4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "d11fab97-0b08-4577-8616-8cebc4155957" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191327Z:d11fab97-0b08-4577-8616-8cebc4155957" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/newproduct8620?deleteSubscriptions=true&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9uZXdwcm9kdWN0ODYyMD9kZWxldGVTdWJzY3JpcHRpb25zPXRydWUmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0de24d46-c4f8-42a9-85f7-49830ebacaf6" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8535af2a-5509-4199-8d0e-6f1389dd5421" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "219b59b6-08ec-421d-a092-adec46bfdbf3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191327Z:219b59b6-08ec-421d-a092-adec46bfdbf3" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "newproduct8620", + "productName5530", + "productDescription7219", + "productTerms7740", + "productName6190", + "productDescription733", + "productTerms3444" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/GroupsListAddRemove.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/GroupsListAddRemove.json new file mode 100644 index 000000000000..0d553d0c2945 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/GroupsListAddRemove.json @@ -0,0 +1,574 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "7ac2b90d-0609-40bb-b36c-430b87e80659" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "46b2184f-a78c-4799-b984-5c80bfe1d570", + "123500bf-ec1f-4b43-9270-b4dafb226048" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "bf7c946a-ff4c-4203-bee2-f360aa127307" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191348Z:bf7c946a-ff4c-4203-bee2-f360aa127307" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fc8f4fd4-1604-467e-9c9e-50bf287ee880" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9d816902-6b09-46f0-87a0-20e113c4f7ad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "48ff61e8-3135-4c47-8413-e4133949d13d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191348Z:48ff61e8-3135-4c47-8413-e4133949d13d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products?$filter=name%20eq%20'Starter'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cz8kZmlsdGVyPW5hbWUlMjBlcSUyMCdTdGFydGVyJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2fba0b63-0446-40db-8009-7a69dcfbc871" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"starter\",\r\n \"properties\": {\r\n \"displayName\": \"Starter\",\r\n \"description\": \"Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.\",\r\n \"terms\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": false,\r\n \"subscriptionsLimit\": 2147483647,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "77a1a553-7ab2-42d6-88ee-f08c826ec5ce" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "440d6166-a3df-4aba-b8c5-79d1ae3cc70a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191349Z:440d6166-a3df-4aba-b8c5-79d1ae3cc70a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2dyb3Vwcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb2a028d-46d8-47ad-9397-ebad06fadaea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/administrators\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"administrators\",\r\n \"properties\": {\r\n \"displayName\": \"Administrators\",\r\n \"description\": \"Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/guests\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"guests\",\r\n \"properties\": {\r\n \"displayName\": \"Guests\",\r\n \"description\": \"Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d362f8e7-1718-4580-9351-08d8b353af14" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "04049793-76e8-4c7b-8ff9-c6c22ed3bfb2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191349Z:04049793-76e8-4c7b-8ff9-c6c22ed3bfb2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2dyb3Vwcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "911160b9-2c14-4571-b351-36444ee6215a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/administrators\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"administrators\",\r\n \"properties\": {\r\n \"displayName\": \"Administrators\",\r\n \"description\": \"Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "219fc2bd-7751-45b6-a344-b596b2335725" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "e1671fef-cb26-4089-935d-503f03b7f8e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191351Z:e1671fef-cb26-4089-935d-503f03b7f8e7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2dyb3Vwcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43831e92-e370-41d9-9ec0-12d731f8e4ae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/administrators\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"administrators\",\r\n \"properties\": {\r\n \"displayName\": \"Administrators\",\r\n \"description\": \"Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/guests\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"guests\",\r\n \"properties\": {\r\n \"displayName\": \"Guests\",\r\n \"description\": \"Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "49d6f61d-b1e3-4a49-820c-65df31978522" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "a679220c-f4e2-45d5-a27c-854a2b8dedf2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191351Z:a679220c-f4e2-45d5-a27c-854a2b8dedf2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/guests?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvZ3Vlc3RzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "664198ed-42db-4c4d-bf40-186a6053a232" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/guests\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"guests\",\r\n \"properties\": {\r\n \"displayName\": \"Guests\",\r\n \"description\": \"Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAACGA=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d65652b1-d3a4-48f9-81f4-9d64be0631cb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "de7fb666-30fc-49b8-96db-502b895b309a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191350Z:de7fb666-30fc-49b8-96db-502b895b309a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/groups/guests?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2dyb3Vwcy9ndWVzdHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c797356a-253e-4968-8035-49b09d1a789e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a15196a6-c2e0-47f9-bc89-cbd8a922e0d9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "99ecd076-2178-43e1-bb34-b5a64551609b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191350Z:99ecd076-2178-43e1-bb34-b5a64551609b" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/groups/guests?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL2dyb3Vwcy9ndWVzdHM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5afa2c63-c069-418d-a11f-bac33236a014" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/guests\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/groups\",\r\n \"name\": \"guests\",\r\n \"properties\": {\r\n \"displayName\": \"Guests\",\r\n \"description\": \"Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "548" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAACGA=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f3fd3d13-9db2-4060-b405-8b710f931c5d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "3cdb7d04-7334-4ae1-8bb1-1af06f766d48" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191351Z:3cdb7d04-7334-4ae1-8bb1-1af06f766d48" + ] + }, + "StatusCode": 201 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/SubscriptionsList.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/SubscriptionsList.json new file mode 100644 index 000000000000..9904e347c034 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ProductTests/SubscriptionsList.json @@ -0,0 +1,272 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "2e8cf21e-3357-437f-be3a-402d1afa90a4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e08d65b0-1774-4444-9c81-162c2b88493c", + "3588028a-57af-4460-9e4f-bfcdc7fbaffb" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "f7b4d19e-ea7b-4b4c-a6f6-3e1621da4d3f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191338Z:f7b4d19e-ea7b-4b4c-a6f6-3e1621da4d3f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e5beed32-ad03-4e3d-90be-36167edeb976" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4b53c599-df93-4c18-a8a4-ad9047a83462" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "ff2a7a30-80be-400d-8ddc-29210e57e5ac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191338Z:ff2a7a30-80be-400d-8ddc-29210e57e5ac" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products?$filter=name%20eq%20'Starter'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cz8kZmlsdGVyPW5hbWUlMjBlcSUyMCdTdGFydGVyJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a799b972-cd6b-4768-bfa3-322e405fb0d5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"type\": \"Microsoft.ApiManagement/service/products\",\r\n \"name\": \"starter\",\r\n \"properties\": {\r\n \"displayName\": \"Starter\",\r\n \"description\": \"Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.\",\r\n \"terms\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"approvalRequired\": false,\r\n \"subscriptionsLimit\": 2147483647,\r\n \"state\": \"published\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bb587613-5867-4400-8117-99725e90b4cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "cf150549-3e00-4765-9313-789d64b6c902" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191339Z:cf150549-3e00-4765-9313-789d64b6c902" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter/subscriptions?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyL3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eef4be1c-cf73-4733-b650-acc339813d2f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001\",\r\n \"type\": \"Microsoft.ApiManagement/service/products/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070001\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"b39b8620186c45399dcc542df1b18652\",\r\n \"secondaryKey\": \"5f1d2ea1f546452f88c46d492033b0b7\",\r\n \"stateComment\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:13:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bea54265-b847-4605-ac65-3715328f31b6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "46ef7573-17d4-4425-a320-cb834f4ec138" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191339Z:46ef7573-17d4-4425-a320-cb834f4ec138" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PropertiesTest/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PropertiesTest/CreateListUpdateDelete.json new file mode 100644 index 000000000000..010c7eadef31 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.PropertiesTest/CreateListUpdateDelete.json @@ -0,0 +1,894 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "03c28309-66a1-477f-9c36-fa66f00a74fd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "74a52e07-a3b2-4b44-8a90-b6baf6e54708", + "f774d663-bb74-4583-9355-0804a5c286b7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "a93916bc-9c76-4f41-b347-124830728fe9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195715Z:a93916bc-9c76-4f41-b347-124830728fe9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fb3ffa3e-a609-4645-b919-4ce5d9351727" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3f1a557a-7df9-42f4-9cad-970bcb7eb059" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "1c0ce7d1-4968-479d-80a4-444fd2064fb7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195716Z:1c0ce7d1-4968-479d-80a4-444fd2064fb7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL25ld3Byb3BlcnR5ODE0Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"propertydisplay3987\",\r\n \"value\": \"propertyValue8165\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "105" + ], + "x-ms-client-request-id": [ + "78e1aa95-3ca3-4c22-9e09-2da56830c1b0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146\",\r\n \"type\": \"Microsoft.ApiManagement/service/properties\",\r\n \"name\": \"newproperty8146\",\r\n \"properties\": {\r\n \"displayName\": \"propertydisplay3987\",\r\n \"value\": \"propertyValue8165\",\r\n \"tags\": null,\r\n \"secret\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD+E=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "19fae7b3-8d46-499a-8996-964d2a691087" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "faa6a18d-6417-4a3e-8162-8e760351d44f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195717Z:faa6a18d-6417-4a3e-8162-8e760351d44f" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL25ld3Byb3BlcnR5ODE0Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b2c2002b-2662-4fda-9537-fb10fb039ac2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146\",\r\n \"type\": \"Microsoft.ApiManagement/service/properties\",\r\n \"name\": \"newproperty8146\",\r\n \"properties\": {\r\n \"displayName\": \"propertydisplay3987\",\r\n \"value\": \"propertyValue8165\",\r\n \"tags\": null,\r\n \"secret\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD+E=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0097823e-92b3-4d82-b5fa-ee63c2ede12e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "468e4b27-c3a8-459c-9cdc-5ccbc085879f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195718Z:468e4b27-c3a8-459c-9cdc-5ccbc085879f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL25ld3Byb3BlcnR5ODE0Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8b995b25-6a87-460f-a28f-d36ddc4dcd2a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Property not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "84" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "37cad332-80fe-4884-8853-0f334dc096ac" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "27e9c278-741d-4e50-8953-35d8654d71f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195719Z:27e9c278-741d-4e50-8953-35d8654d71f2" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL3NlY3JldHByb3BlcnR5NDI2OD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"tags\": [\r\n \"secret\"\r\n ],\r\n \"secret\": true,\r\n \"displayName\": \"secretPropertydisplay6508\",\r\n \"value\": \"secretPropertyValue2435\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "177" + ], + "x-ms-client-request-id": [ + "9a6a34a6-9593-46e6-a5c7-4a1ce63d6af4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268\",\r\n \"type\": \"Microsoft.ApiManagement/service/properties\",\r\n \"name\": \"secretproperty4268\",\r\n \"properties\": {\r\n \"displayName\": \"secretPropertydisplay6508\",\r\n \"value\": \"secretPropertyValue2435\",\r\n \"tags\": [\r\n \"secret\"\r\n ],\r\n \"secret\": true\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "455" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD+I=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "20c20a8d-49e6-47e6-9ea8-d0e9a83484d1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "1ea607e2-0668-4c71-8ec6-28f880ef9a38" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195718Z:1ea607e2-0668-4c71-8ec6-28f880ef9a38" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a37e12bd-bffc-4358-945c-21fdbab94b4f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146\",\r\n \"type\": \"Microsoft.ApiManagement/service/properties\",\r\n \"name\": \"newproperty8146\",\r\n \"properties\": {\r\n \"displayName\": \"propertydisplay3987\",\r\n \"value\": \"propertyValue8165\",\r\n \"tags\": null,\r\n \"secret\": false\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268\",\r\n \"type\": \"Microsoft.ApiManagement/service/properties\",\r\n \"name\": \"secretproperty4268\",\r\n \"properties\": {\r\n \"displayName\": \"secretPropertydisplay6508\",\r\n \"value\": \"secretPropertyValue2435\",\r\n \"tags\": [\r\n \"secret\"\r\n ],\r\n \"secret\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a24e0193-8393-4ac0-8f06-07c120d7beaa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "1b591669-b77a-47b2-829b-dd0167dcacdd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195718Z:1b591669-b77a-47b2-829b-dd0167dcacdd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL25ld3Byb3BlcnR5ODE0Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "56831d62-33ef-439b-8306-6addaefb6e77" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c26e257b-3991-449b-8ff1-e34d4ca1590d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1186" + ], + "x-ms-correlation-request-id": [ + "9ad17dda-8576-4a30-9f87-b8820a35d6dc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195718Z:9ad17dda-8576-4a30-9f87-b8820a35d6dc" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/newproperty8146?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL25ld3Byb3BlcnR5ODE0Nj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "447e8b89-8441-490d-beb3-c5df6a94bbf8" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ad9ef120-eae5-48d2-96ce-8b11ac78b0a1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1183" + ], + "x-ms-correlation-request-id": [ + "d653b52d-3864-4b75-ac4d-62bc12d636be" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195720Z:d653b52d-3864-4b75-ac4d-62bc12d636be" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL3NlY3JldHByb3BlcnR5NDI2OD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"secret\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "49" + ], + "x-ms-client-request-id": [ + "767f1247-5ba5-4323-a2ac-53b9aa7398f2" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1069b761-b70d-4b9c-814e-536c873dfa3d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1185" + ], + "x-ms-correlation-request-id": [ + "25f4639b-da8c-4cb0-81ae-364c474901c6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195719Z:25f4639b-da8c-4cb0-81ae-364c474901c6" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL3NlY3JldHByb3BlcnR5NDI2OD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "72a8a9ec-f2e5-4f59-8b0b-7dc2e17d30b2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268\",\r\n \"type\": \"Microsoft.ApiManagement/service/properties\",\r\n \"name\": \"secretproperty4268\",\r\n \"properties\": {\r\n \"displayName\": \"secretPropertydisplay6508\",\r\n \"value\": \"secretPropertyValue2435\",\r\n \"tags\": [\r\n \"secret\"\r\n ],\r\n \"secret\": false\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD+M=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bf3ab0d8-65f0-4d86-aa35-1f05985b648d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "9a94574a-9f7c-47e6-b082-f52400de5c15" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195719Z:9a94574a-9f7c-47e6-b082-f52400de5c15" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL3NlY3JldHByb3BlcnR5NDI2OD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "907b0820-c880-40c4-87db-24066120d65e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Property not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "84" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8fa895dd-af9f-4087-bd3f-85b4a6bf00fa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "c5386fdb-eaea-4a96-a1e4-d3bccb3665ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195720Z:c5386fdb-eaea-4a96-a1e4-d3bccb3665ff" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL3NlY3JldHByb3BlcnR5NDI2OD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "035f20b3-0eea-4a78-b60f-be0d87db93a3" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "99c68ff2-6635-4f47-bfbf-67d3ad4a4714" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1184" + ], + "x-ms-correlation-request-id": [ + "86612bd7-beea-47ed-b8a8-5229d85f7262" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195720Z:86612bd7-beea-47ed-b8a8-5229d85f7262" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/properties/secretproperty4268?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9wZXJ0aWVzL3NlY3JldHByb3BlcnR5NDI2OD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5e6fdd51-7b1d-4553-a837-49f66f357959" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:57:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "357a80dd-df47-4412-9b56-8d8ffcbde6cd" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1182" + ], + "x-ms-correlation-request-id": [ + "5e7fd293-c2a7-4828-b998-0f6bc4290c75" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T195720Z:5e7fd293-c2a7-4828-b998-0f6bc4290c75" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "newproperty8146", + "secretproperty4268", + "propertydisplay3987", + "propertyValue8165", + "secretPropertydisplay6508", + "secretPropertyValue2435" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ReportTests/Query.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ReportTests/Query.json new file mode 100644 index 000000000000..3dca620f590c --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.ReportTests/Query.json @@ -0,0 +1,638 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "998b611f-98d4-46f8-b9c6-b2b1f539e8c5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "297c20b3-863e-483e-8e27-76c5cd155772", + "d87ccbdc-202a-4486-829e-0ace30822b9f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "392cb761-af6d-4801-a3b8-3359e213f0ea" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191712Z:392cb761-af6d-4801-a3b8-3359e213f0ea" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ab03fc9-fe17-43d2-935e-dad959f93a1d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c0a470af-2262-479c-94e9-04429245f58d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "a412af29-45b4-4a88-b3fe-4f6a017e896e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191712Z:a412af29-45b4-4a88-b3fe-4f6a017e896e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byApi?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5QXBpPyRmaWx0ZXI9dGltZXN0YW1wJTIwZ2UlMjBkYXRldGltZScyMDE3LTA2LTIyVDAwOjAwOjAwJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "26a8a973-8bb3-4849-a5f0-8bf9c506e0b2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Echo API\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n }\r\n ],\r\n \"count\": 1,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2bd3d054-1ecb-4832-a9ca-b30e765352b3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "3b455261-df6c-4407-be94-bdac5c1268f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191714Z:3b455261-df6c-4407-be94-bdac5c1268f3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byGeo?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5R2VvPyRmaWx0ZXI9dGltZXN0YW1wJTIwZ2UlMjBkYXRldGltZScyMDE3LTA2LTIyVDAwOjAwOjAwJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "65fc9275-9160-4af3-9dd8-1b44dc7a86d7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"count\": 0,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "854ab74c-36a0-49d5-9942-687a5929f95a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "cc70c08d-ae9b-46dd-8d16-4c746ae26eb2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191715Z:cc70c08d-ae9b-46dd-8d16-4c746ae26eb2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byOperation?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5T3BlcmF0aW9uPyRmaWx0ZXI9dGltZXN0YW1wJTIwZ2UlMjBkYXRldGltZScyMDE3LTA2LTIyVDAwOjAwOjAwJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b70ad0d3-7fb4-471f-b859-2883ce738978" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Create resource\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"operationId\": \"/apis/echo-api/operations/create-resource\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Modify Resource\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"operationId\": \"/apis/echo-api/operations/modify-resource\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Remove resource\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"operationId\": \"/apis/echo-api/operations/remove-resource\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Retrieve header only\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"operationId\": \"/apis/echo-api/operations/retrieve-header-only\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Retrieve resource\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"operationId\": \"/apis/echo-api/operations/retrieve-resource\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Retrieve resource (cached)\",\r\n \"apiId\": \"/apis/echo-api\",\r\n \"operationId\": \"/apis/echo-api/operations/retrieve-resource-cached\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n }\r\n ],\r\n \"count\": 6,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c7f07154-5a6a-4192-ac17-8c529a1d6948" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "052d95d1-725c-4949-b05a-352342107264" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191715Z:052d95d1-725c-4949-b05a-352342107264" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byProduct?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5UHJvZHVjdD8kZmlsdGVyPXRpbWVzdGFtcCUyMGdlJTIwZGF0ZXRpbWUnMjAxNy0wNi0yMlQwMDowMDowMCcmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ab097cad-d9e1-4fc9-8277-0031778da7ce" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Starter\",\r\n \"productId\": \"/products/starter\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Unlimited\",\r\n \"productId\": \"/products/unlimited\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n }\r\n ],\r\n \"count\": 2,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c5bbd28a-d32c-4732-b46c-b1829ac4de21" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "dc7e6782-1982-476d-929a-1fd8b3cc333c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191716Z:dc7e6782-1982-476d-929a-1fd8b3cc333c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/bySubscription?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5U3Vic2NyaXB0aW9uPyRmaWx0ZXI9dGltZXN0YW1wJTIwZ2UlMjBkYXRldGltZScyMDE3LTA2LTIyVDAwOjAwOjAwJyZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0fd10289-5992-45ab-8a33-38727fca684d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"\",\r\n \"userId\": \"/users/1\",\r\n \"productId\": \"/products/starter\",\r\n \"subscriptionId\": \"/subscriptions/59442dab78b6e60085070001\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"\",\r\n \"userId\": \"/users/1\",\r\n \"productId\": \"/products/unlimited\",\r\n \"subscriptionId\": \"/subscriptions/59442dab78b6e60085070002\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n }\r\n ],\r\n \"count\": 2,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fdf7ada2-d84b-4e1f-9467-381e8222e7bd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "769f82f4-00dc-49ae-8ef6-cf07786a8b07" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191716Z:769f82f4-00dc-49ae-8ef6-cf07786a8b07" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byTime?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&interval=PT30M&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5VGltZT8kZmlsdGVyPXRpbWVzdGFtcCUyMGdlJTIwZGF0ZXRpbWUnMjAxNy0wNi0yMlQwMDowMDowMCcmaW50ZXJ2YWw9UFQzME0mYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "24061992-aa63-4653-a583-611d9e8cebc5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"count\": 0,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1db21fcd-94fd-4bad-9522-48a21008937d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "e194491a-1510-4a75-83e0-f1afe2ffa1cd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191717Z:e194491a-1510-4a75-83e0-f1afe2ffa1cd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byUser?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5VXNlcj8kZmlsdGVyPXRpbWVzdGFtcCUyMGdlJTIwZGF0ZXRpbWUnMjAxNy0wNi0yMlQwMDowMDowMCcmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ca049638-d893-461e-94d4-03a743b1ecb7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Administrator\",\r\n \"userId\": \"/users/1\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n },\r\n {\r\n \"name\": \"Anonymous\",\r\n \"userId\": \"/users/54c800b332965a0035030000\",\r\n \"callCountSuccess\": 0,\r\n \"callCountBlocked\": 0,\r\n \"callCountFailed\": 0,\r\n \"callCountOther\": 0,\r\n \"callCountTotal\": 0,\r\n \"bandwidth\": 0,\r\n \"cacheHitCount\": 0,\r\n \"cacheMissCount\": 0,\r\n \"apiTimeAvg\": 0.0,\r\n \"apiTimeMin\": 0.0,\r\n \"apiTimeMax\": 0.0,\r\n \"serviceTimeAvg\": 0.0,\r\n \"serviceTimeMin\": 0.0,\r\n \"serviceTimeMax\": 0.0\r\n }\r\n ],\r\n \"count\": 1,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e551f24e-87dc-4761-a79b-974e14807148" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "693518d3-7eb3-4566-a6c8-00634b061f1f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191718Z:693518d3-7eb3-4566-a6c8-00634b061f1f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/reports/byRequest?$filter=timestamp%20ge%20datetime'2017-06-22T00:00:00'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9yZXBvcnRzL2J5UmVxdWVzdD8kZmlsdGVyPXRpbWVzdGFtcCUyMGdlJTIwZGF0ZXRpbWUnMjAxNy0wNi0yMlQwMDowMDowMCcmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b8392488-4481-4c7c-9436-8b97641cdad3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"apiId\": \"/apis/-\",\r\n \"operationId\": \"/apis/-/operations/-\",\r\n \"productId\": \"/products/-\",\r\n \"userId\": \"/users/-\",\r\n \"method\": \"GET\",\r\n \"url\": \"https://sdktestservice.azure-api.net/interna-status-0123456789abcdef\",\r\n \"ipAddress\": \"131.107.174.154\",\r\n \"backendResponseCode\": null,\r\n \"responseCode\": 404,\r\n \"responseSize\": 130,\r\n \"timestamp\": \"2017-07-13T23:23:53.5816069\",\r\n \"cache\": \"none\",\r\n \"apiTime\": 876.451,\r\n \"serviceTime\": 0.0,\r\n \"apiRegion\": \"Central US\",\r\n \"subscriptionId\": \"/subscriptions/-\",\r\n \"requestId\": \"7f4f12c9-82aa-4852-93dc-e6e819987bfd\",\r\n \"requestSize\": 0\r\n },\r\n {\r\n \"apiId\": \"/apis/-\",\r\n \"operationId\": \"/apis/-/operations/-\",\r\n \"productId\": \"/products/-\",\r\n \"userId\": \"/users/-\",\r\n \"method\": \"GET\",\r\n \"url\": \"https://sdktestservice.azure-api.net/favicon.ico\",\r\n \"ipAddress\": \"131.107.174.154\",\r\n \"backendResponseCode\": null,\r\n \"responseCode\": 404,\r\n \"responseSize\": 130,\r\n \"timestamp\": \"2017-07-13T23:23:54.6285103\",\r\n \"cache\": \"none\",\r\n \"apiTime\": 0.66980000000000006,\r\n \"serviceTime\": 0.0,\r\n \"apiRegion\": \"Central US\",\r\n \"subscriptionId\": \"/subscriptions/-\",\r\n \"requestId\": \"a32bf026-fc60-4c0e-b543-cf76e9d9a665\",\r\n \"requestSize\": 0\r\n }\r\n ],\r\n \"count\": 2\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:17:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e1b2c8ef-e1c6-497e-9612-97be338ab00a" + ], + "x-ms-correlation-request-id": [ + "3e531b26-1cfb-4670-bfb3-4105e4b6ec77" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191720Z:3e531b26-1cfb-4670-bfb3-4105e4b6ec77" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.SubscriptionTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.SubscriptionTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..5044abc083a5 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.SubscriptionTests/CreateListUpdateDelete.json @@ -0,0 +1,1081 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "b497cbef-6fa5-496f-b906-4d1f501b973f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f3d7dd85-c25d-42ee-863a-84576d43be26", + "01f71d0c-18fe-47a6-8b22-09c2e8659308" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "945c61a8-9a04-4270-a2bd-29db1b8d1dd3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191111Z:945c61a8-9a04-4270-a2bd-29db1b8d1dd3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "839f1d7f-25e5-4920-8325-1a05ab45eb83" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ba535c08-a0bc-4b0b-a3dd-ccae5e716187" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "83ed8c05-074f-46d9-bf2c-e0bdf7ccefdc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191111Z:83ed8c05-074f-46d9-bf2c-e0bdf7ccefdc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "68326fc6-bb42-442e-a77c-7feb0c0e0549" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070001\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"b39b8620186c45399dcc542df1b18652\",\r\n \"secondaryKey\": \"5f1d2ea1f546452f88c46d492033b0b7\",\r\n \"stateComment\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070002\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070002\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"5d7dc5e4a9f24d47956d0cea1205dcba\",\r\n \"secondaryKey\": \"088c12c96e8e4d5198a09c426f134bd0\",\r\n \"stateComment\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5a9072bd-31bd-4651-92f3-7c079be98be2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "9da5e818-113a-43ae-9903-649be90af048" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191112Z:9da5e818-113a-43ae-9903-649be90af048" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zPyR0b3A9MSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f3b928a6-7a77-4987-98fe-b0d1653d2d86" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070001\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"b39b8620186c45399dcc542df1b18652\",\r\n \"secondaryKey\": \"5f1d2ea1f546452f88c46d492033b0b7\",\r\n \"stateComment\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f7d95142-3c98-4c0f-8714-8903c8fd8728" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "2e03a422-2664-4272-a2b6-0eda104618e0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191112Z:2e03a422-2664-4272-a2b6-0eda104618e0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zLzU5NDQyZGFiNzhiNmU2MDA4NTA3MDAwMT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f745e72-4034-4837-aa4a-065d806b5aed" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070001\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"b39b8620186c45399dcc542df1b18652\",\r\n \"secondaryKey\": \"5f1d2ea1f546452f88c46d492033b0b7\",\r\n \"stateComment\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAC8A=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c1bb95b6-07be-4ac0-a3d3-28f384e42887" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "39038570-4c24-44dd-b321-f6fd70e0a2f8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191112Z:39038570-4c24-44dd-b321-f6fd70e0a2f8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9wcm9kdWN0cy9zdGFydGVyP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"subscriptionsLimit\": 2147483647\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "66" + ], + "x-ms-client-request-id": [ + "9b6a4202-6fd4-4521-8313-5df702f76270" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e9dec639-9a22-4bc5-ab07-04f0e763fb08" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "c3e64554-319e-4ef5-85b7-90d540d1bf4a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191113Z:c3e64554-319e-4ef5-85b7-90d540d1bf4a" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": \"newSubscriptionName5094\",\r\n \"primaryKey\": \"newSubscriptionPK9044\",\r\n \"secondaryKey\": \"newSubscriptionSK2570\",\r\n \"state\": \"active\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "544" + ], + "x-ms-client-request-id": [ + "fde260d5-c711-40c4-b727-e89b10e731e0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"newSubscriptionId571\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"user\": {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"firstName\": \"Administrator\",\r\n \"lastName\": \"\",\r\n \"email\": \"apim@autorestsdk.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-06-16T19:12:43.183\",\r\n \"note\": null,\r\n \"groups\": [],\r\n \"identities\": []\r\n },\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": \"newSubscriptionName5094\",\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-08-02T19:11:14.3703362Z\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"newSubscriptionPK9044\",\r\n \"secondaryKey\": \"newSubscriptionSK2570\",\r\n \"stateComment\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1456" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD4I=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "327b2846-244d-4095-a099-2a3c1c041e1f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "80db95b2-9289-4f40-80da-9ec76e42f6fa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191115Z:80db95b2-9289-4f40-80da-9ec76e42f6fa" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c23dbad7-76c5-4701-b61b-d5fceddae13c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"newSubscriptionId571\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": \"newSubscriptionName5094\",\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-08-02T19:11:14.37\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"newSubscriptionPK9044\",\r\n \"secondaryKey\": \"newSubscriptionSK2570\",\r\n \"stateComment\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD4I=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7b59fa03-5855-420b-bebc-5f8a89558f3c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "63122c25-eb6f-4057-8232-4b5ceddd8bb7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191115Z:63122c25-eb6f-4057-8232-4b5ceddd8bb7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f82342e-aab6-40a9-9a4a-9e71db2fd6d9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"newSubscriptionId571\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": \"patchedName5309\",\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-08-02T19:11:14.37\",\r\n \"startDate\": null,\r\n \"expirationDate\": \"2025-07-20T00:00:00\",\r\n \"endDate\": null,\r\n \"notificationDate\": \"2025-07-08T00:00:00\",\r\n \"primaryKey\": \"patchedPk9498\",\r\n \"secondaryKey\": \"patchedSk4247\",\r\n \"stateComment\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD4c=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "19e14773-1021-41d8-8c29-1c2871b9e5f3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "c4f75581-99cd-4e78-8eb3-9dd1aec32463" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191117Z:c4f75581-99cd-4e78-8eb3-9dd1aec32463" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7668aca9-afb7-44e0-ba48-9170d65cb558" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"newSubscriptionId571\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": \"patchedName5309\",\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-08-02T19:11:14.37\",\r\n \"startDate\": null,\r\n \"expirationDate\": \"2025-07-20T00:00:00\",\r\n \"endDate\": null,\r\n \"notificationDate\": \"2025-07-08T00:00:00\",\r\n \"primaryKey\": \"b418d3935704425aaccf0323b45fcd8e\",\r\n \"secondaryKey\": \"patchedSk4247\",\r\n \"stateComment\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD4o=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c3cf09a7-13df-4b06-aab7-20964f3b063c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "f28be03b-429d-4bfa-8b58-ecd9580b0379" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191118Z:f28be03b-429d-4bfa-8b58-ecd9580b0379" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3177d513-cd0e-4f28-b023-172eec9b73fe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571\",\r\n \"type\": \"Microsoft.ApiManagement/service/subscriptions\",\r\n \"name\": \"newSubscriptionId571\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": \"patchedName5309\",\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-08-02T19:11:14.37\",\r\n \"startDate\": null,\r\n \"expirationDate\": \"2025-07-20T00:00:00\",\r\n \"endDate\": null,\r\n \"notificationDate\": \"2025-07-08T00:00:00\",\r\n \"primaryKey\": \"b418d3935704425aaccf0323b45fcd8e\",\r\n \"secondaryKey\": \"f4284334611c4793b8dbfae47d4516c7\",\r\n \"stateComment\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD44=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "be292337-ba40-441d-bbca-b74f91c04231" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "3cfead49-89f4-4898-bc3b-11fcb5bf32ae" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191120Z:3cfead49-89f4-4898-bc3b-11fcb5bf32ae" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0e8cf1c8-60ee-4123-86cb-453c8faf770b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Subscription not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "88" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "de63af32-38e7-4751-b7ff-a0e60186279f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "2c001c65-73aa-4818-a5d1-79e528bfad2a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191122Z:2c001c65-73aa-4818-a5d1-79e528bfad2a" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"expirationDate\": \"2025-07-20T00:00:00Z\",\r\n \"displayName\": \"patchedName5309\",\r\n \"primaryKey\": \"patchedPk9498\",\r\n \"secondaryKey\": \"patchedSk4247\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "187" + ], + "x-ms-client-request-id": [ + "342b3ba5-87e4-48a9-9a1a-76255de68ebe" + ], + "If-Match": [ + "\"AAAAAAAAD4I=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7259cb2a-1bc0-4f02-9511-1f78b622107c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "c84a8540-0cc0-4148-bc3d-307a7b67d774" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191117Z:c84a8540-0cc0-4148-bc3d-307a7b67d774" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571/regeneratePrimaryKey?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxL3JlZ2VuZXJhdGVQcmltYXJ5S2V5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d63f4473-147f-4758-9438-b34236396750" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f3820da9-45fe-4d22-9b45-85cabc07ca32" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "103071ce-df56-4c84-b813-3e8c094a97cf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191118Z:103071ce-df56-4c84-b813-3e8c094a97cf" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571/regenerateSecondaryKey?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxL3JlZ2VuZXJhdGVTZWNvbmRhcnlLZXk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4cd7e294-028e-438b-ae80-2c0c1c362653" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a6cabbc3-22d2-4f6e-8e79-824aee898a6f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "25627b63-c11b-4415-ba89-5605c8c1abd1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191119Z:25627b63-c11b-4415-ba89-5605c8c1abd1" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2bf3cb1e-e875-465b-b8f3-cbaab7aa016a" + ], + "If-Match": [ + "\"AAAAAAAAD44=\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "682f27ab-eaf1-46cc-aac2-ea7c6a3ad0b3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "62c07878-b5b0-4a6f-8fde-cc77f92f6bf8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191121Z:62c07878-b5b0-4a6f-8fde-cc77f92f6bf8" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/newSubscriptionId571?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9zdWJzY3JpcHRpb25zL25ld1N1YnNjcmlwdGlvbklkNTcxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0a481ce6-f602-4413-bde0-5e2e4d8d2134" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:11:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d3f69b99-2aac-4064-802a-0efbb844d503" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "25ab7065-d32b-421e-8b38-7ab1fcf97b60" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191122Z:25ab7065-d32b-421e-8b38-7ab1fcf97b60" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "newSubscriptionId571", + "newSubscriptionName5094", + "newSubscriptionPK9044", + "newSubscriptionSK2570", + "patchedName5309", + "patchedPk9498", + "patchedSk4247" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessGitTests/GetUpdateKeys.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessGitTests/GetUpdateKeys.json new file mode 100644 index 000000000000..7ca501fdb5ce --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessGitTests/GetUpdateKeys.json @@ -0,0 +1,452 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "c6b7eef4-4a19-44b2-8a69-f44e38fffa2f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e7951098-45af-410c-bd2a-c1a4018eb2d7", + "23be487e-9ac8-490b-953d-89183c07c2d8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "3914495c-0d17-44a2-9c4c-a491ced4e07f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191821Z:3914495c-0d17-44a2-9c4c-a491ced4e07f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "27ab8634-9d29-4b5f-97d5-c4315344624f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bb1ce12f-9027-4684-bd23-61caa25f007b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "9110ec76-107d-4e0c-90e1-0d7eead4ee66" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191821Z:9110ec76-107d-4e0c-90e1-0d7eead4ee66" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/git?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL2dpdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eefa40f5-1a4a-4fb3-ba26-a331aed5e0b4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"git\",\r\n \"primaryKey\": \"viMcmuDv3I13GoecxHAqFDrrHKl9WtZzIIy2apgrfwuwZpAomfNdtS0qab7D3SNpIoGs8YQ/lbkVG9IvcQ5pWg==\",\r\n \"secondaryKey\": \"Q6SeA+EBZyJa2NYhccfPwSV8SqoYp9/JSjHUMlnji1nwS5E88DPcbMqkT+7Pyz+WvDMtUGGomzIxiq1K87NIVA==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAACFcAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bfabdc35-0c76-4d2a-a362-b4d821f22a8b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "4c458acb-cadb-442d-a4b7-8a1da9112a45" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191821Z:4c458acb-cadb-442d-a4b7-8a1da9112a45" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/git?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL2dpdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41576b80-1493-490f-97a8-5c666b41edf5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"git\",\r\n \"primaryKey\": \"FR5a5GL+uIA9Fl+Rn8do3lm0U5Gt4iqazuL92BSbbS6oKMJmIXTYfyl5HNSP8t2Vioy3I+9WqmglzuLlK0zlfA==\",\r\n \"secondaryKey\": \"Q6SeA+EBZyJa2NYhccfPwSV8SqoYp9/JSjHUMlnji1nwS5E88DPcbMqkT+7Pyz+WvDMtUGGomzIxiq1K87NIVA==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAACFcAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7095dff3-d9b5-48f5-a495-db80b2b51fd9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "5af44683-80a7-470d-8f99-4adbdf441a95" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191821Z:5af44683-80a7-470d-8f99-4adbdf441a95" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/git?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL2dpdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a19e5117-84e1-4c9d-9eea-2727fd959d99" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"git\",\r\n \"primaryKey\": \"FR5a5GL+uIA9Fl+Rn8do3lm0U5Gt4iqazuL92BSbbS6oKMJmIXTYfyl5HNSP8t2Vioy3I+9WqmglzuLlK0zlfA==\",\r\n \"secondaryKey\": \"h+/10t0MEgP5u33JXC+to3IylPSZY7tffO/avNZ5cc0wUI7SulQU4rjuHSMmfyt7Klkms6Xx2BJQV+TJ+yCcIw==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAACFcAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "72edcefd-ba59-436f-9e1a-b5b435039c0e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "695a4971-cc92-463e-b404-90a3e10a954b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191822Z:695a4971-cc92-463e-b404-90a3e10a954b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/git/regeneratePrimaryKey?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL2dpdC9yZWdlbmVyYXRlUHJpbWFyeUtleT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5a50cbe2-1ae4-4df8-8488-5a2717e57ca4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6f38f10d-a987-4939-8e1c-cbc4392d8dae" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "f456e079-5969-4230-8388-ec9a2bffc208" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191821Z:f456e079-5969-4230-8388-ec9a2bffc208" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/git/regenerateSecondaryKey?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL2dpdC9yZWdlbmVyYXRlU2Vjb25kYXJ5S2V5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fc03d3e9-50d4-4103-8d55-db2f02e4475c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:18:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4fd7ec02-5002-4935-af4c-1c8d6cb89d83" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "074e191d-f983-4ec4-b5e5-0f92eb419768" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191821Z:074e191d-f983-4ec4-b5e5-0f92eb419768" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessTests/EnableGetAndUpdateKeys.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessTests/EnableGetAndUpdateKeys.json new file mode 100644 index 000000000000..a4552198ee43 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantAccessTests/EnableGetAndUpdateKeys.json @@ -0,0 +1,644 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "96540682-f078-4998-a724-de614f10375f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5a503465-bbb7-43dd-9697-51c4b69c36c5", + "c87c4618-fc0e-4dbe-92c3-1b62c2693990" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "18466dd6-2ceb-43cf-8938-fde316b085cc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191650Z:18466dd6-2ceb-43cf-8938-fde316b085cc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6235eba8-0993-41e3-b7ce-933229e752e6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5f68d2dd-9961-4d2f-a763-c8f5d97fb936" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "bcc0154e-d846-426a-929a-3fe470c7eb97" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191650Z:bcc0154e-d846-426a-929a-3fe470c7eb97" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d91471af-1f6a-45c9-9e69-0d1080a4847b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"integration\",\r\n \"primaryKey\": \"wG3jJ9hC3vUhW4UKv6vdtAy5tB+rgXtz5KAo2pzQ80wHLy7zq7eZO6xxOjn6TgqyVu9OCwduWqClRKucCzuXzA==\",\r\n \"secondaryKey\": \"y+ZMGyuj7WIMjrCnL3e0l2AFqxAM9m0HGO3j2N3/39ndhGYIoO2UZjqnYBPNkfnpFdR6fU9s48XOARnLk1U45g==\",\r\n \"enabled\": false\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAADtYAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3b027c11-62e2-4442-af18-d63361987c92" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "fb887127-6ec0-4ca9-8e28-b5a79837c495" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191651Z:fb887127-6ec0-4ca9-8e28-b5a79837c495" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "58296116-6d42-4c67-be1f-beb2e439a955" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"integration\",\r\n \"primaryKey\": \"wG3jJ9hC3vUhW4UKv6vdtAy5tB+rgXtz5KAo2pzQ80wHLy7zq7eZO6xxOjn6TgqyVu9OCwduWqClRKucCzuXzA==\",\r\n \"secondaryKey\": \"y+ZMGyuj7WIMjrCnL3e0l2AFqxAM9m0HGO3j2N3/39ndhGYIoO2UZjqnYBPNkfnpFdR6fU9s48XOARnLk1U45g==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8IAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "88b773c7-795f-4849-874c-f7b8ee41af04" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "03756a87-c14a-4da5-844d-df3c3f823183" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191651Z:03756a87-c14a-4da5-844d-df3c3f823183" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ae8c4078-e3b7-4409-af9d-f9bd824754a2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"integration\",\r\n \"primaryKey\": \"t+9PdxsHB4kg+RLtJRLGvyEN6vNu8JJ4ydPnL9+y0qYfZs+khU7OmiOcCeckMU/3wZ/+Mb/m1JLTbXMrC6afAg==\",\r\n \"secondaryKey\": \"y+ZMGyuj7WIMjrCnL3e0l2AFqxAM9m0HGO3j2N3/39ndhGYIoO2UZjqnYBPNkfnpFdR6fU9s48XOARnLk1U45g==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8IAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1a03197e-14b8-4492-aafd-70ac9a9cde98" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "fde230da-f533-4cdc-9fdb-396bf5a85dc2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191652Z:fde230da-f533-4cdc-9fdb-396bf5a85dc2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d911f43d-421a-4e01-ad08-527b142cad3a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"integration\",\r\n \"primaryKey\": \"t+9PdxsHB4kg+RLtJRLGvyEN6vNu8JJ4ydPnL9+y0qYfZs+khU7OmiOcCeckMU/3wZ/+Mb/m1JLTbXMrC6afAg==\",\r\n \"secondaryKey\": \"G0K0CiR78OR+qq3XZZOfsk6P67haaRMD3VuHksXXBUWNN7uI5UVsrj2uYvvj6cqRWdhG4JJh6Y0ZGxtbeujTtQ==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD8IAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "be76d142-5e25-4cca-8ba7-8269180929a6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "3b1ee5b8-6d6e-453c-8137-41ded083b02e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191652Z:3b1ee5b8-6d6e-453c-8137-41ded083b02e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"enabled\": true\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "23" + ], + "x-ms-client-request-id": [ + "61d89b2f-ecaf-4b5d-b007-9d736deddc3b" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "625a0355-b985-4e4a-9eb0-b76a3fc9e851" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "c2a74425-6a82-4c0c-bfe8-9c6352c3e8a5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191651Z:c2a74425-6a82-4c0c-bfe8-9c6352c3e8a5" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"enabled\": false\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "24" + ], + "x-ms-client-request-id": [ + "d5bc9f74-8e1e-4d0a-912d-6f48ba05c291" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3ee92a2b-9963-490d-88f9-be6452091841" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "bd448625-b1fa-4cdc-9f59-5f5cae862f75" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191653Z:bd448625-b1fa-4cdc-9f59-5f5cae862f75" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/regeneratePrimaryKey?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL3JlZ2VuZXJhdGVQcmltYXJ5S2V5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "726f784b-76d7-4952-b929-6787dc7d0392" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0c309af6-fd89-4bdd-a362-a24f63f5d30d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "f9cffc81-bf5c-4a46-9ff9-dedb46e35b68" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191652Z:f9cffc81-bf5c-4a46-9ff9-dedb46e35b68" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/regenerateSecondaryKey?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL3JlZ2VuZXJhdGVTZWNvbmRhcnlLZXk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ebf7cd4-b1a1-4f35-ab59-550f48a49665" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e46c9cb2-9b5f-4e93-a755-b4647d15ad16" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "70edd79c-e8b0-4441-b15a-e0f2ba18b861" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191652Z:70edd79c-e8b0-4441-b15a-e0f2ba18b861" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantGitTests/ValidateSaveDeploy.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantGitTests/ValidateSaveDeploy.json new file mode 100644 index 000000000000..cbaa35cd7731 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.TenantGitTests/ValidateSaveDeploy.json @@ -0,0 +1,763 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "bc7dd5b4-ae08-41a1-98c7-e3a59f762b33" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6f791ad9-a5b5-40f0-a278-e58a0a30e65e", + "e547deae-c550-4422-8d6e-ba301f69d378" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "28fe5b65-ca94-40e5-8676-327ca3f2ec63" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191509Z:28fe5b65-ca94-40e5-8676-327ca3f2ec63" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6a134db9-3928-4c58-b653-699106be3f77" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "571c5351-a64b-4e5c-88ff-c9b5a5cbd59a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "8f26a5c5-379c-40c7-a6d9-42d59f6d186e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191509Z:8f26a5c5-379c-40c7-a6d9-42d59f6d186e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/access/git?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvYWNjZXNzL2dpdD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ff12219b-46b3-4d8f-8f14-7016d073fe66" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"git\",\r\n \"primaryKey\": \"viMcmuDv3I13GoecxHAqFDrrHKl9WtZzIIy2apgrfwuwZpAomfNdtS0qab7D3SNpIoGs8YQ/lbkVG9IvcQ5pWg==\",\r\n \"secondaryKey\": \"Q6SeA+EBZyJa2NYhccfPwSV8SqoYp9/JSjHUMlnji1nwS5E88DPcbMqkT+7Pyz+WvDMtUGGomzIxiq1K87NIVA==\",\r\n \"enabled\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAACFcAAAAAAAAAAA==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "09d2a052-eb41-4c3b-aa65-b7a37a157a63" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "b4bee821-4cfb-4c7c-914b-cf2d22db1e2b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191509Z:b4bee821-4cfb-4c7c-914b-cf2d22db1e2b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/configuration/syncState?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvY29uZmlndXJhdGlvbi9zeW5jU3RhdGU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5c1ecf68-4761-4480-ac39-974a0f97eb17" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"branch\": \"master\",\r\n \"commitId\": \"0dedac88f3f3de60d0f97fe339f0ffef7e04bf6c\",\r\n \"isExport\": false,\r\n \"isSynced\": false,\r\n \"isGitEnabled\": true,\r\n \"syncDate\": \"2017-07-14T00:18:30.6896852Z\",\r\n \"configurationChangeDate\": \"2017-08-02T19:14:39.3058205Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d6f34d73-c28f-4391-b94e-4d4c7c172abc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "e6713406-58b7-4fd6-9b0b-59a52963603d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191510Z:e6713406-58b7-4fd6-9b0b-59a52963603d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/configuration/syncState?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvY29uZmlndXJhdGlvbi9zeW5jU3RhdGU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bf70175b-0b9a-46c4-ab70-a6d49ded4503" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"branch\": \"master\",\r\n \"commitId\": \"4c18f6732ed89ce8bd70edb1609be5eacc206e01\",\r\n \"isExport\": true,\r\n \"isSynced\": true,\r\n \"isGitEnabled\": true,\r\n \"syncDate\": \"2017-08-02T19:15:30.9751921Z\",\r\n \"configurationChangeDate\": \"2017-08-02T19:14:39.3058205Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a1c955cf-5b80-42b8-9c34-0fd2594d05e4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "597afc2f-4fdd-4202-89ea-b883b0ac3aac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191541Z:597afc2f-4fdd-4202-89ea-b883b0ac3aac" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/configuration/syncState?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvY29uZmlndXJhdGlvbi9zeW5jU3RhdGU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6e197b0c-8610-4f5b-9d4e-c2844eee089b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"branch\": \"master\",\r\n \"commitId\": \"4c18f6732ed89ce8bd70edb1609be5eacc206e01\",\r\n \"isExport\": false,\r\n \"isSynced\": true,\r\n \"isGitEnabled\": true,\r\n \"syncDate\": \"2017-08-02T19:16:36.8118031Z\",\r\n \"configurationChangeDate\": \"2017-08-02T19:16:36.8118031Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7b977b7c-f5b3-4d31-a8fd-f2f4f598dd26" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "d3ad5ea3-8d46-4dbd-b8f9-b61e6ce93fc9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191643Z:d3ad5ea3-8d46-4dbd-b8f9-b61e6ce93fc9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/configuration/save?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvY29uZmlndXJhdGlvbi9zYXZlP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"branch\": \"master\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "26" + ], + "x-ms-client-request-id": [ + "1f082ce6-691e-44ca-81c8-fbad90bf3646" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"Id\": \"598224be50f4b80f1009c335\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "33" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/operationResults/598224be50f4b80f1009c335?api-version=2017-03-01" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b84bdba0-4333-4360-abf5-0de6d886c217" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "a068c761-a02d-42a9-b75c-70fab6115002" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191510Z:a068c761-a02d-42a9-b75c-70fab6115002" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/operationResults/598224be50f4b80f1009c335?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvb3BlcmF0aW9uUmVzdWx0cy81OTgyMjRiZTUwZjRiODBmMTAwOWMzMzU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"598224be50f4b80f1009c335\",\r\n \"status\": \"Succeeded\",\r\n \"started\": \"2017-08-02T19:15:10.853\",\r\n \"updated\": \"2017-08-02T19:15:31.43\",\r\n \"resultInfo\": \"The configuration was successfully saved to master as commit 4c18f6732ed89ce8bd70edb1609be5eacc206e01.\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a30b3cb9-c45a-4016-8ab4-7b15ed871a18" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "654a38c4-b2bf-4344-9f06-e01a9881786c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191540Z:654a38c4-b2bf-4344-9f06-e01a9881786c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/configuration/validate?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvY29uZmlndXJhdGlvbi92YWxpZGF0ZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"branch\": \"master\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "26" + ], + "x-ms-client-request-id": [ + "85a6c6d6-327f-4b6d-adb9-ca5ad8321c33" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"Id\": \"598224dd50f4b80f1009c338\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "33" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:15:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/operationResults/598224dd50f4b80f1009c338?api-version=2017-03-01" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "625fdc29-03aa-42ff-b4cf-9b6901e32761" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "3c3c9f9e-4073-41fc-820f-4bc17dd103a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191541Z:3c3c9f9e-4073-41fc-820f-4bc17dd103a9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/operationResults/598224dd50f4b80f1009c338?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvb3BlcmF0aW9uUmVzdWx0cy81OTgyMjRkZDUwZjRiODBmMTAwOWMzMzg/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"598224dd50f4b80f1009c338\",\r\n \"status\": \"Succeeded\",\r\n \"started\": \"2017-08-02T19:15:41.727\",\r\n \"updated\": \"2017-08-02T19:15:53.38\",\r\n \"resultInfo\": null,\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "11cd896e-7929-4115-8e78-b26ebeb36d18" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "412902e0-02c3-4d0b-88ba-42e86a9355f0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191611Z:412902e0-02c3-4d0b-88ba-42e86a9355f0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/configuration/deploy?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvY29uZmlndXJhdGlvbi9kZXBsb3k/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"branch\": \"master\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "26" + ], + "x-ms-client-request-id": [ + "8df661da-78b2-402f-86a6-b1d2b855d1fd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"Id\": \"598224fd50f4b80f1009c33b\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "33" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/operationResults/598224fd50f4b80f1009c33b?api-version=2017-03-01" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ee05bafd-dda3-4ffe-a983-081374ef6795" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "50c214ec-2d21-42fe-9cab-2c5b30bc0323" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191612Z:50c214ec-2d21-42fe-9cab-2c5b30bc0323" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/tenant/operationResults/598224fd50f4b80f1009c33b?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS90ZW5hbnQvb3BlcmF0aW9uUmVzdWx0cy81OTgyMjRmZDUwZjRiODBmMTAwOWMzM2I/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"598224fd50f4b80f1009c33b\",\r\n \"status\": \"Succeeded\",\r\n \"started\": \"2017-08-02T19:16:13.073\",\r\n \"updated\": \"2017-08-02T19:16:37.31\",\r\n \"resultInfo\": \"Latest commit 4c18f6732ed89ce8bd70edb1609be5eacc206e01 was successfully deployed from master. Previous configuration was saved to the 'ConfigurationBackup' branch.\",\r\n \"error\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:16:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fa587eec-ab23-4f78-88c3-9aa0a3f4695d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "96b8f574-c5d3-4f03-8b47-f4f2c6db8eed" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T191643Z:96b8f574-c5d3-4f03-8b47-f4f2c6db8eed" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/CreateListUpdateDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..356724412d10 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/CreateListUpdateDelete.json @@ -0,0 +1,713 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "7182a86a-65cc-448b-b2e3-3c7c40981bbe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8828e7c5-f5b4-4cfc-84fc-0a54e0ea0d53", + "85bf5420-48c5-478c-8f0e-a7e67b510496" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "1e1b036f-2cfc-40be-ab13-ca2bc32a25ed" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191445Z:1e1b036f-2cfc-40be-ab13-ca2bc32a25ed" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f8b904d-6902-454a-a525-6acb83c687fa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0382f9e0-54c4-4a6b-827d-de4a60bbe599" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "d221eeac-e285-487e-ab46-f1d00435ca63" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191445Z:d221eeac-e285-487e-ab46-f1d00435ca63" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c2360818-2934-4ded-a54e-4ece78b47f9d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"1\",\r\n \"properties\": {\r\n \"firstName\": \"Administrator\",\r\n \"lastName\": \"\",\r\n \"email\": \"apim@autorestsdk.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-06-16T19:12:43.183\",\r\n \"note\": null,\r\n \"identities\": [\r\n {\r\n \"provider\": \"Azure\",\r\n \"id\": \"apim@autorestsdk.com\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1a362302-7195-48ac-8526-4ef956e09044" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "0f9c7d62-89d6-48f8-a2a6-f4ad1f414eb4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191445Z:0f9c7d62-89d6-48f8-a2a6-f4ad1f414eb4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"active\",\r\n \"note\": \"userNote721\",\r\n \"email\": \"contoso@microsoft.com\",\r\n \"firstName\": \"userFirstName479\",\r\n \"lastName\": \"userLastName8523\",\r\n \"password\": \"userPassword6246\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "230" + ], + "x-ms-client-request-id": [ + "34a17715-e0fe-478d-91ad-33d9fe51c180" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"userId1340\",\r\n \"properties\": {\r\n \"firstName\": \"userFirstName479\",\r\n \"lastName\": \"userLastName8523\",\r\n \"email\": \"contoso@microsoft.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:14:46.8681637Z\",\r\n \"note\": \"userNote721\",\r\n \"groups\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"name\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n ],\r\n \"identities\": [\r\n {\r\n \"provider\": \"Basic\",\r\n \"id\": \"contoso@microsoft.com\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1093" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD7Q=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bd17b033-14a7-4f4a-9aa1-2a89431e37d1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "62a623de-50f5-474a-bb1a-c5fcfa986323" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191446Z:62a623de-50f5-474a-bb1a-c5fcfa986323" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7ae2a25c-74b3-4792-b651-0c314e20da34" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"userId1340\",\r\n \"properties\": {\r\n \"firstName\": \"userFirstName479\",\r\n \"lastName\": \"userLastName8523\",\r\n \"email\": \"contoso@microsoft.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:14:46.44\",\r\n \"note\": \"userNote721\",\r\n \"identities\": [\r\n {\r\n \"provider\": \"Basic\",\r\n \"id\": \"contoso@microsoft.com\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD7QAAAAAAAAPtg==\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9b6fec52-e065-438e-ba86-de1d620c7b6f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "090512a1-1cc5-4eaa-8959-8fa467c91316" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191447Z:090512a1-1cc5-4eaa-8959-8fa467c91316" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ab0976a6-534f-4ee3-b0f7-22c2d93c9e34" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"User not found.\",\r\n \"details\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "80" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "195c8f9a-0443-4baa-b6ee-7986ca04313f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "6a366a03-b092-4fe7-b7e3-4428c0c76e38" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191448Z:6a366a03-b092-4fe7-b7e3-4428c0c76e38" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycz8kdG9wPTEmYXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "53414a1f-693f-4123-8e13-97ed7bc7c334" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"1\",\r\n \"properties\": {\r\n \"firstName\": \"Administrator\",\r\n \"lastName\": \"\",\r\n \"email\": \"apim@autorestsdk.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-06-16T19:12:43.183\",\r\n \"note\": null,\r\n \"identities\": [\r\n {\r\n \"provider\": \"Azure\",\r\n \"id\": \"apim@autorestsdk.com\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c052fedb-5e96-435a-bb83-0101d19c916d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "3d3f3851-79f9-4557-8aa6-7df7a772a147" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191447Z:3d3f3851-79f9-4557-8aa6-7df7a772a147" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340/generateSsoUrl?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwL2dlbmVyYXRlU3NvVXJsP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7b90a18b-6c59-40ca-a264-381f818e1c30" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": \"https://sdktestservice.portal.azure-api.net/signin-sso?token=userId1340%26201708021919%26TkJx9129ui5U5ImySGaUFCBxNsnfDCQrnQpgFobQDTUe1dLHzDieVFHLhMB2inG07jKqVYD7Xoyp8i%2bF1dAvcQ%3d%3d\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "54352ab8-60a9-41c3-884f-253af90e946a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "07ad5048-6a78-462f-aca7-e14c9d3e5abe" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191447Z:07ad5048-6a78-462f-aca7-e14c9d3e5abe" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340/token?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwL3Rva2VuP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"keyType\": \"primary\",\r\n \"expiry\": \"2017-09-01T19:14:47.8247083Z\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "73" + ], + "x-ms-client-request-id": [ + "61128d63-9ccf-4aba-bef3-876338c2f6e7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": \"userId1340&201709011914&kE+W/GO3NBg3Z2imAfRFMnR+eSbKTbPUwunGs59XPXLCEybrUHvqQ7fDNUMH0DDRaSxVSnF1AZ4iQGX9EBgozw==\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b07c44af-a93e-49fd-9431-645ee4914c16" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "2b0eecb7-c227-46ed-93de-cd2ac69910d9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191447Z:2b0eecb7-c227-46ed-93de-cd2ac69910d9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340?deleteSubscriptions=true&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwP2RlbGV0ZVN1YnNjcmlwdGlvbnM9dHJ1ZSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "509b21e7-256c-433c-9fb8-3cf2f48d5703" + ], + "If-Match": [ + "\"AAAAAAAAD7QAAAAAAAAPtg==\"" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "abbf8b37-cbce-421e-8155-735c653176f4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "147f58b2-0b14-4fef-b509-806a45d870ad" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191448Z:147f58b2-0b14-4fef-b509-806a45d870ad" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId1340?deleteSubscriptions=true&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQxMzQwP2RlbGV0ZVN1YnNjcmlwdGlvbnM9dHJ1ZSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "09393877-0c05-42e7-b6f5-85d874266b86" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ac364f94-7f0e-4640-9fa2-2533267e3e1e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "147f1612-e9a7-4902-ba5f-7effa1d00911" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191448Z:147f1612-e9a7-4902-ba5f-7effa1d00911" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "userId1340", + "userFirstName479", + "userLastName8523", + "userPassword6246", + "userNote721" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/GroupsListAddRemove.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/GroupsListAddRemove.json new file mode 100644 index 000000000000..25b109f2b491 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/GroupsListAddRemove.json @@ -0,0 +1,774 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "b7272ec8-12bd-4443-9c3d-8ce450c82aa2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b412e373-fc1a-4f06-828a-2a2e0aecc71d", + "f61c4e70-3e89-4679-a4c8-2ca074404a35" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "41d1ccde-34c2-44aa-87c4-3bf5fc128238" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191434Z:41d1ccde-34c2-44aa-87c4-3bf5fc128238" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "48e3f68c-7786-42bf-b2af-8991fc3ee41b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bf3c06c8-c5bc-436b-81dd-8b90c619d797" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "f72f9190-1802-4cee-b203-702a35b74453" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191434Z:f72f9190-1802-4cee-b203-702a35b74453" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvZ3JvdXBJZDcxNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"groupName3891\",\r\n \"type\": \"custom\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "87" + ], + "x-ms-client-request-id": [ + "6b2d60ce-cf1c-4b8b-847c-3ce5ebeed7a9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"groupId716\",\r\n \"properties\": {\r\n \"displayName\": \"groupName3891\",\r\n \"description\": null,\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "415" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD6Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "31e849bd-bb45-42bb-ad86-c497b35bd20b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "16261ad3-b9cd-464f-ada0-7623ee46faaf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191435Z:16261ad3-b9cd-464f-ada0-7623ee46faaf" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvZ3JvdXBJZDcxNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "87200be4-7791-4134-92b8-ad4a0d5284eb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups\",\r\n \"name\": \"groupId716\",\r\n \"properties\": {\r\n \"displayName\": \"groupName3891\",\r\n \"description\": null,\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAAAAD6Y=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d0af3e57-2fac-424b-ac23-e3afc4d1341d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "01cb7693-bdf1-4a47-91ee-9eafecaff4a2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191435Z:01cb7693-bdf1-4a47-91ee-9eafecaff4a2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQ5MzQ5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"state\": \"active\",\r\n \"note\": \"note4693\",\r\n \"email\": \"ivan.ivanov8519@contoso.com\",\r\n \"firstName\": \"Ivan9070\",\r\n \"lastName\": \"Ivanov1263\",\r\n \"password\": \"pwd2835\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "210" + ], + "x-ms-client-request-id": [ + "4df25af7-ffb4-45d3-9384-d46bb03c2c3d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"userId9349\",\r\n \"properties\": {\r\n \"firstName\": \"Ivan9070\",\r\n \"lastName\": \"Ivanov1263\",\r\n \"email\": \"ivan.ivanov8519@contoso.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:14:36.3218888Z\",\r\n \"note\": \"note4693\",\r\n \"groups\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"name\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n ],\r\n \"identities\": [\r\n {\r\n \"provider\": \"Basic\",\r\n \"id\": \"ivan.ivanov8519@contoso.com\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1088" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD6c=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8885042f-d688-45ec-b8b0-df3f0db2e48a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "6603f70c-12b1-400b-af7c-cb3f7e02ae56" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191436Z:6603f70c-12b1-400b-af7c-cb3f7e02ae56" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQ5MzQ5L2dyb3Vwcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2b3d3af3-11a8-4e8e-ad85-6a2e6d210826" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bf7e7d32-f3ff-4fb3-95ce-1f8449e5f653" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "f3a29731-9d69-407f-9f06-bbbfc10d2af2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191437Z:f3a29731-9d69-407f-9f06-bbbfc10d2af2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQ5MzQ5L2dyb3Vwcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5da3be8e-1265-44b9-967a-b6d7d6ece1a1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/groups\",\r\n \"name\": \"groupId716\",\r\n \"properties\": {\r\n \"displayName\": \"groupName3891\",\r\n \"description\": null,\r\n \"builtIn\": false,\r\n \"type\": \"custom\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3993d722-d60e-49fb-93c3-0e6f91595e19" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "048d2a6a-3238-48ba-ac00-1a075720c285" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191437Z:048d2a6a-3238-48ba-ac00-1a075720c285" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349/groups?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQ5MzQ5L2dyb3Vwcz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e7c9bcde-03e3-47ae-9812-ed91967658b9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/developers\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/groups\",\r\n \"name\": \"developers\",\r\n \"properties\": {\r\n \"displayName\": \"Developers\",\r\n \"description\": \"Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.\",\r\n \"builtIn\": true,\r\n \"type\": \"system\",\r\n \"externalId\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c853b47b-27c3-4c70-a639-18d7dd34cc14" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "54369124-ed3e-4d95-a4df-43c30844448f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191438Z:54369124-ed3e-4d95-a4df-43c30844448f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716/users/userId9349?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvZ3JvdXBJZDcxNi91c2Vycy91c2VySWQ5MzQ5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c99b9e73-2dbc-4771-94f4-bad8547d75f9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349\",\r\n \"type\": \"Microsoft.ApiManagement/service/groups/users\",\r\n \"name\": \"userId9349\",\r\n \"properties\": {\r\n \"firstName\": \"Ivan9070\",\r\n \"lastName\": \"Ivanov1263\",\r\n \"email\": \"ivan.ivanov8519@contoso.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-08-02T19:14:36.367\",\r\n \"note\": \"note4693\",\r\n \"groups\": [],\r\n \"identities\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "535" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAAD6w=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dca69da0-8e2b-451a-b603-a5ce71336f71" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "db3cfe6c-5894-4f33-bd78-519586590deb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191437Z:db3cfe6c-5894-4f33-bd78-519586590deb" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716/users/userId9349?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvZ3JvdXBJZDcxNi91c2Vycy91c2VySWQ5MzQ5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0324068d-2e53-4964-bf0b-384e26f75e8c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "70c6b15c-73f8-47a4-ab34-0167d55f76e7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "6c9a18f0-687f-4af1-81e4-a15c0e625ea8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191438Z:6c9a18f0-687f-4af1-81e4-a15c0e625ea8" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/userId9349?deleteSubscriptions=true&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy91c2VySWQ5MzQ5P2RlbGV0ZVN1YnNjcmlwdGlvbnM9dHJ1ZSZhcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dc4e9251-1d74-4e21-b2bc-7176d230610e" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ab67808f-cd47-4972-a751-96f0fcf969d3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "c156bcd6-3f72-40bc-969b-be35d792e170" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191439Z:c156bcd6-3f72-40bc-969b-be35d792e170" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/groups/groupId716?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS9ncm91cHMvZ3JvdXBJZDcxNj9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6bf1ddab-3260-42f2-afa9-184b315a7cb4" + ], + "If-Match": [ + "*" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dc721884-239a-4d4e-9254-8511b99b9325" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "fdc96677-457e-4a92-8c3a-ced5e0d0ccd0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191439Z:fdc96677-457e-4a92-8c3a-ced5e0d0ccd0" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "GroupsListAddRemove": [ + "groupId716", + "groupName3891", + "userId9349", + "Ivan9070", + "Ivanov1263", + "ivan.ivanov8519", + "pwd2835", + "note4693" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/SubscriptionsList.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/SubscriptionsList.json new file mode 100644 index 000000000000..03f6578c6ccd --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/SubscriptionsList.json @@ -0,0 +1,394 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "ec9e0e66-65ac-43e9-b503-62aa0d7c0a11" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ad0f8b49-279e-449b-9949-19591eeee981", + "27bc2201-1b4e-4a5e-bd55-a46b5c4916d1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "7ffa5a33-598a-42f4-8fe2-6466db5bcced" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191426Z:7ffa5a33-598a-42f4-8fe2-6466db5bcced" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b4e011fc-f4a8-4594-968c-1f4baa0867b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "80565277-7a01-4b0e-8553-a3971b976e19" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "4fb18744-9e7c-4915-83b1-22b3702c35d3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191426Z:4fb18744-9e7c-4915-83b1-22b3702c35d3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycz9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a96ed191-71f6-4dce-9cc1-2d9973025df1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"1\",\r\n \"properties\": {\r\n \"firstName\": \"Administrator\",\r\n \"lastName\": \"\",\r\n \"email\": \"apim@autorestsdk.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-06-16T19:12:43.183\",\r\n \"note\": null,\r\n \"identities\": [\r\n {\r\n \"provider\": \"Azure\",\r\n \"id\": \"apim@autorestsdk.com\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "17171a51-adad-40ca-906f-08723610507e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "1f0904a1-316b-45f2-9615-8a5959fc219d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191427Z:1f0904a1-316b-45f2-9615-8a5959fc219d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1/subscriptions?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy8xL3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5689be06-ddc8-4330-a394-f2045369aee2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070001\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"b39b8620186c45399dcc542df1b18652\",\r\n \"secondaryKey\": \"5f1d2ea1f546452f88c46d492033b0b7\",\r\n \"stateComment\": null\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070002\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070002\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"5d7dc5e4a9f24d47956d0cea1205dcba\",\r\n \"secondaryKey\": \"088c12c96e8e4d5198a09c426f134bd0\",\r\n \"stateComment\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "25ebe4bf-7a7b-48b6-b9cf-9ef6fdeef989" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "ab954be3-f7cf-4fcd-b491-a9ec73235acc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191427Z:ab954be3-f7cf-4fcd-b491-a9ec73235acc" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1/subscriptions?$top=1&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy8xL3N1YnNjcmlwdGlvbnM/JHRvcD0xJmFwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a8982fab-b605-4fe5-ac3d-5bc047ee83e4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070001\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070001\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/starter\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"b39b8620186c45399dcc542df1b18652\",\r\n \"secondaryKey\": \"5f1d2ea1f546452f88c46d492033b0b7\",\r\n \"stateComment\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com:443/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1/subscriptions?%24top=1&api-version=2017-03-01&%24skip=1\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6849ebda-8bb2-438e-8ff8-16d62f9634ab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "840ba44b-a941-48f7-8c11-43a8a45de749" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191427Z:840ba44b-a941-48f7-8c11-43a8a45de749" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1/subscriptions?%24top=1&api-version=2017-03-01&%24skip=1", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy8xL3N1YnNjcmlwdGlvbnM/JTI0dG9wPTEmYXBpLXZlcnNpb249MjAxNy0wMy0wMSYlMjRza2lwPTE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0e8faa89-4cf8-46e1-a7f9-199ae7cb09f0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/subscriptions/59442dab78b6e60085070002\",\r\n \"type\": \"Microsoft.ApiManagement/service/users/subscriptions\",\r\n \"name\": \"59442dab78b6e60085070002\",\r\n \"properties\": {\r\n \"userId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"productId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/products/unlimited\",\r\n \"displayName\": null,\r\n \"state\": \"active\",\r\n \"createdDate\": \"2017-06-16T19:12:43.717\",\r\n \"startDate\": null,\r\n \"expirationDate\": null,\r\n \"endDate\": null,\r\n \"notificationDate\": null,\r\n \"primaryKey\": \"5d7dc5e4a9f24d47956d0cea1205dcba\",\r\n \"secondaryKey\": \"088c12c96e8e4d5198a09c426f134bd0\",\r\n \"stateComment\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "68449011-b6f6-43ea-b249-622817927d76" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "8183a70c-e27d-4e85-b1d2-54536e08244f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191428Z:8183a70c-e27d-4e85-b1d2-54536e08244f" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/UserIdentities.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/UserIdentities.json new file mode 100644 index 000000000000..e201538a31e9 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ManagementApiTests.UserTests/UserIdentities.json @@ -0,0 +1,272 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"CentralUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "289" + ], + "x-ms-client-request-id": [ + "b606126f-4c55-4362-9986-c83ab734122a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4424dfac-6607-43a0-b687-daa68f3e177c", + "ac33d5e1-e8de-4ad6-928f-9000bdbf8617" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5a2ebc76-5173-48fc-8973-a04c87d74891" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191419Z:5a2ebc76-5173-48fc-8973-a04c87d74891" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ab758b6b-dd75-48bc-8033-40a43ce421e3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice\",\r\n \"name\": \"sdktestservice\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACZGyU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-06-16T19:08:53.4371217Z\",\r\n \"gatewayUrl\": \"https://sdktestservice.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestservice.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestservice.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestservice.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.77.113\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "\"AAAAAACZGyU=\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dbcfa83e-5284-4013-997d-f31f019c6ed3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "aec69d9f-406e-491c-b20c-fb478be9a370" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191419Z:aec69d9f-406e-491c-b20c-fb478be9a370" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users?$filter=firstName%20eq%20'Administrator'&api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycz8kZmlsdGVyPWZpcnN0TmFtZSUyMGVxJTIwJ0FkbWluaXN0cmF0b3InJmFwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c0fdd8ab-872c-40a9-a77d-e25076cd95e1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1\",\r\n \"type\": \"Microsoft.ApiManagement/service/users\",\r\n \"name\": \"1\",\r\n \"properties\": {\r\n \"firstName\": \"Administrator\",\r\n \"lastName\": \"\",\r\n \"email\": \"apim@autorestsdk.com\",\r\n \"state\": \"active\",\r\n \"registrationDate\": \"2017-06-16T19:12:43.183\",\r\n \"note\": null,\r\n \"identities\": [\r\n {\r\n \"provider\": \"Azure\",\r\n \"id\": \"apim@autorestsdk.com\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4530c261-a960-4246-882f-b542d605b454" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "314afd3b-ec9a-4958-bdea-1d1378d65f7f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191419Z:314afd3b-ec9a-4958-bdea-1d1378d65f7f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/sdktestservice/users/1/identities?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL0FwaS1EZWZhdWx0LUNlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkFwaU1hbmFnZW1lbnQvc2VydmljZS9zZGt0ZXN0c2VydmljZS91c2Vycy8xL2lkZW50aXRpZXM/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0fee0a78-4e60-417f-a436-dfa771a4af18" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"provider\": \"Azure\",\r\n \"id\": \"apim@autorestsdk.com\"\r\n }\r\n ],\r\n \"count\": 1,\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 19:14:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "33c8148f-6f63-4ac9-aeab-b7800fb2150e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "977a0c17-8e8a-4e8e-b247-56a2da6a129f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T191420Z:977a0c17-8e8a-4e8e-b247-56a2da6a129f" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestservice", + "Location": "CentralUS", + "ResourceGroup": "Api-Default-CentralUS" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/BackupAndRestoreService.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/BackupAndRestoreService.json new file mode 100644 index 000000000000..ad2b7047e1d1 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/BackupAndRestoreService.json @@ -0,0 +1,6596 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6c7c8365-a093-49ea-bd2a-3f3a9e61a2f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"authorization\": {\r\n \"applicationId\": \"8602e328-9b72-4f2d-a4ae-1387d013a2b3\",\r\n \"roleDefinitionId\": \"e263b525-2e60-4418-b655-420bae0b172e\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reportFeedback\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkFeedbackRequired\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:09:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-request-id": [ + "8b038ead-447b-4df4-be7d-6da081f90f25" + ], + "x-ms-correlation-request-id": [ + "8b038ead-447b-4df4-be7d-6da081f90f25" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T200943Z:8b038ead-447b-4df4-be7d-6da081f90f25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourcegroups/sdktestrg8665?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RyZzg2NjU/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "b2efb35b-a55f-44cd-ba88-0bb2e603eedc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665\",\r\n \"name\": \"sdktestrg8665\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:09:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-request-id": [ + "31c7cf46-a067-4a9d-b56b-53c0af04ccbc" + ], + "x-ms-correlation-request-id": [ + "31c7cf46-a067-4a9d-b56b-53c0af04ccbc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T200945Z:31c7cf46-a067-4a9d-b56b-53c0af04ccbc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "290" + ], + "x-ms-client-request-id": [ + "c701c7da-1052-47ec-9b98-2125ac24e1e8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298\",\r\n \"name\": \"sdktestapim9298\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACas/w=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Created\",\r\n \"targetProvisioningState\": \"Activating\",\r\n \"createdAtUtc\": \"2017-08-02T20:09:48.2009488Z\",\r\n \"gatewayUrl\": null,\r\n \"portalUrl\": null,\r\n \"managementApiUrl\": null,\r\n \"scmUrl\": null,\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "852" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:09:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAACas/w=\"" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw==?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "00676206-2c50-4809-85ae-58bfd9cf2c29", + "7c113733-ed4b-4ab1-b9bc-d0d7e912d88d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "53e44902-5e8d-487b-b6e3-bbad8dba1fa7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T200947Z:53e44902-5e8d-487b-b6e3-bbad8dba1fa7" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw==?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXc9PT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:10:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3e0ff3dd-35bd-426c-a01e-7842e0be57a6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "26781e95-990f-43c4-bb4f-f40524a40c05" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201017Z:26781e95-990f-43c4-bb4f-f40524a40c05" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:10:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bb20103d-c1ad-4b74-9c5a-42eaf00f7e35" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "75d93fa3-f04c-4323-aa97-288475be7088" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201047Z:75d93fa3-f04c-4323-aa97-288475be7088" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:11:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "aec97553-b998-4784-981c-2fc5bcd91858" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "46b1cf23-81b5-4fc9-b58f-f19ab0a198df" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201117Z:46b1cf23-81b5-4fc9-b58f-f19ab0a198df" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:11:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9c437ceb-a2c2-4df6-949c-485f98118020" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "6221ef45-0f6c-41a1-b3ea-1f8db1e7a5d5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201147Z:6221ef45-0f6c-41a1-b3ea-1f8db1e7a5d5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:12:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "22116770-72ed-472c-bd6f-e0c0432c53ea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "265dba00-897f-4c4a-985f-deb9c64301d4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201218Z:265dba00-897f-4c4a-985f-deb9c64301d4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:12:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5039cb9a-2a44-4b93-89f3-2b48b7530638" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "d3800bd6-dc23-406c-9287-efb16b04d3b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201248Z:d3800bd6-dc23-406c-9287-efb16b04d3b7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:13:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c1cc171d-943c-4958-8f76-c10cbad20252" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "6b76ad15-65d1-4a0f-902f-07e3e619c3a2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201318Z:6b76ad15-65d1-4a0f-902f-07e3e619c3a2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:13:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6fd2784b-8360-4bc2-9eca-e91e816a58a9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "557f0d22-ce76-4df9-92d5-e591b29178b9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201348Z:557f0d22-ce76-4df9-92d5-e591b29178b9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:14:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cff5837a-f9a6-4355-8720-f2bf388eeedd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "c5d56f46-881c-46a5-ab9f-fdf54f4cff45" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201418Z:c5d56f46-881c-46a5-ab9f-fdf54f4cff45" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:14:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b9199733-9d33-4a78-a099-c41907d2b29a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "ea131700-491f-4a3f-82f8-612047dd509f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201448Z:ea131700-491f-4a3f-82f8-612047dd509f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:15:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ac9ad3ce-c636-4b58-ad8a-bc10aa1ae343" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14961" + ], + "x-ms-correlation-request-id": [ + "a47d7627-0d70-4f73-aba8-5228d4369bce" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201518Z:a47d7627-0d70-4f73-aba8-5228d4369bce" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:15:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4aadb935-764f-4a07-82fc-8c1924dfe235" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14959" + ], + "x-ms-correlation-request-id": [ + "d3460ec1-2829-4ce3-8bdd-a0cdcda08df5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201548Z:d3460ec1-2829-4ce3-8bdd-a0cdcda08df5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:16:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "49d04c9e-6e72-4cb2-9a9a-7359a428a4bc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14958" + ], + "x-ms-correlation-request-id": [ + "91cad370-a8fb-4659-adf2-88a8855b52cf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201619Z:91cad370-a8fb-4659-adf2-88a8855b52cf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:16:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c626711d-830e-4eb1-94d2-bff512d2bd8c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14956" + ], + "x-ms-correlation-request-id": [ + "a10eb199-0ac7-4ed7-8265-ab261da4ce00" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201649Z:a10eb199-0ac7-4ed7-8265-ab261da4ce00" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:17:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2cf6247f-e841-46aa-b2cd-b69b24b3fb97" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14954" + ], + "x-ms-correlation-request-id": [ + "2d4c9433-20e8-4639-a360-5cf3af1ce7e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201719Z:2d4c9433-20e8-4639-a360-5cf3af1ce7e6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:17:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c798b090-666c-443e-a61d-46e112718c65" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14952" + ], + "x-ms-correlation-request-id": [ + "598ccae5-d9f9-45fa-b1d8-189fe0d231ad" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201749Z:598ccae5-d9f9-45fa-b1d8-189fe0d231ad" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:18:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0bae443d-1bff-4335-97b1-f94a52066c7f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14950" + ], + "x-ms-correlation-request-id": [ + "982fdd82-2f1d-4381-83c6-2953dbeec040" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201819Z:982fdd82-2f1d-4381-83c6-2953dbeec040" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:18:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f3cb777b-313d-4a21-849c-bd58a6bed6a9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "41c50057-3261-44c2-99d8-8de535cafcc7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201849Z:41c50057-3261-44c2-99d8-8de535cafcc7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:19:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "69e25e10-8120-48cd-9860-532fb7b95d75" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "51d0f94c-61f4-4aa1-ace6-46abeecd20bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201919Z:51d0f94c-61f4-4aa1-ace6-46abeecd20bd" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:19:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "75763679-4e86-48cb-8e4d-d5af0e3718aa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14944" + ], + "x-ms-correlation-request-id": [ + "3c6d3df0-2025-4bae-9ef7-22778b2a1b39" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T201950Z:3c6d3df0-2025-4bae-9ef7-22778b2a1b39" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:20:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0ddadf52-7877-4090-bdce-63df75da4202" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "ea7bcf7f-f583-4172-b532-7d20fcb3e433" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202020Z:ea7bcf7f-f583-4172-b532-7d20fcb3e433" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:20:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c6d09fd6-c391-4adc-98a1-cc51f44624fc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "b049dc73-4e86-41b4-9994-2b160ea7de8d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202050Z:b049dc73-4e86-41b4-9994-2b160ea7de8d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:21:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "03618dd1-6704-4131-a538-40fcaf7f95a1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14943" + ], + "x-ms-correlation-request-id": [ + "2a9532bd-a048-410d-97d6-115a1dbc2ec3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202120Z:2a9532bd-a048-410d-97d6-115a1dbc2ec3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:21:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0605479c-3ffd-43cc-9794-b90130b0834b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14942" + ], + "x-ms-correlation-request-id": [ + "5e6c56df-b721-4915-9780-999f2826256b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202150Z:5e6c56df-b721-4915-9780-999f2826256b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:22:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7b694d37-4ee2-405e-8425-5c27b5d4dc68" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14940" + ], + "x-ms-correlation-request-id": [ + "3b8d2b7c-157e-498d-954b-0a8b02466086" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202220Z:3b8d2b7c-157e-498d-954b-0a8b02466086" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:22:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "178803ce-895b-47d6-81e4-257a95126fd8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14938" + ], + "x-ms-correlation-request-id": [ + "688bd5a1-d3a5-4e52-bd7c-8c33e0919e0b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202250Z:688bd5a1-d3a5-4e52-bd7c-8c33e0919e0b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:23:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5a1db525-6192-4bdd-a31c-6296b0e5a25f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14936" + ], + "x-ms-correlation-request-id": [ + "0b9e7664-bc98-4d30-9442-05d2f0e4fb13" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202320Z:0b9e7664-bc98-4d30-9442-05d2f0e4fb13" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:23:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e71f60fe-4893-4015-a260-6e32d471f67d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14935" + ], + "x-ms-correlation-request-id": [ + "3d20cc06-84d0-452c-9957-5ee87aa2062f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202351Z:3d20cc06-84d0-452c-9957-5ee87aa2062f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:24:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "18f6f279-7e5b-4a6a-942e-80d57fa7ab96" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14934" + ], + "x-ms-correlation-request-id": [ + "1a303f79-1a37-4cf0-beb8-24f5ec424b99" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202421Z:1a303f79-1a37-4cf0-beb8-24f5ec424b99" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:24:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a5fad74a-e1f6-43fe-97b5-29d5da047c9e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14933" + ], + "x-ms-correlation-request-id": [ + "1d6a5264-5fd4-4382-a4db-ed14e79ae2bc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202452Z:1d6a5264-5fd4-4382-a4db-ed14e79ae2bc" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:25:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "80d9b3e6-52e3-40cb-a579-dc8329d02f88" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14932" + ], + "x-ms-correlation-request-id": [ + "0a4845d4-345e-40ea-b57e-f51ae85d92e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202522Z:0a4845d4-345e-40ea-b57e-f51ae85d92e6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:25:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5462cdd8-4c90-4d84-aa19-1934afdfbd1c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14930" + ], + "x-ms-correlation-request-id": [ + "44423339-207a-4f82-a327-6f2c457e7872" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202552Z:44423339-207a-4f82-a327-6f2c457e7872" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:26:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "78c700f5-86b9-4a40-ac64-37da58080ddc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14928" + ], + "x-ms-correlation-request-id": [ + "995b93c2-a8c3-43d1-b5a7-81cd3ee7d12e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202622Z:995b93c2-a8c3-43d1-b5a7-81cd3ee7d12e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:26:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "04cefdf6-9715-486b-b8a4-fcdddee31ec9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14927" + ], + "x-ms-correlation-request-id": [ + "06ea5abd-877a-4036-bd5e-2cb477013295" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202652Z:06ea5abd-877a-4036-bd5e-2cb477013295" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:27:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ad9361ff-4c99-4dc3-8cc1-61ee9ac15cbd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14926" + ], + "x-ms-correlation-request-id": [ + "1335d9b5-1651-4ef4-bd16-c482e9e62566" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202722Z:1335d9b5-1651-4ef4-bd16-c482e9e62566" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:27:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3a33a2d3-27ec-424d-8fd5-ec4bdb07acd6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14925" + ], + "x-ms-correlation-request-id": [ + "e87e49de-0d15-4504-9bfd-058265d3663c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202752Z:e87e49de-0d15-4504-9bfd-058265d3663c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:28:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "51ed3179-2b0c-4cbc-bea4-a72f9df7ea1f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14924" + ], + "x-ms-correlation-request-id": [ + "c3ddf50c-2e96-4d9f-af80-9ff077ac520d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202823Z:c3ddf50c-2e96-4d9f-af80-9ff077ac520d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:28:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8ee92d7b-3f58-45b8-8a48-36f1c831a88c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14923" + ], + "x-ms-correlation-request-id": [ + "98cade6a-80c8-4e40-85cc-dfa5a5fb9395" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202853Z:98cade6a-80c8-4e40-85cc-dfa5a5fb9395" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:29:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2e8943bd-b78b-446a-8ff9-ac283d4ae4f1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14922" + ], + "x-ms-correlation-request-id": [ + "951c3a68-8f10-418c-92cf-856359dc2873" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202923Z:951c3a68-8f10-418c-92cf-856359dc2873" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:29:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c0112b7e-7487-4101-8a18-2840a64637a7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14920" + ], + "x-ms-correlation-request-id": [ + "595f714c-bbe3-465a-b76b-2a36a127f450" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T202953Z:595f714c-bbe3-465a-b76b-2a36a127f450" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:30:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "41ed56d7-b5e2-412f-8fd6-de27191bc744" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14920" + ], + "x-ms-correlation-request-id": [ + "cbfc18a3-d4e0-49c3-9ecc-07a08cdab977" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203023Z:cbfc18a3-d4e0-49c3-9ecc-07a08cdab977" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:30:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0881032e-7aff-42fa-a7a1-6be5acbe1e73" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14917" + ], + "x-ms-correlation-request-id": [ + "6be2a59a-1ce0-4411-aeaf-fde3a03fcbb6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203053Z:6be2a59a-1ce0-4411-aeaf-fde3a03fcbb6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:31:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "211c4f63-fc27-4184-a658-6baa404d875c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14913" + ], + "x-ms-correlation-request-id": [ + "895e49e3-3b01-410e-8c37-cdcb0075297c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203123Z:895e49e3-3b01-410e-8c37-cdcb0075297c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:31:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a67153c3-91ea-4b5d-96ff-6a69eff19e1b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14911" + ], + "x-ms-correlation-request-id": [ + "8b49b903-5e46-40b2-9a68-c224b05c6f3c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203154Z:8b49b903-5e46-40b2-9a68-c224b05c6f3c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:32:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e1f8ffd9-d676-4665-906e-a19b2261ebdb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14910" + ], + "x-ms-correlation-request-id": [ + "ed4901db-ddaf-42ac-8470-fc489d63c47c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203224Z:ed4901db-ddaf-42ac-8470-fc489d63c47c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:32:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ac8524fa-a5d4-4f7d-b7f1-354f304ec896" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14908" + ], + "x-ms-correlation-request-id": [ + "87a08962-09ce-4445-8015-95201a3eb9bf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203254Z:87a08962-09ce-4445-8015-95201a3eb9bf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:33:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d31312a1-2348-4108-a61a-e4e1880f3b28" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14907" + ], + "x-ms-correlation-request-id": [ + "4a0e92dd-0c9d-4b32-9da7-67b36fed4906" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203324Z:4a0e92dd-0c9d-4b32-9da7-67b36fed4906" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:33:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4eed90df-79f1-4ae3-a8f6-006dfa62de78" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14906" + ], + "x-ms-correlation-request-id": [ + "309ac182-72e7-4fb9-8866-21ea8e97bd6f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203354Z:309ac182-72e7-4fb9-8866-21ea8e97bd6f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:34:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "40961576-d6c4-4272-9e14-65d8147923a5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14904" + ], + "x-ms-correlation-request-id": [ + "7cba51cd-3a53-4284-95b7-cc2457972fd3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203424Z:7cba51cd-3a53-4284-95b7-cc2457972fd3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:34:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "40cd6dca-1f8d-4447-9055-c152f0ef5f9f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14903" + ], + "x-ms-correlation-request-id": [ + "718178b8-932d-419a-82f5-21d52c7af0c0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203454Z:718178b8-932d-419a-82f5-21d52c7af0c0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:35:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2581b270-c48b-40d6-b17c-33c26a441674" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14903" + ], + "x-ms-correlation-request-id": [ + "51c089f5-98e0-4dc5-b223-f45bebeb068f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203524Z:51c089f5-98e0-4dc5-b223-f45bebeb068f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:35:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8c512d24-b2b8-4a52-8434-ab8852c33bc7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14901" + ], + "x-ms-correlation-request-id": [ + "b9959173-078d-440c-8aca-f93c1a82fad5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203555Z:b9959173-078d-440c-8aca-f93c1a82fad5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:36:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0b8b326f-8a31-42ea-b2f6-fa0436daff17" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14899" + ], + "x-ms-correlation-request-id": [ + "e2c0aeec-d87a-4871-bcaa-543259486ba4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203625Z:e2c0aeec-d87a-4871-bcaa-543259486ba4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:36:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a34d2ba0-5f29-4dcd-be04-79a78c137081" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14897" + ], + "x-ms-correlation-request-id": [ + "6392b1b9-8d82-4de8-a843-6b77961ad5e4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203655Z:6392b1b9-8d82-4de8-a843-6b77961ad5e4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:37:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d52fd3aa-a521-4e60-901f-7ee9f7285b93" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14894" + ], + "x-ms-correlation-request-id": [ + "735bc4d3-f83e-4a0e-ba24-3c9d2bd52340" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203726Z:735bc4d3-f83e-4a0e-ba24-3c9d2bd52340" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:37:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9631d68f-0d2a-4f5b-866d-a5fef92fdf34" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14892" + ], + "x-ms-correlation-request-id": [ + "1e7884d6-8c4d-47a4-bc15-57ee08e4a219" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203756Z:1e7884d6-8c4d-47a4-bc15-57ee08e4a219" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:38:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3ba58cc0-827b-4498-95bf-2940e3394dfe" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14890" + ], + "x-ms-correlation-request-id": [ + "c553174d-cef4-4343-aa0d-63cf29caf68e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203826Z:c553174d-cef4-4343-aa0d-63cf29caf68e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:38:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0a10d52d-7544-4da6-b242-73cf54feb61c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14888" + ], + "x-ms-correlation-request-id": [ + "04063d6f-68a7-4a5c-b2f5-094abccc0640" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203856Z:04063d6f-68a7-4a5c-b2f5-094abccc0640" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:39:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "28e032fa-f41b-477b-aa8d-6a6ccbd53e7b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14887" + ], + "x-ms-correlation-request-id": [ + "76678a68-d7d8-4a84-9c28-894fd4f2545c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203926Z:76678a68-d7d8-4a84-9c28-894fd4f2545c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:39:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dbcdc5ea-90ca-428f-b37d-e0de67ced14f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14886" + ], + "x-ms-correlation-request-id": [ + "20b8a0d2-e37a-42e9-a876-7ac7a9bf82a6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T203956Z:20b8a0d2-e37a-42e9-a876-7ac7a9bf82a6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:40:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b4e4189e-765f-4d9a-a6e2-d0a08183bcf8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14885" + ], + "x-ms-correlation-request-id": [ + "39fe3e7f-4c2b-4c01-b624-f8419ffcfdbe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204026Z:39fe3e7f-4c2b-4c01-b624-f8419ffcfdbe" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:40:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a8798082-3dcc-4961-b3ed-b8555aecd987" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14884" + ], + "x-ms-correlation-request-id": [ + "910ad880-2eaa-459c-88c2-0b8ea4dd4966" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204056Z:910ad880-2eaa-459c-88c2-0b8ea4dd4966" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:41:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "945d3eaa-35f6-4057-8e03-5719f481d317" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14883" + ], + "x-ms-correlation-request-id": [ + "fb0503ac-fbf3-4a1b-9790-c392ca49e255" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204126Z:fb0503ac-fbf3-4a1b-9790-c392ca49e255" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:41:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "81faba41-282e-452a-a827-a4c73feb9ef9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14882" + ], + "x-ms-correlation-request-id": [ + "cd3772d4-f0cf-4a12-bed3-f4d930b8a64d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204157Z:cd3772d4-f0cf-4a12-bed3-f4d930b8a64d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:42:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9a095f0b-a9ed-4960-a29a-feca147eac9f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14879" + ], + "x-ms-correlation-request-id": [ + "9a802d68-b5fc-453c-85f0-825c6c70b29a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204227Z:9a802d68-b5fc-453c-85f0-825c6c70b29a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:42:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b3802144-f840-482d-ac98-6a70ceca8ed8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14877" + ], + "x-ms-correlation-request-id": [ + "6672e3c1-b8d2-4679-9052-6121df7fed90" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204257Z:6672e3c1-b8d2-4679-9052-6121df7fed90" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:43:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1e6d7a9c-9bca-4033-8702-67b949316167" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14875" + ], + "x-ms-correlation-request-id": [ + "6078b52b-0fb8-4cb7-8f47-bd0b55db1cee" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204327Z:6078b52b-0fb8-4cb7-8f47-bd0b55db1cee" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:43:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1030286b-1ef1-42c2-b498-3fc9b9f25715" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14873" + ], + "x-ms-correlation-request-id": [ + "771f3d55-b0ac-4ffb-acdc-5517b28b6155" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204357Z:771f3d55-b0ac-4ffb-acdc-5517b28b6155" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:44:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e08ffe93-2adb-4aed-a937-6cf29e0b6fad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14872" + ], + "x-ms-correlation-request-id": [ + "7aa7f328-a7ee-4f30-9a84-df7d5e28e491" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204428Z:7aa7f328-a7ee-4f30-9a84-df7d5e28e491" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:44:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6fa55e4a-9c8b-48ea-881f-894d7db836bd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14871" + ], + "x-ms-correlation-request-id": [ + "50da0703-7ff3-457e-995a-ed3343a2da4c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204458Z:50da0703-7ff3-457e-995a-ed3343a2da4c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0FjdF81NDcxMmZjYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEZqZEY4MU5EY3hNbVpqWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298\",\r\n \"name\": \"sdktestapim9298\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatRk=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T20:09:48.2009488Z\",\r\n \"gatewayUrl\": \"https://sdktestapim9298.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim9298.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim9298.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim9298.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.22.124\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:45:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4b423074-07aa-45ce-a959-dfe484413c7b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14870" + ], + "x-ms-correlation-request-id": [ + "22794199-c69a-4506-aca6-18e9720398c5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204530Z:22794199-c69a-4506-aca6-18e9720398c5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"sdkapimbackup1892\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "83" + ], + "x-ms-client-request-id": [ + "7ee30fa4-f6ef-4369-8046-4c12fda9b58d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:45:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e05f4840-1359-4773-acb5-8c1022c99842" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "e05f4840-1359-4773-acb5-8c1022c99842" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T204531Z:e05f4840-1359-4773-acb5-8c1022c99842" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.Storage/storageAccounts/sdkapimbackup1892?api-version=2016-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zZGthcGltYmFja3VwMTg5Mj9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\"\r\n },\r\n \"kind\": \"Storage\",\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "100" + ], + "x-ms-client-request-id": [ + "8e716749-4338-4a69-8e95-f3ce85923f9c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:45:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.Storage/operations/752c7db6-7d30-4de7-a9ac-ceaf73640569?monitor=true&api-version=2016-05-01" + ], + "Retry-After": [ + "17" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "ab0093dc-d74b-41bc-9905-f0886066c247" + ], + "x-ms-correlation-request-id": [ + "ab0093dc-d74b-41bc-9905-f0886066c247" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T204532Z:ab0093dc-d74b-41bc-9905-f0886066c247" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.Storage/operations/752c7db6-7d30-4de7-a9ac-ceaf73640569?monitor=true&api-version=2016-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9vcGVyYXRpb25zLzc1MmM3ZGI2LTdkMzAtNGRlNy1hOWFjLWNlYWY3MzY0MDU2OT9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAxNi0wNS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.Storage/storageAccounts/sdkapimbackup1892\",\r\n \"kind\": \"Storage\",\r\n \"location\": \"centralus\",\r\n \"name\": \"sdkapimbackup1892\",\r\n \"properties\": {\r\n \"creationTime\": \"2017-08-02T20:45:31.9745163Z\",\r\n \"primaryEndpoints\": {\r\n \"blob\": \"https://sdkapimbackup1892.blob.core.windows.net/\",\r\n \"file\": \"https://sdkapimbackup1892.file.core.windows.net/\",\r\n \"queue\": \"https://sdkapimbackup1892.queue.core.windows.net/\",\r\n \"table\": \"https://sdkapimbackup1892.table.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"centralus\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"secondaryLocation\": \"eastus2\",\r\n \"statusOfPrimary\": \"available\",\r\n \"statusOfSecondary\": \"available\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"tags\": {},\r\n \"type\": \"Microsoft.Storage/storageAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:46:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4ff40821-bc4d-4083-8394-8fb90570576c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "4ff40821-bc4d-4083-8394-8fb90570576c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T204602Z:4ff40821-bc4d-4083-8394-8fb90570576c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.Storage/storageAccounts/sdkapimbackup1892/listKeys?api-version=2016-05-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5TdG9yYWdlL3N0b3JhZ2VBY2NvdW50cy9zZGthcGltYmFja3VwMTg5Mi9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2c2b97f6-eace-4a97-bc71-a8985e1324b8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Storage.StorageManagementClient/6.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"keys\": [\r\n {\r\n \"keyName\": \"key1\",\r\n \"permissions\": \"Full\",\r\n \"value\": \"taaXoPuWxfSRyt6NjoZPXG+OH/8sLWM6LLiGBwLNQj1zEH4xXkGe/8YoFK+vJQrCZ9UFm0OW+hT/uyM+eJuiJA==\"\r\n },\r\n {\r\n \"keyName\": \"key2\",\r\n \"permissions\": \"Full\",\r\n \"value\": \"cmynlYDQqH2eKkAeNL09SEtZ3EBmsCCLNROj2k06ycRdr6JZtZm6NjWaNqaoZWUKKvBOuNlA7C+rX/zhhreOhQ==\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:46:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b15cfaa9-b10b-4208-b21f-65ea236fa032" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "b15cfaa9-b10b-4208-b21f-65ea236fa032" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T204603Z:b15cfaa9-b10b-4208-b21f-65ea236fa032" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/backup?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L2JhY2t1cD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"storageAccount\": \"sdkapimbackup1892\",\r\n \"accessKey\": \"taaXoPuWxfSRyt6NjoZPXG+OH/8sLWM6LLiGBwLNQj1zEH4xXkGe/8YoFK+vJQrCZ9UFm0OW+hT/uyM+eJuiJA==\",\r\n \"containerName\": \"apimbackupcontainer\",\r\n \"backupName\": \"apimbackup.zip\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "231" + ], + "x-ms-client-request-id": [ + "6f668b7d-f180-40ed-90eb-6430be5a4ad3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:46:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298//operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ==?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "90657c77-dc7a-4b75-98fa-11759d15c142" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "e0ca24f9-0434-4157-b901-4b86c49e7346" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204604Z:e0ca24f9-0434-4157-b901-4b86c49e7346" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298//operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ==?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4Ly9vcGVyYXRpb25yZXN1bHRzL2MyUnJkR1Z6ZEdGd2FXMDVNams0WDBKaFkydDFjRjltWkdJMk9UVTBOUT09P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:46:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "886b8b39-0087-490f-9fd4-cd8e473cbbd8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14867" + ], + "x-ms-correlation-request-id": [ + "06541e5f-41ca-41fe-b9b6-59b2243a7090" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204635Z:06541e5f-41ca-41fe-b9b6-59b2243a7090" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:47:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "67ed4044-db65-4673-af4a-d123728986b9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14866" + ], + "x-ms-correlation-request-id": [ + "889d2efe-6d7b-41e0-af23-0b9c45bbab6b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204705Z:889d2efe-6d7b-41e0-af23-0b9c45bbab6b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:47:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "358ee6f9-1ba6-44b1-8211-0927954b599b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14865" + ], + "x-ms-correlation-request-id": [ + "2f481e89-cde1-4e21-abdf-8057dc7d5160" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204735Z:2f481e89-cde1-4e21-abdf-8057dc7d5160" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:48:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "07458009-e459-4a21-be1f-b4f606e6d1ca" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14864" + ], + "x-ms-correlation-request-id": [ + "04085dc9-3bf2-443d-ae70-b1ed8d64d369" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204805Z:04085dc9-3bf2-443d-ae70-b1ed8d64d369" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:48:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cf78b9c8-2705-44fe-b36a-3e7ee157b344" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14863" + ], + "x-ms-correlation-request-id": [ + "88a26d75-824f-4042-9f21-0c4d9d12bcf8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204835Z:88a26d75-824f-4042-9f21-0c4d9d12bcf8" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:49:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c0eb94cf-7c4c-4fab-a446-445af387c5bf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14862" + ], + "x-ms-correlation-request-id": [ + "856d1a40-fec3-4dd4-858e-8836ab17c5ea" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204905Z:856d1a40-fec3-4dd4-858e-8836ab17c5ea" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:49:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4f013068-0325-43d8-b347-158d58da95d0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14861" + ], + "x-ms-correlation-request-id": [ + "8b026b21-cade-44e4-80ba-92e47a9f5761" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T204935Z:8b026b21-cade-44e4-80ba-92e47a9f5761" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:50:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "95e1d907-d465-49f5-aba8-e4790ce80e27" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14861" + ], + "x-ms-correlation-request-id": [ + "85354430-7b19-486e-9c0a-7046d610e805" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205006Z:85354430-7b19-486e-9c0a-7046d610e805" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:50:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6656a20f-587c-4985-88af-173604d21b10" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14860" + ], + "x-ms-correlation-request-id": [ + "5fb7bd68-e1e0-4b36-a336-3a24be0c3778" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205036Z:5fb7bd68-e1e0-4b36-a336-3a24be0c3778" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:51:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ea687c17-3e91-46db-9196-cb802e104c4c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14859" + ], + "x-ms-correlation-request-id": [ + "9be1a459-ea8f-4406-ba67-ecaaecf3db94" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205106Z:9be1a459-ea8f-4406-ba67-ecaaecf3db94" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:51:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8f37f79b-2886-4a1c-9cfa-919254f7f140" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14858" + ], + "x-ms-correlation-request-id": [ + "41536c2d-cd7e-4181-9e6a-3be36a2b6c49" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205136Z:41536c2d-cd7e-4181-9e6a-3be36a2b6c49" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:52:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f737f6db-5774-46e0-bf05-7d3bbac0832b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14857" + ], + "x-ms-correlation-request-id": [ + "f15d426c-7a84-4aae-9a69-54e3cf8b6693" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205207Z:f15d426c-7a84-4aae-9a69-54e3cf8b6693" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:52:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5e0d9f31-7816-40fe-90d7-53db32ce471a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14856" + ], + "x-ms-correlation-request-id": [ + "1472a4d3-78a3-4def-986e-b6a09f7e0f07" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205237Z:1472a4d3-78a3-4def-986e-b6a09f7e0f07" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:53:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "37416964-b4c1-4076-88d6-5f3a3fc0d15b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14855" + ], + "x-ms-correlation-request-id": [ + "24a657d5-92aa-45de-9a36-b0f439173ecb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205307Z:24a657d5-92aa-45de-9a36-b0f439173ecb" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:53:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7ee77428-7a16-4e93-9d05-2e55ff9184a1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14854" + ], + "x-ms-correlation-request-id": [ + "3b2268e7-01f2-4038-bc11-c187156b9d48" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205337Z:3b2268e7-01f2-4038-bc11-c187156b9d48" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:54:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1e02b101-0250-49f2-9a99-f3307860b6e5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14853" + ], + "x-ms-correlation-request-id": [ + "a935d8f8-6103-4d3e-8d8d-1b36443b5475" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205407Z:a935d8f8-6103-4d3e-8d8d-1b36443b5475" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X0JhY2t1cF9mZGI2OTU0NQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMEpoWTJ0MWNGOW1aR0kyT1RVME5RJTNEJTNEP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298\",\r\n \"name\": \"sdktestapim9298\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatSg=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T20:09:48.2009488Z\",\r\n \"gatewayUrl\": \"https://sdktestapim9298.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim9298.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim9298.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim9298.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.22.124\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:54:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "71ac3da5-e831-49a3-8b50-ff0853051972" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14852" + ], + "x-ms-correlation-request-id": [ + "cce79785-f20a-45f2-84b4-fce046fc3010" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205437Z:cce79785-f20a-45f2-84b4-fce046fc3010" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/restore?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L3Jlc3RvcmU/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"storageAccount\": \"sdkapimbackup1892\",\r\n \"accessKey\": \"taaXoPuWxfSRyt6NjoZPXG+OH/8sLWM6LLiGBwLNQj1zEH4xXkGe/8YoFK+vJQrCZ9UFm0OW+hT/uyM+eJuiJA==\",\r\n \"containerName\": \"apimbackupcontainer\",\r\n \"backupName\": \"apimbackup.zip\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "231" + ], + "x-ms-client-request-id": [ + "ff45d37a-8a9c-4f6a-a451-6ef881ade19d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:54:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298//operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ=?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e3ead747-e597-43d0-afc2-539ec49fc6bc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "b9b550aa-76e7-44a8-9367-dec2d1d2261a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205438Z:b9b550aa-76e7-44a8-9367-dec2d1d2261a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298//operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ=?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4Ly9vcGVyYXRpb25yZXN1bHRzL2MyUnJkR1Z6ZEdGd2FXMDVNams0WDFKbGMzUnZjbVZmTVdJeVlqWmhaRFE9P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:55:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "239fef39-5d3d-4480-852e-fab8092edeed" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14852" + ], + "x-ms-correlation-request-id": [ + "288088fa-b98e-42e9-bdbf-a754b917b38c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205508Z:288088fa-b98e-42e9-bdbf-a754b917b38c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:55:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8cdef9ae-8c0d-428f-abdf-7f2054376fcf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14851" + ], + "x-ms-correlation-request-id": [ + "3ebe203f-0988-4c55-83db-9d24d6459797" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205538Z:3ebe203f-0988-4c55-83db-9d24d6459797" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:56:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "74763ab0-bc99-4fe9-a676-136c1b1cf804" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14850" + ], + "x-ms-correlation-request-id": [ + "1cdd4aa0-f44b-4150-a733-e64120db835b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205608Z:1cdd4aa0-f44b-4150-a733-e64120db835b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:56:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e7d607a1-c9be-431b-a8ee-9efd85418542" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14849" + ], + "x-ms-correlation-request-id": [ + "e17969c4-b162-4886-ab60-2cf9a3b58c5f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205639Z:e17969c4-b162-4886-ab60-2cf9a3b58c5f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:57:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "670d690d-f911-4c1f-8b79-ee34aef6ff4a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14848" + ], + "x-ms-correlation-request-id": [ + "79c6dcb9-e241-4806-97ed-a9d01ded99bf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205710Z:79c6dcb9-e241-4806-97ed-a9d01ded99bf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:57:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4fc2c653-347e-4705-9d65-a274eed68dde" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14847" + ], + "x-ms-correlation-request-id": [ + "431a32e7-1b43-40db-935d-f1cf265fbcef" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205740Z:431a32e7-1b43-40db-935d-f1cf265fbcef" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:58:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a2682cc5-b8f9-4a67-92ef-920ea404d324" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14846" + ], + "x-ms-correlation-request-id": [ + "3f74a2cb-3686-4273-b63c-38a042dc4793" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205810Z:3f74a2cb-3686-4273-b63c-38a042dc4793" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:58:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "18a90081-4b4f-4f53-95dd-09d5c12765ee" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14845" + ], + "x-ms-correlation-request-id": [ + "d3bcc15a-6893-4064-bf9f-7b1d73974e46" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205840Z:d3bcc15a-6893-4064-bf9f-7b1d73974e46" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:59:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "63a10326-d0ab-4b7f-bb68-b65ee5fe2f8e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14844" + ], + "x-ms-correlation-request-id": [ + "077d50d6-3786-42f7-8f91-537ad68424a4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205910Z:077d50d6-3786-42f7-8f91-537ad68424a4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 20:59:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "928f5c70-6556-4922-b4e7-01032d160364" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14843" + ], + "x-ms-correlation-request-id": [ + "449d14d1-aa26-4da8-b0c2-30fae7f19ebf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T205941Z:449d14d1-aa26-4da8-b0c2-30fae7f19ebf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:00:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "45983e02-d1a7-4dd1-9cf1-2554a4a48e8f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14842" + ], + "x-ms-correlation-request-id": [ + "4cbf93e5-20e4-4b4d-a869-52532d7dbc60" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210011Z:4cbf93e5-20e4-4b4d-a869-52532d7dbc60" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:00:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "80e28847-955c-4742-bd1e-5a380d0e3ff7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14841" + ], + "x-ms-correlation-request-id": [ + "76a6ceb0-2bd0-4164-969d-d3e2100004f6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210041Z:76a6ceb0-2bd0-4164-969d-d3e2100004f6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:01:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "949a24e6-f043-4529-bfac-b1f4e9cf3e37" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14840" + ], + "x-ms-correlation-request-id": [ + "e7de78c3-9336-4311-a55c-e0dd512d6d06" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210111Z:e7de78c3-9336-4311-a55c-e0dd512d6d06" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:01:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9fbb5165-0e8f-454d-acca-b13edbdec681" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14839" + ], + "x-ms-correlation-request-id": [ + "f5f40383-ae11-43b2-976f-9afb9d935fb0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210142Z:f5f40383-ae11-43b2-976f-9afb9d935fb0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:02:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "538424de-7368-49cb-adb6-1f4cf337623c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14838" + ], + "x-ms-correlation-request-id": [ + "639ae2dc-104c-4fc4-8ed1-ee74a208b37d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210212Z:639ae2dc-104c-4fc4-8ed1-ee74a208b37d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:02:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "614d6480-e8b1-4047-84ba-52d109ae8135" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14837" + ], + "x-ms-correlation-request-id": [ + "d29ad2a2-6934-4211-924c-fae99d5034f5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210242Z:d29ad2a2-6934-4211-924c-fae99d5034f5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:03:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7a8d34be-0352-4bd7-b187-883074662f7f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14836" + ], + "x-ms-correlation-request-id": [ + "bbe311a8-61e2-41d3-a7c5-f2ea7b419d13" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210312Z:bbe311a8-61e2-41d3-a7c5-f2ea7b419d13" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:03:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "376b8c1d-27b7-45a1-8c8a-82d7f5252198" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14835" + ], + "x-ms-correlation-request-id": [ + "a1639b8d-389f-4ab3-8d0f-0d61b67e3bfa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210342Z:a1639b8d-389f-4ab3-8d0f-0d61b67e3bfa" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:04:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6aa2db7a-6fed-47fc-bd43-d67eab686410" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14833" + ], + "x-ms-correlation-request-id": [ + "4735ca6b-4753-431d-85ee-72b5687346a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210412Z:4735ca6b-4753-431d-85ee-72b5687346a9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:04:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ffc3c9e4-5745-4e4a-9d29-f5735f783787" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14831" + ], + "x-ms-correlation-request-id": [ + "582b5338-fc33-46bb-9449-5e636c9ab295" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210443Z:582b5338-fc33-46bb-9449-5e636c9ab295" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298/operationresults/c2RrdGVzdGFwaW05Mjk4X1Jlc3RvcmVfMWIyYjZhZDQ%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzg2NjUvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05Mjk4L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU1qazRYMUpsYzNSdmNtVmZNV0l5WWpaaFpEUSUzRD9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg8665/providers/Microsoft.ApiManagement/service/sdktestapim9298\",\r\n \"name\": \"sdktestapim9298\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatYw=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T20:09:48.2009488Z\",\r\n \"gatewayUrl\": \"https://sdktestapim9298.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim9298.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim9298.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim9298.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.22.124\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c16ea447-0f75-4c2a-aef9-36de3aeeb90b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14835" + ], + "x-ms-correlation-request-id": [ + "eebbc275-1921-4fde-a5a2-bc196a6a2d7c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T210513Z:eebbc275-1921-4fde-a5a2-bc196a6a2d7c" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Initialize": [ + "sdktestapim9298", + "sdktestrg8665" + ], + "BackupAndRestoreService": [ + "sdkapimbackup1892" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestapim9298", + "Location": "Central US", + "ResourceGroup": "sdktestrg8665" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateInVirtualNetworkTest.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateInVirtualNetworkTest.json new file mode 100644 index 000000000000..594d4a2b9ec6 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateInVirtualNetworkTest.json @@ -0,0 +1,4993 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79ce337e-6bf9-480a-a73e-4d804b109bc2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"authorization\": {\r\n \"applicationId\": \"8602e328-9b72-4f2d-a4ae-1387d013a2b3\",\r\n \"roleDefinitionId\": \"e263b525-2e60-4418-b655-420bae0b172e\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reportFeedback\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkFeedbackRequired\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-request-id": [ + "e6d47495-797d-4a72-89df-0799fc212cd6" + ], + "x-ms-correlation-request-id": [ + "e6d47495-797d-4a72-89df-0799fc212cd6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210523Z:e6d47495-797d-4a72-89df-0799fc212cd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourcegroups/sdktestrg1641?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RyZzE2NDE/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "b14273cf-1fc8-4301-8f53-6f3c3405dbfa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641\",\r\n \"name\": \"sdktestrg1641\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "e06b3595-a5c5-4906-a07d-f145ef7ac633" + ], + "x-ms-correlation-request-id": [ + "e06b3595-a5c5-4906-a07d-f145ef7ac633" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210525Z:e06b3595-a5c5-4906-a07d-f145ef7ac633" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5OZXR3b3JrL3ZpcnR1YWxOZXR3b3Jrcy9hcGltdm5ldDgwMjc/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"properties\": {\r\n \"addressPrefix\": \"10.0.1.0/24\"\r\n },\r\n \"name\": \"apimsubnet3219\"\r\n }\r\n ]\r\n },\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "304" + ], + "x-ms-client-request-id": [ + "12d4a023-7f0c-4ea4-bef6-c36df649fb0b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Network.NetworkManagementClient/10.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"apimvnet8027\",\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027\",\r\n \"etag\": \"W/\\\"d1fedf61-7bd2-4fc4-8e25-8a48cec53e1b\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"c82d8160-013a-48d9-a499-e2820f75ba80\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"apimsubnet3219\",\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\",\r\n \"etag\": \"W/\\\"d1fedf61-7bd2-4fc4-8e25-8a48cec53e1b\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1005" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "3" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": [ + "2f9d4bb6-4767-4de8-91d6-a8d6dce6a245" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.Network/locations/centralus/operations/2f9d4bb6-4767-4de8-91d6-a8d6dce6a245?api-version=2017-03-01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "d93c0d8c-709e-4f71-b34d-6d4a60017554" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210526Z:d93c0d8c-709e-4f71-b34d-6d4a60017554" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.Network/locations/centralus/operations/2f9d4bb6-4767-4de8-91d6-a8d6dce6a245?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvY2VudHJhbHVzL29wZXJhdGlvbnMvMmY5ZDRiYjYtNDc2Ny00ZGU4LTkxZDYtYThkNmRjZTZhMjQ1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Network.NetworkManagementClient/10.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b4ad8d17-4e1c-44d0-9530-535365941840" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "8aa53959-281e-4e90-9fcd-29ee61e1f4f8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210557Z:8aa53959-281e-4e90-9fcd-29ee61e1f4f8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5OZXR3b3JrL3ZpcnR1YWxOZXR3b3Jrcy9hcGltdm5ldDgwMjc/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Network.NetworkManagementClient/10.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"apimvnet8027\",\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027\",\r\n \"etag\": \"W/\\\"fe9e3079-3752-4701-85f6-0d5780ca9133\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c82d8160-013a-48d9-a499-e2820f75ba80\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"apimsubnet3219\",\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\",\r\n \"etag\": \"W/\\\"fe9e3079-3752-4701-85f6-0d5780ca9133\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "W/\"fe9e3079-3752-4701-85f6-0d5780ca9133\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "72b86f9d-146c-471b-85b2-b55c4b83dab9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "e797f46f-cbc0-4e40-a5ee-2415924620a3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210557Z:e797f46f-cbc0-4e40-a5ee-2415924620a3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5OZXR3b3JrL3ZpcnR1YWxOZXR3b3Jrcy9hcGltdm5ldDgwMjcvc3VibmV0cy9hcGltc3VibmV0MzIxOT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a622d3a8-bfca-4b21-8792-8832162da98d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Network.NetworkManagementClient/10.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"apimsubnet3219\",\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\",\r\n \"etag\": \"W/\\\"fe9e3079-3752-4701-85f6-0d5780ca9133\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:05:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "ETag": [ + "W/\"fe9e3079-3752-4701-85f6-0d5780ca9133\"" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "19745840-cca6-4f0a-90b9-4d3f9fa857ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "24733317-c55f-43be-bd74-0ae1c3157181" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210558Z:24733317-c55f-43be-bd74-0ae1c3157181" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"virtualNetworkConfiguration\": {\r\n \"subnetResourceId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\"\r\n },\r\n \"virtualNetworkType\": \"External\",\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "565" + ], + "x-ms-client-request-id": [ + "c60d102e-2c1f-4f45-a1ad-fcc6f5d98e2a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459\",\r\n \"name\": \"sdktestapim9459\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatZE=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Created\",\r\n \"targetProvisioningState\": \"Activating\",\r\n \"createdAtUtc\": \"2017-08-02T21:06:01.0149193Z\",\r\n \"gatewayUrl\": null,\r\n \"portalUrl\": null,\r\n \"managementApiUrl\": null,\r\n \"scmUrl\": null,\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": {\r\n \"subnetResourceId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\",\r\n \"vnetid\": \"00000000-0000-0000-0000-000000000000\",\r\n \"subnetname\": null\r\n },\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"External\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1101" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:06:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAACatZE=\"" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ==?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6aeb6049-4014-45a1-a366-b5db7dc9a22c", + "648367a0-71fd-44e0-98af-e79ffb2a982b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "04f815e8-29a1-44ae-8627-893dcaad772c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210600Z:04f815e8-29a1-44ae-8627-893dcaad772c" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ==?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlE9PT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:06:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "97518156-6056-438a-99e1-ebff41868dab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "3cbc3927-2ad8-4ee4-b457-fe8d8d277297" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210630Z:3cbc3927-2ad8-4ee4-b457-fe8d8d277297" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:07:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b93bda55-61c0-403a-9193-31c29a9b9a34" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "b6fd69e2-04d0-4655-9846-af60f2b482a0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210701Z:b6fd69e2-04d0-4655-9846-af60f2b482a0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:07:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "728d321a-2010-4a85-ac05-24585c92627c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "1e31bb2b-95eb-458a-a4d9-d716b4e3a9a4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210731Z:1e31bb2b-95eb-458a-a4d9-d716b4e3a9a4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:08:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "04bb8073-2e9b-4069-9c4d-619121d7a01f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "5df654a6-4740-4a79-b266-1819b4c57ed4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210801Z:5df654a6-4740-4a79-b266-1819b4c57ed4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:08:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "385b92d8-3dff-4a75-98c9-71efd596aede" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "0f051341-fa2c-40fa-acad-3db183b22eb2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210831Z:0f051341-fa2c-40fa-acad-3db183b22eb2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:09:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6b36a4f4-677e-4372-92fc-c4bc75046b98" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "77bfb86b-35c8-4ed0-86f0-98484abbe00a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210902Z:77bfb86b-35c8-4ed0-86f0-98484abbe00a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:09:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7a06fdd9-c157-4135-9965-efc9a03e315c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "2f04def8-d967-462d-82ed-f003de930489" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T210932Z:2f04def8-d967-462d-82ed-f003de930489" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:10:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c99c0d1c-fdfe-4dbc-a373-9d3ba30c8bf5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "6d73bbb9-b759-49ff-98f0-da39dd7c2c4c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211002Z:6d73bbb9-b759-49ff-98f0-da39dd7c2c4c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:10:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "57de9b50-f837-49cf-b2df-9098cbea97dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "01def476-914d-4244-a009-fdce32ee4262" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211032Z:01def476-914d-4244-a009-fdce32ee4262" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "20a52af9-0a7e-4b04-b277-2a6b8d43dcf8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "db6bd411-9b33-45ac-9910-0b5483df03f9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211102Z:db6bd411-9b33-45ac-9910-0b5483df03f9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:11:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c6436493-f492-48d0-b622-0bd7e133d062" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "dd6029b8-c790-4db6-a793-da882f956c1e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211135Z:dd6029b8-c790-4db6-a793-da882f956c1e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:12:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1a2c000a-e933-4509-8641-fbda04c980b1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "88f8ff5d-1b5f-4cae-a8e6-f28be388a807" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211206Z:88f8ff5d-1b5f-4cae-a8e6-f28be388a807" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:12:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ad743ee7-516b-486f-a084-9d24b422869a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "1d2da673-80df-4637-8266-2ac653b4b807" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211236Z:1d2da673-80df-4637-8266-2ac653b4b807" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:13:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0adc8c7f-1bfc-42c5-8725-1fd3046499df" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "c3c79a65-63a1-40c9-ac16-f6534326b57d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211307Z:c3c79a65-63a1-40c9-ac16-f6534326b57d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:13:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1c397814-77de-43c2-96bb-323082ffc63f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "06b5f14a-e555-411e-8bcf-d2659c906326" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211337Z:06b5f14a-e555-411e-8bcf-d2659c906326" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:14:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3a5f47d6-5b32-42bf-a166-80fd56ed983b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "f4ca96cc-81ae-4b00-a11f-0ae41c9aa4da" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211407Z:f4ca96cc-81ae-4b00-a11f-0ae41c9aa4da" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:14:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c04f02a2-78b8-485c-97d0-ab48e0b73a08" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "955d3541-78ec-4ff5-a457-dc0f92a0369a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211437Z:955d3541-78ec-4ff5-a457-dc0f92a0369a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:15:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d847f51b-685f-47ab-b28a-d880f6268828" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "e9f6485a-c36c-4eaa-a63d-09e7dbb67a6f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211507Z:e9f6485a-c36c-4eaa-a63d-09e7dbb67a6f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:15:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e7e65a96-549f-4d6a-bf5e-b1f0d7321327" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "ff0ccb7a-979f-400b-bd42-774b113f6b04" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211537Z:ff0ccb7a-979f-400b-bd42-774b113f6b04" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:16:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "27686ef7-b91e-4490-b8d9-e847bc8e38d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "0024453a-2328-4626-b8fc-e8499fbbf30c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211608Z:0024453a-2328-4626-b8fc-e8499fbbf30c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:16:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "03346a9f-c484-4d6a-b974-8799a54f550e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "10e5acec-b5d5-4dd6-95cc-fef553c3acd0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211639Z:10e5acec-b5d5-4dd6-95cc-fef553c3acd0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:17:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9504838b-4d9a-4e19-a72b-8e08616f551b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "fc575d8d-2606-4fe0-8dfe-85780cf98354" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211709Z:fc575d8d-2606-4fe0-8dfe-85780cf98354" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:17:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7bc0df05-5631-4d19-8fa0-1197392c14e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "c6835aab-2c12-4e3a-a637-f5c930b04a7f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211739Z:c6835aab-2c12-4e3a-a637-f5c930b04a7f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:18:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bd80a9e4-b9cd-4797-b391-9f950966aee7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "c8730e39-7e90-4094-abd6-b5afdc0cf8ca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211809Z:c8730e39-7e90-4094-abd6-b5afdc0cf8ca" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:18:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "aafc1c16-b864-490f-bba6-b67f05a70754" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "c05c6ad5-e766-46fc-99c4-77c63c14b98a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211839Z:c05c6ad5-e766-46fc-99c4-77c63c14b98a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:19:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3e916b5f-b8ce-4e37-a738-2f780daa5c7d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "4c904fdb-fd1f-4a0b-9a33-43a4497dd279" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211909Z:4c904fdb-fd1f-4a0b-9a33-43a4497dd279" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:19:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8d62bb16-d99d-445a-a767-450260ddfbf4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "e97f301e-e3de-4c80-87bc-dfe72bcaae82" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T211940Z:e97f301e-e3de-4c80-87bc-dfe72bcaae82" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:20:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4b1057a4-4760-4472-acf6-1387c31fe36d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "f47468fd-6fbc-4a37-b901-e65f0bf12683" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212010Z:f47468fd-6fbc-4a37-b901-e65f0bf12683" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:20:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3f7de7e7-db84-48e7-b111-91d49dc6c310" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "88d519e6-618c-4835-b3eb-7a07d21cc0ea" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212040Z:88d519e6-618c-4835-b3eb-7a07d21cc0ea" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:21:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "be3dd86c-0268-43ea-a883-4e090a27d4ce" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "2f3a2c53-7adc-4648-a904-d3e85beb51ef" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212110Z:2f3a2c53-7adc-4648-a904-d3e85beb51ef" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:21:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "49b4c1bf-20b8-4364-b768-348591de00a0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "a1bb9757-f1bc-4480-a130-2719d3dba393" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212140Z:a1bb9757-f1bc-4480-a130-2719d3dba393" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:22:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b426b530-7d95-4f1a-be0f-2d44562c79eb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "53dd851c-e2df-4490-815f-3dd49e68a0ce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212212Z:53dd851c-e2df-4490-815f-3dd49e68a0ce" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:22:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b3217cb8-f70f-40b1-84fa-a8caae4b86a7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14961" + ], + "x-ms-correlation-request-id": [ + "8dafc77c-5381-4b48-bdba-727aac400886" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212242Z:8dafc77c-5381-4b48-bdba-727aac400886" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:23:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "25689880-b3c8-4e7d-a12e-841f76983880" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14960" + ], + "x-ms-correlation-request-id": [ + "246b1480-9c24-48d9-ad9b-d514211f7cb8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212312Z:246b1480-9c24-48d9-ad9b-d514211f7cb8" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:23:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "31e2aada-f620-489b-b2b9-a802282dce3b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14959" + ], + "x-ms-correlation-request-id": [ + "bc899c5d-b792-449a-82ec-b56799a79dca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212342Z:bc899c5d-b792-449a-82ec-b56799a79dca" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:24:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b696aa28-eaf8-4a02-8486-01fb62029cef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14956" + ], + "x-ms-correlation-request-id": [ + "b4dc3b8d-8c0c-4d37-ad24-ced26e782a07" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212412Z:b4dc3b8d-8c0c-4d37-ad24-ced26e782a07" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:24:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6ab45855-5c49-4ccf-bbda-38d540088ba3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14954" + ], + "x-ms-correlation-request-id": [ + "bfb8d2ba-e07e-48ad-8b6e-8e9447f7823d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212443Z:bfb8d2ba-e07e-48ad-8b6e-8e9447f7823d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:25:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1151b9e6-1938-4e21-97d0-a9ecd04aaa3b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14955" + ], + "x-ms-correlation-request-id": [ + "f8dff8ad-4cd7-444c-9305-84577cc55ccb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212513Z:f8dff8ad-4cd7-444c-9305-84577cc55ccb" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:25:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c72a5566-9b61-4134-b4be-ff30a2ecc767" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14954" + ], + "x-ms-correlation-request-id": [ + "887826df-05f3-4fca-8af2-78adb034bbca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212544Z:887826df-05f3-4fca-8af2-78adb034bbca" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:26:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "320ce85f-aa96-41a8-b1bb-318a42ebac7e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14953" + ], + "x-ms-correlation-request-id": [ + "19d7a777-974a-44fe-9391-19afac71b5f1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212614Z:19d7a777-974a-44fe-9391-19afac71b5f1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:26:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2457ddd1-d124-4bb3-ad7f-00ef636800f8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14952" + ], + "x-ms-correlation-request-id": [ + "8c04a7d0-e777-4248-9d92-1e298288ffd3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212644Z:8c04a7d0-e777-4248-9d92-1e298288ffd3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:27:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a2276ae4-a9e1-4a20-b462-7ec4dbe9b131" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14951" + ], + "x-ms-correlation-request-id": [ + "3349be86-2668-4d58-8775-ad00a7ad6df0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212714Z:3349be86-2668-4d58-8775-ad00a7ad6df0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:27:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1afe80a3-fdf2-4cd4-9223-8d502a010a39" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14950" + ], + "x-ms-correlation-request-id": [ + "6d1b9406-75fd-416a-89a0-b73a1d2b6b1a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212745Z:6d1b9406-75fd-416a-89a0-b73a1d2b6b1a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:28:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "db29b997-9012-44b3-8e88-ebbcde0d0d49" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14949" + ], + "x-ms-correlation-request-id": [ + "bcc5522b-cb59-493d-90ef-982c45e57f46" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212815Z:bcc5522b-cb59-493d-90ef-982c45e57f46" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:28:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "782c4ebe-c4e7-4d23-bd2c-17fc156038d9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14948" + ], + "x-ms-correlation-request-id": [ + "e7b97ad1-1fe6-457f-9027-a963371f3e63" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212846Z:e7b97ad1-1fe6-457f-9027-a963371f3e63" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:29:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1ea29450-37cf-4d4d-b3fd-eb1257e0e4ed" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "9985d728-4988-4db1-8fef-2b7d54566294" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212916Z:9985d728-4988-4db1-8fef-2b7d54566294" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:29:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c99dbb85-554f-48dd-a9dd-841327e1dcd6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14946" + ], + "x-ms-correlation-request-id": [ + "58efb5cc-5216-4ffe-9348-b69bee5f6a9c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T212946Z:58efb5cc-5216-4ffe-9348-b69bee5f6a9c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:30:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ca547feb-66d5-41b2-8d42-18d9d8d4cc24" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "192d04f9-7e1e-4227-9def-ab4fe1a6891c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213016Z:192d04f9-7e1e-4227-9def-ab4fe1a6891c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:30:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fd8da234-11e1-47c4-90bc-6037a2e750e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14944" + ], + "x-ms-correlation-request-id": [ + "175a90c8-7e55-4cb4-b311-b8427452b1c3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213046Z:175a90c8-7e55-4cb4-b311-b8427452b1c3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:31:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3a00180b-fd0e-4b5f-bb72-d0e8ca10c259" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14943" + ], + "x-ms-correlation-request-id": [ + "8c905616-35d4-40f2-b77f-b3060a8a64c3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213116Z:8c905616-35d4-40f2-b77f-b3060a8a64c3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:31:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a74b6900-ff23-49e7-918c-e92ceb81928b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14942" + ], + "x-ms-correlation-request-id": [ + "d6fbe769-84a1-44bf-9fbf-1fc52c5725d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213148Z:d6fbe769-84a1-44bf-9fbf-1fc52c5725d2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:32:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "639863cc-1c5c-4290-9307-cec596d25f3a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14941" + ], + "x-ms-correlation-request-id": [ + "08562920-ff0c-4209-b026-4094cd671cc1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213218Z:08562920-ff0c-4209-b026-4094cd671cc1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:32:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2e27e7c8-9ac2-45cc-8f05-4d6acad8d535" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14940" + ], + "x-ms-correlation-request-id": [ + "f21c8a6d-1cb5-4552-b25c-7b26095bf37f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213248Z:f21c8a6d-1cb5-4552-b25c-7b26095bf37f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:33:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ba19c16f-1286-41a4-b7f9-cfec5556e6ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14939" + ], + "x-ms-correlation-request-id": [ + "1dd6faf5-5a43-45e4-9203-ea3a7d796c83" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213318Z:1dd6faf5-5a43-45e4-9203-ea3a7d796c83" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:33:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e8a2ef96-6dff-4018-ab7b-6298ee6a3f6e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14938" + ], + "x-ms-correlation-request-id": [ + "1e532a60-fccf-4f07-a588-4909c326179a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213348Z:1e532a60-fccf-4f07-a588-4909c326179a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:34:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4ef9a804-9716-4a09-a915-775befacc532" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14937" + ], + "x-ms-correlation-request-id": [ + "acb98f83-2ba1-43a9-aef6-53cac7070b92" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213418Z:acb98f83-2ba1-43a9-aef6-53cac7070b92" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:34:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "075a0cd9-ed70-41b4-9789-2bc07fb52c49" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14936" + ], + "x-ms-correlation-request-id": [ + "a0ee6dd5-afd0-47e7-b618-372a9820e33b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213449Z:a0ee6dd5-afd0-47e7-b618-372a9820e33b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:35:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "05f8d0ed-17c5-4590-ac11-5d9870941466" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14936" + ], + "x-ms-correlation-request-id": [ + "bc166970-7128-4f10-bd8e-1d6a2ce7ac6a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213519Z:bc166970-7128-4f10-bd8e-1d6a2ce7ac6a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:35:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "30f8e1d1-186e-4b28-88b2-019c541f7977" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14935" + ], + "x-ms-correlation-request-id": [ + "a9748f34-3543-45c0-b1f2-9f8e802ca9b1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213549Z:a9748f34-3543-45c0-b1f2-9f8e802ca9b1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:36:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b67b8c31-8ba5-42de-8c95-310d2c2fd1e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14934" + ], + "x-ms-correlation-request-id": [ + "365f826d-5e58-4bca-81aa-727221c3b497" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213619Z:365f826d-5e58-4bca-81aa-727221c3b497" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:36:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c3da23b1-3885-4e27-a70d-86c0ce8975dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14933" + ], + "x-ms-correlation-request-id": [ + "f983ec07-315e-48a2-ae77-097bc6032d7f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213649Z:f983ec07-315e-48a2-ae77-097bc6032d7f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X0FjdF83YzBkNWRlZQ%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMEZqZEY4M1l6QmtOV1JsWlElM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459\",\r\n \"name\": \"sdktestapim9459\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatpg=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T21:06:01.0149193Z\",\r\n \"gatewayUrl\": \"https://sdktestapim9459.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim9459.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim9459.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim9459.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"40.69.173.150\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": {\r\n \"subnetResourceId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\",\r\n \"vnetid\": \"00000000-0000-0000-0000-000000000000\",\r\n \"subnetname\": null\r\n },\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"External\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:37:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5f091d8c-636e-409a-8aef-e103f897658c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14932" + ], + "x-ms-correlation-request-id": [ + "7cef8fe2-9a87-45ff-b9d0-65fff45650ef" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213720Z:7cef8fe2-9a87-45ff-b9d0-65fff45650ef" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/applynetworkconfigurationupdates?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L2FwcGx5bmV0d29ya2NvbmZpZ3VyYXRpb251cGRhdGVzP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "5ddcb755-245a-4829-ab00-9b09d25f9b53" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:37:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459//operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q=?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "22f57398-f48c-41fd-81f4-2ed10433a888" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "67d52608-30f5-4df5-86f4-8dae7cfbd382" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213721Z:67d52608-30f5-4df5-86f4-8dae7cfbd382" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459//operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q=?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5Ly9vcGVyYXRpb25yZXN1bHRzL2MyUnJkR1Z6ZEdGd2FXMDVORFU1WDAxaGJtRm5aVkp2YkdWZk9EUTFOVFZsWTJRPT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:37:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e7f350d1-9b7d-418e-88e3-6db3da884b04" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14931" + ], + "x-ms-correlation-request-id": [ + "7af13707-7b26-43a3-be35-b44421e0b5ef" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213751Z:7af13707-7b26-43a3-be35-b44421e0b5ef" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:38:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f57f8449-30a1-4c93-8aae-1f025e1ce8cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14930" + ], + "x-ms-correlation-request-id": [ + "de1faeec-5995-485d-9af7-c97fc9841413" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213821Z:de1faeec-5995-485d-9af7-c97fc9841413" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:38:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0d5039be-cbf3-477c-ac9c-30d4dfcd26fb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14929" + ], + "x-ms-correlation-request-id": [ + "3f041bb2-e82a-40e2-b351-ebaf9fa790a3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213851Z:3f041bb2-e82a-40e2-b351-ebaf9fa790a3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:39:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0f2efa73-4652-46b5-be36-507511f9b46b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14928" + ], + "x-ms-correlation-request-id": [ + "df163b8f-ac8c-4005-8dd3-cebf2f8bf6b9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213921Z:df163b8f-ac8c-4005-8dd3-cebf2f8bf6b9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:39:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1442db6f-6cc8-4140-b65b-0d36436229ec" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14927" + ], + "x-ms-correlation-request-id": [ + "f5341816-d68e-4a73-add2-6dbf7bd31643" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T213951Z:f5341816-d68e-4a73-add2-6dbf7bd31643" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:40:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "67e594f1-4602-4004-9747-38ce6afd9925" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14925" + ], + "x-ms-correlation-request-id": [ + "acf3a63f-ccdc-4c4f-b7fe-f1663553bcdb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214021Z:acf3a63f-ccdc-4c4f-b7fe-f1663553bcdb" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:40:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "be595910-8fe5-4c30-9a3c-0e84ad8ddb7a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14924" + ], + "x-ms-correlation-request-id": [ + "43247dbb-55f2-4e01-b5a5-0e559aab766e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214051Z:43247dbb-55f2-4e01-b5a5-0e559aab766e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:41:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b15192be-9ba4-4e5d-8693-6b32cc83a17f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14922" + ], + "x-ms-correlation-request-id": [ + "7fb8cba0-26a3-47ad-afcf-a1a39c7d48da" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214122Z:7fb8cba0-26a3-47ad-afcf-a1a39c7d48da" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:41:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a6e28739-9238-42c8-9364-535349a86446" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14921" + ], + "x-ms-correlation-request-id": [ + "c7c19778-b7f9-4978-97fd-74e6f1f018ef" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214152Z:c7c19778-b7f9-4978-97fd-74e6f1f018ef" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:42:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c605fc24-e23e-4282-96da-bd4e407ffb02" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14920" + ], + "x-ms-correlation-request-id": [ + "b933cb55-5b18-4c0c-aa21-d5f4c2aa60ce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214222Z:b933cb55-5b18-4c0c-aa21-d5f4c2aa60ce" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:42:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fcbc43ec-6658-48ae-9301-02a66937dc6e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14919" + ], + "x-ms-correlation-request-id": [ + "1178910d-28b1-46a3-8f66-099272079091" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214252Z:1178910d-28b1-46a3-8f66-099272079091" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:43:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1d0189b6-b3f3-4bc3-ba82-7705b6d2f952" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14918" + ], + "x-ms-correlation-request-id": [ + "0404b8b0-da2d-4258-b81e-126963bde2e9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214322Z:0404b8b0-da2d-4258-b81e-126963bde2e9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:43:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5a9d125c-ef62-4211-baba-b7ecd8749e06" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14917" + ], + "x-ms-correlation-request-id": [ + "5a390372-2bbd-4aa7-a10f-ed88be1166f7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214352Z:5a390372-2bbd-4aa7-a10f-ed88be1166f7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:44:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5b4e9899-4482-42d0-9c43-daa72074ad39" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14916" + ], + "x-ms-correlation-request-id": [ + "f1c4929e-9c40-4b99-950f-384d862f24c8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214422Z:f1c4929e-9c40-4b99-950f-384d862f24c8" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:44:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0c0bc6b4-7526-47ec-abcd-09f922771c35" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14915" + ], + "x-ms-correlation-request-id": [ + "0027ecde-9255-433b-a456-633317cb8016" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214453Z:0027ecde-9255-433b-a456-633317cb8016" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:45:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d1b18e51-da77-457c-b722-f1d62f7494d9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14914" + ], + "x-ms-correlation-request-id": [ + "fab10ec9-69b6-4ddb-8a7b-178ba4d5fe00" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214523Z:fab10ec9-69b6-4ddb-8a7b-178ba4d5fe00" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459/operationresults/c2RrdGVzdGFwaW05NDU5X01hbmFnZVJvbGVfODQ1NTVlY2Q%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwNU5EVTVYMDFoYm1GblpWSnZiR1ZmT0RRMU5UVmxZMlElM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459\",\r\n \"name\": \"sdktestapim9459\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatqY=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T21:06:01.0149193Z\",\r\n \"gatewayUrl\": \"https://sdktestapim9459.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim9459.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim9459.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim9459.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"40.69.173.150\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": {\r\n \"subnetResourceId\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.Network/virtualNetworks/apimvnet8027/subnets/apimsubnet3219\",\r\n \"vnetid\": \"00000000-0000-0000-0000-000000000000\",\r\n \"subnetname\": null\r\n },\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"External\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:45:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "577f505f-8dd9-4d61-aa16-e3a157bb3497" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14913" + ], + "x-ms-correlation-request-id": [ + "7d3dd976-8e31-40bd-9131-2cb4943d8a32" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214553Z:7d3dd976-8e31-40bd-9131-2cb4943d8a32" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "46366b07-d930-454d-b1bb-71f61aa6eca3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "\"\"", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:45:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ba48f31c-f994-48d2-8a13-023c93c83974" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "65554f58-19c3-4df9-9b5f-1de4d4652eef" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214555Z:65554f58-19c3-4df9-9b5f-1de4d4652eef" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1641/providers/Microsoft.ApiManagement/service/sdktestapim9459?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE2NDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW05NDU5P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "970a778d-8498-40dd-b011-d78b47a22f49" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.ApiManagement/service/sdktestapim9459' under resource group 'sdktestrg1641' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "164" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:45:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "e0babed8-90ad-4f8f-8425-b38f92bb0a9b" + ], + "x-ms-correlation-request-id": [ + "e0babed8-90ad-4f8f-8425-b38f92bb0a9b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214555Z:e0babed8-90ad-4f8f-8425-b38f92bb0a9b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Initialize": [ + "sdktestapim9459", + "sdktestrg1641" + ], + "CreateInVirtualNetworkTest": [ + "apimvnet8027", + "apimsubnet3219" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestapim9459", + "Location": "Central US", + "ResourceGroup": "sdktestrg1641" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateListDelete.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateListDelete.json new file mode 100644 index 000000000000..38b9ee1e5bad --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateListDelete.json @@ -0,0 +1,4420 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2637e156-4b9b-4ba7-b938-90bde5aff265" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"authorization\": {\r\n \"applicationId\": \"8602e328-9b72-4f2d-a4ae-1387d013a2b3\",\r\n \"roleDefinitionId\": \"e263b525-2e60-4418-b655-420bae0b172e\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reportFeedback\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkFeedbackRequired\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:46:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-request-id": [ + "1af68b82-aeb1-4c0f-abb6-2ba66641d8ca" + ], + "x-ms-correlation-request-id": [ + "1af68b82-aeb1-4c0f-abb6-2ba66641d8ca" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214606Z:1af68b82-aeb1-4c0f-abb6-2ba66641d8ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourcegroups/sdktestrg2581?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RyZzI1ODE/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "53f55708-fd43-4a65-89da-3ed2dfb7f667" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581\",\r\n \"name\": \"sdktestrg2581\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:46:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "dd7b4609-9304-47a4-a858-d322b180860b" + ], + "x-ms-correlation-request-id": [ + "dd7b4609-9304-47a4-a858-d322b180860b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214607Z:dd7b4609-9304-47a4-a858-d322b180860b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement/checkNameAvailability?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"sdktestapim4195\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "33" + ], + "x-ms-client-request-id": [ + "0f9a555d-bfd7-4f8a-9284-0683fd4d7b04" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": \"Valid\",\r\n \"message\": \"\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:46:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "573782ac-6540-47bf-add5-40f1b4c91b38" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "d82cb2dc-26a7-49dd-a2f0-cc9aedb49b0a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214611Z:d82cb2dc-26a7-49dd-a2f0-cc9aedb49b0a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "290" + ], + "x-ms-client-request-id": [ + "cf0b615c-e475-440b-af94-34de18b4008c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195\",\r\n \"name\": \"sdktestapim4195\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACatrM=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Created\",\r\n \"targetProvisioningState\": \"Activating\",\r\n \"createdAtUtc\": \"2017-08-02T21:46:13.0496136Z\",\r\n \"gatewayUrl\": null,\r\n \"portalUrl\": null,\r\n \"managementApiUrl\": null,\r\n \"scmUrl\": null,\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "852" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:46:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAACatrM=\"" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg==?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "861e0846-354b-4b33-8f88-1e72155b5e10", + "f0d470bf-f4e3-496f-ad74-234daa65b4a4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "7b5f8b75-7cba-443a-814f-627ce7630e5e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214613Z:7b5f8b75-7cba-443a-814f-627ce7630e5e" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg==?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWc9PT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:46:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d64de6fb-5f0c-4e1e-9111-db88e1a4b266" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "b444de31-e577-4501-bfee-ff38208b2198" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214643Z:b444de31-e577-4501-bfee-ff38208b2198" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:47:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "347e7a6e-7ecc-4f67-aeb1-772725223df8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "bed35790-6c06-49c4-a15c-44a6a6f3ad28" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214713Z:bed35790-6c06-49c4-a15c-44a6a6f3ad28" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:47:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8ca7732d-bf3d-4fcb-bd41-de32548d1504" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "ceb9a291-89a4-40f3-9888-ab47b3512de9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214743Z:ceb9a291-89a4-40f3-9888-ab47b3512de9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:48:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f89d2c64-9f0c-4fab-8300-7a5b2a7130ae" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "586fa36a-5990-494c-bc79-d87fe98adf49" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214813Z:586fa36a-5990-494c-bc79-d87fe98adf49" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:48:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "91c56ff0-59db-4496-8f81-209bcd31ef2c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "8ad42056-b270-4a26-af29-94d6da5f792c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214843Z:8ad42056-b270-4a26-af29-94d6da5f792c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:49:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8cf38544-17e2-4cd3-a3df-9359102dda5d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "06f45157-26fb-4e09-bad1-2e9b3f908fe3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214914Z:06f45157-26fb-4e09-bad1-2e9b3f908fe3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:49:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a99507a8-21ee-4008-8bd0-2aeba6ea00db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "30ae9e9e-873d-4b62-a050-1243b30fd845" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T214944Z:30ae9e9e-873d-4b62-a050-1243b30fd845" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:50:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "44987239-2527-4540-b14d-2acef606ffd2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "2d2922d4-57fd-4480-b920-b1d12afdb1f6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215014Z:2d2922d4-57fd-4480-b920-b1d12afdb1f6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:50:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9b14c7db-6a2d-409a-b38b-b0b8ae9f5821" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "ee3a9176-9d63-4461-bafe-254662ae35f9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215044Z:ee3a9176-9d63-4461-bafe-254662ae35f9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:51:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "589c5454-3fee-42cf-adc8-e530c4a09620" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "aa54dc35-b2f7-4e5c-b57c-6192520a8185" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215114Z:aa54dc35-b2f7-4e5c-b57c-6192520a8185" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:51:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6de9384b-d240-4edb-937a-5d8921ff2ae5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "bcf36dfa-a030-4670-9cb8-1f3488c16b85" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215145Z:bcf36dfa-a030-4670-9cb8-1f3488c16b85" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:52:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1743de14-9189-4921-ad88-6651da9d3db1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "f9821ff4-c268-451e-9c6d-f95b33eeaf56" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215215Z:f9821ff4-c268-451e-9c6d-f95b33eeaf56" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:52:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fb2c80ae-c92b-4a42-b4f3-720a3723c7db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "3cabbde8-cc3f-499f-bf06-9bf03e84196f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215245Z:3cabbde8-cc3f-499f-bf06-9bf03e84196f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:53:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "651a563e-99f6-4936-8bad-b626bc155863" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "ca739383-04a5-490a-aac3-1869abeacf88" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215315Z:ca739383-04a5-490a-aac3-1869abeacf88" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:53:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9f9c6d7c-6a97-48ac-84f5-1cbf31da0c0e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "433dcc27-12b0-4151-8d2a-6dfaacdbdfc5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215345Z:433dcc27-12b0-4151-8d2a-6dfaacdbdfc5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:54:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e7509085-dfc9-4d66-8cfc-7c686516accd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "8271ef7b-eae1-48de-a051-fef17ed776a6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215415Z:8271ef7b-eae1-48de-a051-fef17ed776a6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:54:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2b304d18-f1eb-4e59-83af-7c0f89633201" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "d96daeaf-cce7-48d4-85ec-5ff2a49cf8d7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215446Z:d96daeaf-cce7-48d4-85ec-5ff2a49cf8d7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:55:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "052cedf3-f9c3-494c-9e72-0c8ab8cffc1d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "63cbc420-b94f-4343-a8d7-0b29c8946aae" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215516Z:63cbc420-b94f-4343-a8d7-0b29c8946aae" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:55:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d839199e-d0d0-428c-88a0-95664f2437b8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "492df87d-55f8-4f4b-996a-eec663899651" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215546Z:492df87d-55f8-4f4b-996a-eec663899651" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:56:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "55b0f24b-3ccb-401b-ba66-cea00914c21b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "f3d6a0f3-67d1-4d8d-91d0-4ce34418f162" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215616Z:f3d6a0f3-67d1-4d8d-91d0-4ce34418f162" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:56:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "aa4ff933-619b-4317-aa48-7f9b0719b130" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "f9c03c65-bbbf-4805-86b2-f244ce6d10d4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215646Z:f9c03c65-bbbf-4805-86b2-f244ce6d10d4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:57:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "09067236-68d7-42a2-ae18-954d02990c89" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "0b2d40c1-66d9-4ac2-bdaf-8f4e5da38de0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215716Z:0b2d40c1-66d9-4ac2-bdaf-8f4e5da38de0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:57:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d2b6b46e-500a-4b33-89e5-21796a761dde" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "db9e7834-643b-4d24-a46c-cc12978ad01e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215747Z:db9e7834-643b-4d24-a46c-cc12978ad01e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:58:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "19b3e671-8313-4c9d-a51d-2893e99af3ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "793ff2cd-0f89-4339-9262-83fed0db9d18" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215817Z:793ff2cd-0f89-4339-9262-83fed0db9d18" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:58:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e5a5b976-172b-44c5-af20-96e1441ed54d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "abc178d7-5369-46f5-8b10-a7365e8795ab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215847Z:abc178d7-5369-46f5-8b10-a7365e8795ab" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:59:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d39f7c13-9f23-48c8-a9b4-eac44cb874a7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "82a65917-e5a1-4e4c-863d-7dc48396b746" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215917Z:82a65917-e5a1-4e4c-863d-7dc48396b746" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 21:59:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9b166fa7-8df3-438a-862b-275c583ddaf2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "2ed4119a-69e4-4f21-8c55-cde1b735fcb5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T215948Z:2ed4119a-69e4-4f21-8c55-cde1b735fcb5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:00:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c73009e1-28f5-4cba-8b0e-75fd236ce2f1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "0002dc48-d5a8-45e0-94fa-8f9dca68de27" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220018Z:0002dc48-d5a8-45e0-94fa-8f9dca68de27" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:00:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9d5e6102-db5a-405c-8b65-9bc60eeec187" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14963" + ], + "x-ms-correlation-request-id": [ + "b69807ba-3d3b-4c2c-be03-657359bbea17" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220048Z:b69807ba-3d3b-4c2c-be03-657359bbea17" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:01:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "38e26324-c038-4428-b33b-c504a9ee27a5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "2dacbfe8-466a-4ca0-8a9f-83a72ef0c090" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220118Z:2dacbfe8-466a-4ca0-8a9f-83a72ef0c090" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:01:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ca0ba0c2-0540-455e-a8ab-a373bec969c2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14961" + ], + "x-ms-correlation-request-id": [ + "e37a3359-a80e-4c93-8366-c59c728e1b55" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220148Z:e37a3359-a80e-4c93-8366-c59c728e1b55" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:02:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "83a2fcc1-c531-478c-8715-b534c9ed1ee2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14960" + ], + "x-ms-correlation-request-id": [ + "48b56753-c1c3-4728-845b-2a8bf6bb6ba0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220218Z:48b56753-c1c3-4728-845b-2a8bf6bb6ba0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:02:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "26f5885d-9d1d-46e8-878d-9fdd3e910420" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14958" + ], + "x-ms-correlation-request-id": [ + "5b566733-e5b5-4a4f-afb4-dbdfb7262eb2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220249Z:5b566733-e5b5-4a4f-afb4-dbdfb7262eb2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:03:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e4129eea-86d0-45e6-b02d-4d464cab1740" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14957" + ], + "x-ms-correlation-request-id": [ + "e8949160-6181-4e0b-b5c3-777e0fdb8f75" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220319Z:e8949160-6181-4e0b-b5c3-777e0fdb8f75" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:03:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fd333725-dcfb-4f9f-83ff-17668aae2e46" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14956" + ], + "x-ms-correlation-request-id": [ + "7fb1abb9-984b-4f05-819d-99b6c0bf38ce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220349Z:7fb1abb9-984b-4f05-819d-99b6c0bf38ce" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:04:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f97dea60-50ca-4c10-8705-e07421dd3d29" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14955" + ], + "x-ms-correlation-request-id": [ + "bda6c914-e0f1-4f78-b499-67e3c6cadc7f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220419Z:bda6c914-e0f1-4f78-b499-67e3c6cadc7f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:04:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "658fe668-9f5a-4e5e-bd53-5b5901b5691f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14954" + ], + "x-ms-correlation-request-id": [ + "9e2bd087-eeb4-4def-b70d-241888774018" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220450Z:9e2bd087-eeb4-4def-b70d-241888774018" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:05:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9b4dcc22-974d-4ed3-9714-e0cfdc105586" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14953" + ], + "x-ms-correlation-request-id": [ + "81a34481-c653-440f-946c-9624fa6e8d77" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220520Z:81a34481-c653-440f-946c-9624fa6e8d77" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:05:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c4c186ed-a286-4bce-be72-285af9acd0e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14952" + ], + "x-ms-correlation-request-id": [ + "fd478d40-5a9c-40e4-9622-56ff7ae05436" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220550Z:fd478d40-5a9c-40e4-9622-56ff7ae05436" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:06:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "68ff474e-6108-4621-aced-3dbb8817149e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14951" + ], + "x-ms-correlation-request-id": [ + "1a6b887e-70cd-4e24-b9b2-ba400b0b314e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220620Z:1a6b887e-70cd-4e24-b9b2-ba400b0b314e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:06:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d5a7bcc6-3983-4c2b-ae10-cd47c32280c6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14950" + ], + "x-ms-correlation-request-id": [ + "3bbdf466-b41e-4019-bc30-eff62e5e259a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220650Z:3bbdf466-b41e-4019-bc30-eff62e5e259a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:07:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "529b0922-5871-4cd0-8b49-0b9837d9763d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14949" + ], + "x-ms-correlation-request-id": [ + "5694a196-bc35-47ab-a86a-f8f2a1fb76bd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220720Z:5694a196-bc35-47ab-a86a-f8f2a1fb76bd" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:07:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f2186cec-ccc4-4e9f-a3e2-f1da3fe90cd3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14948" + ], + "x-ms-correlation-request-id": [ + "53b8b82e-7b35-4803-8498-f801dfca1d67" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220751Z:53b8b82e-7b35-4803-8498-f801dfca1d67" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:08:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c6bb3fa7-1d1a-40d9-a332-f953ac4500dd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "7365ae59-2599-4c40-b288-820be28c78f1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220821Z:7365ae59-2599-4c40-b288-820be28c78f1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:08:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "828f4766-2158-4427-8987-3941e0a95e89" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14946" + ], + "x-ms-correlation-request-id": [ + "34d88019-5430-4e11-8907-a556ba8db893" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220851Z:34d88019-5430-4e11-8907-a556ba8db893" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:09:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7af338d5-da66-4a03-9442-30e2b08e17fa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "99c9da28-7336-442d-a6fa-0a9e4fb91678" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220921Z:99c9da28-7336-442d-a6fa-0a9e4fb91678" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:09:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9b9df482-50cc-4985-b9c9-c277a511084b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14944" + ], + "x-ms-correlation-request-id": [ + "6160fe8f-9e53-4d72-a03f-57acdaa7feda" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T220951Z:6160fe8f-9e53-4d72-a03f-57acdaa7feda" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:10:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3b54f6ed-8455-43fb-b444-6126daefc8f3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14944" + ], + "x-ms-correlation-request-id": [ + "023a454a-d198-4767-944a-7eec2e035b6f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221022Z:023a454a-d198-4767-944a-7eec2e035b6f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:10:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "61cb7892-92e2-4885-9119-07e6b95e3ed1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14943" + ], + "x-ms-correlation-request-id": [ + "afd75f47-0bcc-4218-982d-c4a23c75f1c3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221052Z:afd75f47-0bcc-4218-982d-c4a23c75f1c3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:11:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "91ab4f70-47b2-4a6a-a95d-9544d2569e8a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14942" + ], + "x-ms-correlation-request-id": [ + "34668dd4-ea66-455c-a046-52baac535572" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221122Z:34668dd4-ea66-455c-a046-52baac535572" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:11:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "adc6018f-12f4-465c-9065-76132d404488" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14941" + ], + "x-ms-correlation-request-id": [ + "ee166b15-6a1f-4408-a09d-b6cfc6f13882" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221152Z:ee166b15-6a1f-4408-a09d-b6cfc6f13882" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:12:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6bb92ab8-0f92-4e02-862a-32790adecfc2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14940" + ], + "x-ms-correlation-request-id": [ + "9519083b-e675-465a-9525-2e835fdc0c9f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221222Z:9519083b-e675-465a-9525-2e835fdc0c9f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:12:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e252fb51-00f5-4913-8996-e47f5c5172de" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14939" + ], + "x-ms-correlation-request-id": [ + "435e5b5c-59f3-4bd5-afcf-d4084c857971" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221252Z:435e5b5c-59f3-4bd5-afcf-d4084c857971" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:13:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "239bd710-fb80-431f-8e1d-2283b9d01444" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14938" + ], + "x-ms-correlation-request-id": [ + "5d994804-2a25-4e44-b403-bca5973bec09" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221323Z:5d994804-2a25-4e44-b403-bca5973bec09" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:13:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c84713cc-be5c-4864-88f5-3e9e7d3dac6a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14937" + ], + "x-ms-correlation-request-id": [ + "f6397dda-3414-4d7f-b107-3b1e8f76e12d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221353Z:f6397dda-3414-4d7f-b107-3b1e8f76e12d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:14:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "adc8bd2a-cd77-4b88-aa13-90ad0d67818e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14935" + ], + "x-ms-correlation-request-id": [ + "f609f72e-3944-4103-9ebc-b55951f5b98b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221423Z:f609f72e-3944-4103-9ebc-b55951f5b98b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:14:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "614fca00-ece1-4d15-8550-af88c7945256" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14934" + ], + "x-ms-correlation-request-id": [ + "73769574-466d-4600-85b6-d53a88d0fb61" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221453Z:73769574-466d-4600-85b6-d53a88d0fb61" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:15:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "271f6e75-ebed-4672-8193-7e8b8e586381" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14932" + ], + "x-ms-correlation-request-id": [ + "28e764b8-9c3f-406c-bc7b-724a6940f123" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221523Z:28e764b8-9c3f-406c-bc7b-724a6940f123" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:15:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "afef0de8-0f41-491a-8c93-b3c22b02b5e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14931" + ], + "x-ms-correlation-request-id": [ + "a33236cc-db98-4ce2-8092-c318b71ea176" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221554Z:a33236cc-db98-4ce2-8092-c318b71ea176" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:16:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "60f08a0c-501b-45b4-a86f-5ed8beda9734" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14930" + ], + "x-ms-correlation-request-id": [ + "6019d762-5bd8-45d1-a9b7-38b6683f94f6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221624Z:6019d762-5bd8-45d1-a9b7-38b6683f94f6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:16:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ec9cd8b6-c6b9-4396-9e55-a2179a9978cc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14929" + ], + "x-ms-correlation-request-id": [ + "1506f81b-4c5d-4d56-b113-ece40e1c5c3d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221654Z:1506f81b-4c5d-4d56-b113-ece40e1c5c3d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:17:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2b8c1337-936c-41f1-a176-d46ad75e9e0e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14928" + ], + "x-ms-correlation-request-id": [ + "9329a3a6-550c-402f-8e7d-bcad3bb50e42" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221724Z:9329a3a6-550c-402f-8e7d-bcad3bb50e42" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:17:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "71a829f7-1a16-47fa-98a0-cab2f5ba66f9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14927" + ], + "x-ms-correlation-request-id": [ + "2a3f8570-2568-41eb-8169-df8ee6a9ec90" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221754Z:2a3f8570-2568-41eb-8169-df8ee6a9ec90" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:18:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "88f36f84-4b01-4a13-bed2-be07daca1ca6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14926" + ], + "x-ms-correlation-request-id": [ + "8f67562b-862b-4602-9ae2-0a785abdecec" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221825Z:8f67562b-862b-4602-9ae2-0a785abdecec" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:18:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6a2b8df4-7a3d-47b7-875c-fd9ff0e244e1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14925" + ], + "x-ms-correlation-request-id": [ + "cab36b2c-63a7-4973-9bbe-8ea362aa8b4f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221855Z:cab36b2c-63a7-4973-9bbe-8ea362aa8b4f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:19:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0409378c-ac5f-437d-8854-a928b4fc9200" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14924" + ], + "x-ms-correlation-request-id": [ + "1865ce0f-1ba3-4603-9fa5-fe87cd05abeb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221925Z:1865ce0f-1ba3-4603-9fa5-fe87cd05abeb" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:19:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "59c77665-936d-4360-a03b-6549fb221719" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14922" + ], + "x-ms-correlation-request-id": [ + "33fbabcb-8a02-49ae-b83e-e68a3665367f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T221955Z:33fbabcb-8a02-49ae-b83e-e68a3665367f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:20:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dd58ea3c-3ad3-430c-82bf-7850c86bed88" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14922" + ], + "x-ms-correlation-request-id": [ + "235d5d49-04ab-4ef7-921d-c5f425eefdce" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222025Z:235d5d49-04ab-4ef7-921d-c5f425eefdce" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:20:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "04844191-baf2-42f7-8bb0-548f3ec5a576" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14921" + ], + "x-ms-correlation-request-id": [ + "90737ea3-18ed-4954-bed3-22de059ecaab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222055Z:90737ea3-18ed-4954-bed3-22de059ecaab" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:21:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "04650ffe-967d-47ae-8f5c-51064cd8295a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14920" + ], + "x-ms-correlation-request-id": [ + "e0a1b504-40b0-4643-abd4-11d0388dce37" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222126Z:e0a1b504-40b0-4643-abd4-11d0388dce37" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/operationresults/c2RrdGVzdGFwaW00MTk1X0FjdF9mNDUyMjQzMg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcwME1UazFYMEZqZEY5bU5EVXlNalF6TWclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195\",\r\n \"name\": \"sdktestapim4195\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACat04=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T21:46:13.0496136Z\",\r\n \"gatewayUrl\": \"https://sdktestapim4195.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim4195.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim4195.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim4195.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.176.5.213\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:21:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0b3d7b5c-5027-49ca-be86-2aeb7ce34282" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14919" + ], + "x-ms-correlation-request-id": [ + "237a2055-9af9-429f-925a-3a9cc14aef94" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222156Z:237a2055-9af9-429f-925a-3a9cc14aef94" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2U/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f907c8a9-b68f-454e-a313-d5200a08098c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195\",\r\n \"name\": \"sdktestapim4195\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACat04=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T21:46:13.0496136Z\",\r\n \"gatewayUrl\": \"https://sdktestapim4195.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim4195.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim4195.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim4195.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.176.5.213\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:21:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "696fd78f-4c43-406b-b44b-4c19af3f4f4d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14918" + ], + "x-ms-correlation-request-id": [ + "ffd23d58-0077-44c8-8437-2a549d4ace7e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222156Z:ffd23d58-0077-44c8-8437-2a549d4ace7e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195/getssotoken?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1L2dldHNzb3Rva2VuP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c04579c1-ff46-4808-b464-2cb14d1715b5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"redirectUri\": \"https://sdktestapim4195.portal.azure-api.net:443/signin-sso?token=1%26201708022226%26WkKc%2fxBMaYse4vv3lYRjdm9zgH3XiIcGaXQiMdDST2F5XAX6zGYJqDMZkKgAqbEefy%2bj8GZz6miTt4lcHGecXg%3d%3d\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:21:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "24c19bc2-dbf9-434d-ad0f-b36607daf02b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "fae1cca0-8281-4c18-ba4d-8a372ecb6cbb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222157Z:fae1cca0-8281-4c18-ba4d-8a372ecb6cbb" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8ce2fed0-d02a-40d7-acda-5c36cb7bb956" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "\"\"", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:21:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e69ff2d7-b56a-4344-a5be-270cf57d8727" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "b8ad1831-2ccd-4278-b761-f14ed370facd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222158Z:b8ad1831-2ccd-4278-b761-f14ed370facd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg2581/providers/Microsoft.ApiManagement/service/sdktestapim4195?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzI1ODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW00MTk1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8576e02f-c09f-4edd-b5f5-bef2f65e0512" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.ApiManagement/service/sdktestapim4195' under resource group 'sdktestrg2581' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "164" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:21:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "0e23066f-6a4c-43e9-beab-508325833fc2" + ], + "x-ms-correlation-request-id": [ + "0e23066f-6a4c-43e9-beab-508325833fc2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222158Z:0e23066f-6a4c-43e9-beab-508325833fc2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Initialize": [ + "sdktestapim4195", + "sdktestrg2581" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestapim4195", + "Location": "Central US", + "ResourceGroup": "sdktestrg2581" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiHostNameService.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiHostNameService.json new file mode 100644 index 000000000000..dffcb7cbb77b --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiHostNameService.json @@ -0,0 +1,3131 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "46b2207f-8b22-4dc9-be1f-19c3fe1bdc8a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"authorization\": {\r\n \"applicationId\": \"8602e328-9b72-4f2d-a4ae-1387d013a2b3\",\r\n \"roleDefinitionId\": \"e263b525-2e60-4418-b655-420bae0b172e\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reportFeedback\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkFeedbackRequired\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 19:59:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-request-id": [ + "3f0992dc-391a-4b68-96f3-51b42e692d8e" + ], + "x-ms-correlation-request-id": [ + "3f0992dc-391a-4b68-96f3-51b42e692d8e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T195926Z:3f0992dc-391a-4b68-96f3-51b42e692d8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourcegroups/sdktestrg4869?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RyZzQ4Njk/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "a1432e0c-77f7-4a7a-a077-dc9af1d357e1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869\",\r\n \"name\": \"sdktestrg4869\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 19:59:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "39e23df1-8c9a-4235-889a-7d2cba6323d7" + ], + "x-ms-correlation-request-id": [ + "39e23df1-8c9a-4235-889a-7d2cba6323d7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T195927Z:39e23df1-8c9a-4235-889a-7d2cba6323d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"hostnameConfigurations\": [\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"gateway1.powershelltest.net\",\r\n \"encodedCertificate\": \"MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ\",\r\n \"certificatePassword\": \"g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw\"\r\n },\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"gateway2.powershelltest.net\",\r\n \"encodedCertificate\": \"MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ\",\r\n \"certificatePassword\": \"g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw\"\r\n },\r\n {\r\n \"type\": \"Portal\",\r\n \"hostName\": \"portal1.powershelltest.net\",\r\n \"encodedCertificate\": \"MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ\",\r\n \"certificatePassword\": \"g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw\"\r\n }\r\n ],\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "11197" + ], + "x-ms-client-request-id": [ + "4c7f89da-4fe9-4033-b034-e0de44467926" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775\",\r\n \"name\": \"sdktestapim1775\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACVrkA=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Created\",\r\n \"targetProvisioningState\": \"Activating\",\r\n \"createdAtUtc\": \"2017-07-13T19:59:29.446961Z\",\r\n \"gatewayUrl\": null,\r\n \"portalUrl\": null,\r\n \"managementApiUrl\": null,\r\n \"scmUrl\": null,\r\n \"hostnameConfigurations\": [\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"gateway1.powershelltest.net\",\r\n \"encodedCertificate\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": {\r\n \"expiry\": \"2017-09-22T00:00:00-07:00\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"subject\": \"CN=*.powershelltest.net\"\r\n }\r\n },\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"gateway2.powershelltest.net\",\r\n \"encodedCertificate\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": {\r\n \"expiry\": \"2017-09-22T00:00:00-07:00\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"subject\": \"CN=*.powershelltest.net\"\r\n }\r\n },\r\n {\r\n \"type\": \"Portal\",\r\n \"hostName\": \"portal1.powershelltest.net\",\r\n \"encodedCertificate\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": {\r\n \"expiry\": \"2017-09-22T00:00:00-07:00\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"subject\": \"CN=*.powershelltest.net\"\r\n }\r\n }\r\n ],\r\n \"staticIps\": [],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1721" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 19:59:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAACVrkA=\"" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg==?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "094639ad-d8dd-40c6-9a6d-b2e0a959382f", + "7a23458f-b42a-48fd-b056-2fc6d6a7dcb6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "2ddac045-b5a3-4bc6-9cf7-c44bb537eed2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T195930Z:2ddac045-b5a3-4bc6-9cf7-c44bb537eed2" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg==?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmc9PT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 19:59:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7d1d8f4f-e051-4c80-b875-97bc17dae374" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14951" + ], + "x-ms-correlation-request-id": [ + "bda52496-da61-40a4-9959-3c24124689be" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200000Z:bda52496-da61-40a4-9959-3c24124689be" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:00:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "68e94d92-2de7-41ae-ba2b-aa0098b460d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14950" + ], + "x-ms-correlation-request-id": [ + "4219ec99-121d-41ed-b16d-72019a2caf80" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200030Z:4219ec99-121d-41ed-b16d-72019a2caf80" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:01:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bcf1ca6f-514d-495e-85b0-c2e42b4761b3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14949" + ], + "x-ms-correlation-request-id": [ + "beab2d4a-e40b-4d6a-9e2e-9a3735b93a19" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200100Z:beab2d4a-e40b-4d6a-9e2e-9a3735b93a19" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:01:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "96faad4c-ffe4-4c44-9f00-54bbc98fdd49" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14948" + ], + "x-ms-correlation-request-id": [ + "663a1adc-3728-453d-ad3a-870039a0d128" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200130Z:663a1adc-3728-453d-ad3a-870039a0d128" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:02:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6d44fcf0-ca6c-47e7-a215-cc58c56dc0ad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "f1a5a1fe-f4e0-427a-b071-9565108ccde7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200200Z:f1a5a1fe-f4e0-427a-b071-9565108ccde7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:02:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "22c71e9d-7d74-4a42-922f-7b4f2a47f126" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14946" + ], + "x-ms-correlation-request-id": [ + "37b4879e-aa41-44a7-97c5-dbe0f01fe043" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200230Z:37b4879e-aa41-44a7-97c5-dbe0f01fe043" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:03:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "daef4260-e3fa-4647-890d-f7486e0b85fc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "c73fc247-cb7d-45a8-8de8-9540ad3deb99" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200301Z:c73fc247-cb7d-45a8-8de8-9540ad3deb99" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:03:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d8a1d824-a137-4e08-84a2-e256254e1081" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14944" + ], + "x-ms-correlation-request-id": [ + "0b8a077c-b997-4496-bdd0-f06b6447c319" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200331Z:0b8a077c-b997-4496-bdd0-f06b6447c319" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:04:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "90b877cf-ea06-483f-ad32-7335cbdd52c3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14943" + ], + "x-ms-correlation-request-id": [ + "12f236dd-c854-4d8c-83c5-0d9cf79a9aa7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200401Z:12f236dd-c854-4d8c-83c5-0d9cf79a9aa7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:04:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "14e8dcff-ce33-4f5e-9c36-7e4085e59490" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14942" + ], + "x-ms-correlation-request-id": [ + "a2467d05-803c-41b4-903c-b0725a44eb69" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200431Z:a2467d05-803c-41b4-903c-b0725a44eb69" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:05:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1cf0e9b0-0b23-46e6-ae54-46efe7bd96d0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14946" + ], + "x-ms-correlation-request-id": [ + "76881417-036b-49ef-9e2b-39bfe5e53a11" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200501Z:76881417-036b-49ef-9e2b-39bfe5e53a11" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:05:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d4437f66-01cc-4f40-baad-85f543969f5e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "316f8655-7cfb-41ea-9e4e-02f3df190bea" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200531Z:316f8655-7cfb-41ea-9e4e-02f3df190bea" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:06:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2feba55e-c058-4b5a-a5b4-371097d5a8ae" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14944" + ], + "x-ms-correlation-request-id": [ + "ae0274ab-662d-4293-92c8-80e70092c07a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200601Z:ae0274ab-662d-4293-92c8-80e70092c07a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:06:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "64a02b72-f8ec-429e-a035-b07ee4409fb5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14943" + ], + "x-ms-correlation-request-id": [ + "b896d73c-93bf-435b-b089-1feb612dcd41" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200632Z:b896d73c-93bf-435b-b089-1feb612dcd41" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:07:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7dc34d6f-2e44-4f1b-bf20-0a5611cb1926" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14942" + ], + "x-ms-correlation-request-id": [ + "d41aaf76-7231-4ece-a084-b60ed02fafaa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200702Z:d41aaf76-7231-4ece-a084-b60ed02fafaa" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:07:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6763ae49-cbbd-452a-894e-288bf726aa44" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14941" + ], + "x-ms-correlation-request-id": [ + "87634163-487d-4d68-af3d-48669f1259ed" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200732Z:87634163-487d-4d68-af3d-48669f1259ed" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:08:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bbb014cf-3bde-4066-9195-2746c255eab1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14940" + ], + "x-ms-correlation-request-id": [ + "b6e64c4a-1da4-453e-ba79-233a13c73918" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200802Z:b6e64c4a-1da4-453e-ba79-233a13c73918" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:08:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bf971d4f-50b9-4b07-8b59-9f15057736c9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14939" + ], + "x-ms-correlation-request-id": [ + "3ee4cc45-ead4-4a4b-8fb6-e7be062e0e23" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200832Z:3ee4cc45-ead4-4a4b-8fb6-e7be062e0e23" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:09:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "24e5bc87-7c6a-465b-bc43-b36547a23e01" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14938" + ], + "x-ms-correlation-request-id": [ + "d41652be-1dda-4861-b14c-c2280886a351" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200902Z:d41652be-1dda-4861-b14c-c2280886a351" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:09:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c1a9d073-8c33-458b-91c5-6358eeec6ff5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14937" + ], + "x-ms-correlation-request-id": [ + "5cf6ce1f-5915-49b1-9d8e-6f1ac76663b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T200932Z:5cf6ce1f-5915-49b1-9d8e-6f1ac76663b2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:10:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "85682e2f-ec86-4df7-8f56-0dabe1e13944" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14943" + ], + "x-ms-correlation-request-id": [ + "1997d633-d9f1-4a31-b696-8b5ee77668c4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201003Z:1997d633-d9f1-4a31-b696-8b5ee77668c4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:10:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "41123fa4-d2da-46b0-8d14-399ec5cefbff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14942" + ], + "x-ms-correlation-request-id": [ + "92a68e75-6cad-492d-86ce-a616f391c1fe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201033Z:92a68e75-6cad-492d-86ce-a616f391c1fe" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:11:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "adb6824c-0ee1-436d-a1d3-c3c4ce8b02de" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14941" + ], + "x-ms-correlation-request-id": [ + "6eb3434e-8202-4ca5-9994-118c1058ebce" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201103Z:6eb3434e-8202-4ca5-9994-118c1058ebce" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:11:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "78f07154-fd66-4090-b637-7c846cfa356f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14940" + ], + "x-ms-correlation-request-id": [ + "d004b44e-de07-4b6d-bbe8-be2869b88d9a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201133Z:d004b44e-de07-4b6d-bbe8-be2869b88d9a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:12:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fabcaad3-7ea0-49b9-a48f-be6778f4450b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14938" + ], + "x-ms-correlation-request-id": [ + "9945d5ba-f43b-48f6-97eb-6c508014b7d2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201203Z:9945d5ba-f43b-48f6-97eb-6c508014b7d2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:12:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "238f012e-87ba-41a0-8576-a93c066368e8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14937" + ], + "x-ms-correlation-request-id": [ + "ab1f2eb1-5d4e-4536-97d5-00c2cbcf50c7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201233Z:ab1f2eb1-5d4e-4536-97d5-00c2cbcf50c7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:13:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1bbbeef8-3fe5-401f-bb77-7d0b804e5030" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14936" + ], + "x-ms-correlation-request-id": [ + "920e4913-68f6-4afa-92b3-eaf3de016d02" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201303Z:920e4913-68f6-4afa-92b3-eaf3de016d02" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:13:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9efebc3f-fff8-40df-bf51-f8f78e5075e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14935" + ], + "x-ms-correlation-request-id": [ + "acc7b687-a6c2-4117-ab30-aee2002bfc67" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201334Z:acc7b687-a6c2-4117-ab30-aee2002bfc67" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:14:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "74a2bfd3-76bd-4651-98b0-a59c4b0b2b0f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14934" + ], + "x-ms-correlation-request-id": [ + "d110947f-1258-4cf4-be3b-d9d09796dbcd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201404Z:d110947f-1258-4cf4-be3b-d9d09796dbcd" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:14:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "04b66ae5-a27f-490f-8c21-4065a7992730" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14933" + ], + "x-ms-correlation-request-id": [ + "866c6364-0d22-4ed4-93de-4e38c464664f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201434Z:866c6364-0d22-4ed4-93de-4e38c464664f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:15:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "197f21cb-c35c-4be4-ab1f-69122d0fbd3f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14937" + ], + "x-ms-correlation-request-id": [ + "a0401ac9-2b56-4611-a36e-a6ad476d8a4b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201504Z:a0401ac9-2b56-4611-a36e-a6ad476d8a4b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:15:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eb63d571-6a43-4b9f-87ac-76eec6d7c91f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14936" + ], + "x-ms-correlation-request-id": [ + "c4cb1c3d-70f6-4003-b030-3ddc5df9a583" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201535Z:c4cb1c3d-70f6-4003-b030-3ddc5df9a583" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:16:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bfabb181-ceab-4257-97a1-6d1727b29954" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14935" + ], + "x-ms-correlation-request-id": [ + "4192cfad-09b6-4562-89e7-b1d3bf203614" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201605Z:4192cfad-09b6-4562-89e7-b1d3bf203614" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:16:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "630daa30-33dc-4084-b4a7-8174d33da514" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14934" + ], + "x-ms-correlation-request-id": [ + "f23a40df-d7ab-45e9-a37f-db70aaa236bf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201635Z:f23a40df-d7ab-45e9-a37f-db70aaa236bf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:17:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "491034ce-acd3-45df-ab2e-f2e8a7ba8280" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14933" + ], + "x-ms-correlation-request-id": [ + "6589b921-244a-4229-8ce9-2221d3438b85" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201705Z:6589b921-244a-4229-8ce9-2221d3438b85" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:17:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "38db89fa-bb97-41f3-82aa-ab51257c9c54" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14932" + ], + "x-ms-correlation-request-id": [ + "8cff0761-9e65-41b4-9af6-a1c425c2d1d6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201735Z:8cff0761-9e65-41b4-9af6-a1c425c2d1d6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:18:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cf1f2add-bb75-4f55-8d85-70af1801bae3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14931" + ], + "x-ms-correlation-request-id": [ + "8bb390df-f0a8-45fc-8c56-6b00f67ab0b4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201805Z:8bb390df-f0a8-45fc-8c56-6b00f67ab0b4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:18:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ec61cf3f-4019-4b9b-9961-74067858dabd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14930" + ], + "x-ms-correlation-request-id": [ + "51087544-c04b-4b54-9dbc-981750941276" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201836Z:51087544-c04b-4b54-9dbc-981750941276" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:19:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bfa93a24-0e51-4c42-9876-3cb2df86c04f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14929" + ], + "x-ms-correlation-request-id": [ + "10dee113-4ef4-4556-af72-8c9540252716" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201906Z:10dee113-4ef4-4556-af72-8c9540252716" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:19:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "09d5bc2c-5d82-4124-bb53-e6e2e677f536" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14928" + ], + "x-ms-correlation-request-id": [ + "300c07dc-22e8-4854-b247-777d5565ff41" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T201936Z:300c07dc-22e8-4854-b247-777d5565ff41" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:20:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7ee542fc-20cf-42f4-98e5-13f2bfa7fd29" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14927" + ], + "x-ms-correlation-request-id": [ + "5ff440b6-a648-4b1d-9b73-ca0bc9217ab0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202006Z:5ff440b6-a648-4b1d-9b73-ca0bc9217ab0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:20:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "411b4abf-a9da-4497-b35b-365cd69c56ea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14926" + ], + "x-ms-correlation-request-id": [ + "32f64b35-d896-46a3-a2ba-1bc97c2fa6ae" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202036Z:32f64b35-d896-46a3-a2ba-1bc97c2fa6ae" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:21:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c4dee28e-c624-48f0-9bed-2392912af128" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14924" + ], + "x-ms-correlation-request-id": [ + "e1dc1a31-6c67-4c70-ab14-1e2bb0b60cc1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202106Z:e1dc1a31-6c67-4c70-ab14-1e2bb0b60cc1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:21:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "65edfe01-7fb9-4c32-adee-c20fbb4b56dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14923" + ], + "x-ms-correlation-request-id": [ + "d1b16131-1ba9-4207-b2bd-7cf0ccfb08e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202137Z:d1b16131-1ba9-4207-b2bd-7cf0ccfb08e7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:22:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "439151df-0fb3-496d-97f6-19369ec63658" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14922" + ], + "x-ms-correlation-request-id": [ + "e07ae6b3-3b17-47bb-8aba-9e9a1e801bc6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202207Z:e07ae6b3-3b17-47bb-8aba-9e9a1e801bc6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:22:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a3037e39-28f5-493c-a664-9232e3a59cef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14921" + ], + "x-ms-correlation-request-id": [ + "a24f4e47-c84a-47ae-8d3c-757d58ec25c6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202237Z:a24f4e47-c84a-47ae-8d3c-757d58ec25c6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:23:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "09023dca-4900-4fcd-a49d-08444acf18d4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14920" + ], + "x-ms-correlation-request-id": [ + "4ebadbad-19d0-4770-b3ba-18902009a7d7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202307Z:4ebadbad-19d0-4770-b3ba-18902009a7d7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:23:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "33d696d1-82bd-4a72-8ab6-b665fdf3520b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14919" + ], + "x-ms-correlation-request-id": [ + "256e5550-adb0-4406-b847-3bc84b75499e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202337Z:256e5550-adb0-4406-b847-3bc84b75499e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:24:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d82ac9fb-4045-478d-804c-7889c0873b9a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14918" + ], + "x-ms-correlation-request-id": [ + "9aa40e60-bce1-4d12-988c-94180339c526" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202407Z:9aa40e60-bce1-4d12-988c-94180339c526" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:24:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8a52f345-c7e1-4d24-ab91-410f84927f14" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14916" + ], + "x-ms-correlation-request-id": [ + "399e4254-0e46-4a44-b2f9-b78ca7851a8e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202437Z:399e4254-0e46-4a44-b2f9-b78ca7851a8e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775/operationresults/c2RrdGVzdGFwaW0xNzc1X0FjdF9hZGMzNTlhZg%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1L29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweE56YzFYMEZqZEY5aFpHTXpOVGxoWmclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775\",\r\n \"name\": \"sdktestapim1775\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACVrpY=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-07-13T19:59:29.446961Z\",\r\n \"gatewayUrl\": \"https://sdktestapim1775.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim1775.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim1775.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim1775.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"gateway1.powershelltest.net\",\r\n \"encodedCertificate\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": {\r\n \"expiry\": \"2017-09-22T00:00:00-07:00\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"subject\": \"CN=*.powershelltest.net\"\r\n }\r\n },\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"gateway2.powershelltest.net\",\r\n \"encodedCertificate\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": {\r\n \"expiry\": \"2017-09-22T00:00:00-07:00\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"subject\": \"CN=*.powershelltest.net\"\r\n }\r\n },\r\n {\r\n \"type\": \"Portal\",\r\n \"hostName\": \"portal1.powershelltest.net\",\r\n \"encodedCertificate\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": {\r\n \"expiry\": \"2017-09-22T00:00:00-07:00\",\r\n \"thumbprint\": \"E861A19B22EE98AC71F84AC00C5A05E2E7206820\",\r\n \"subject\": \"CN=*.powershelltest.net\"\r\n }\r\n }\r\n ],\r\n \"staticIps\": [\r\n \"52.176.111.170\"\r\n ],\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:25:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d1e5fc01-cbcc-4a25-aebf-fe39ec5c6b30" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14916" + ], + "x-ms-correlation-request-id": [ + "c9c72f37-16e5-44f0-801a-0689c4ca7685" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202508Z:c9c72f37-16e5-44f0-801a-0689c4ca7685" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8d6145ce-faa2-40f3-a190-0f21ec8667f9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "\"\"", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:25:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b7d33062-75f1-47ed-83ce-35f78d5ba258" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "989e3ef5-e7fd-4551-86e5-88058b9255cf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202510Z:989e3ef5-e7fd-4551-86e5-88058b9255cf" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg4869/providers/Microsoft.ApiManagement/service/sdktestapim1775?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzQ4NjkvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0xNzc1P2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5507c28e-ab55-4559-9c46-0c61257806aa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.ApiManagement/service/sdktestapim1775' under resource group 'sdktestrg4869' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "164" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 13 Jul 2017 20:25:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "dd3912ee-e457-4f06-820f-f46ec7c975f4" + ], + "x-ms-correlation-request-id": [ + "dd3912ee-e457-4f06-820f-f46ec7c975f4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170713T202510Z:dd3912ee-e457-4f06-820f-f46ec7c975f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Initialize": [ + "sdktestapim1775", + "sdktestrg4869" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestapim1775", + "Location": "Central US", + "ResourceGroup": "sdktestrg4869" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiRegionService.json b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiRegionService.json new file mode 100644 index 000000000000..011f08569802 --- /dev/null +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/SessionRecords/ApiManagement.Tests.ResourceProviderTests.ApiManagementServiceTests/CreateMultiRegionService.json @@ -0,0 +1,3021 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aed50803-6569-4b48-9ba1-5bd96be31b67" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"authorization\": {\r\n \"applicationId\": \"8602e328-9b72-4f2d-a4ae-1387d013a2b3\",\r\n \"roleDefinitionId\": \"e263b525-2e60-4418-b655-420bae0b172e\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reportFeedback\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkFeedbackRequired\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:22:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-request-id": [ + "67978f9a-5a38-4d7f-9e77-b9e6a3915000" + ], + "x-ms-correlation-request-id": [ + "67978f9a-5a38-4d7f-9e77-b9e6a3915000" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222208Z:67978f9a-5a38-4d7f-9e77-b9e6a3915000" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b0bffb57-ce11-4adc-8029-85e0aed06e3b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"authorization\": {\r\n \"applicationId\": \"8602e328-9b72-4f2d-a4ae-1387d013a2b3\",\r\n \"roleDefinitionId\": \"e263b525-2e60-4418-b655-420bae0b172e\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Central US\",\r\n \"West US\",\r\n \"West US 2\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"Brazil South\",\r\n \"Central India\",\r\n \"South India\",\r\n \"West India\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reportFeedback\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkFeedbackRequired\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2017-03-01\",\r\n \"2016-10-10\",\r\n \"2016-07-07\",\r\n \"2015-09-15\",\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:22:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-request-id": [ + "3524389c-b25f-441c-b3a6-36e918173938" + ], + "x-ms-correlation-request-id": [ + "3524389c-b25f-441c-b3a6-36e918173938" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222209Z:3524389c-b25f-441c-b3a6-36e918173938" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourcegroups/sdktestrg1890?api-version=2015-11-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RyZzE4OTA/YXBpLXZlcnNpb249MjAxNS0xMS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Central US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "32" + ], + "x-ms-client-request-id": [ + "627b946f-4169-4503-878b-16d96351d11c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890\",\r\n \"name\": \"sdktestrg1890\",\r\n \"location\": \"centralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:22:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "84aa4c15-5a40-4a79-b97c-d5502aa8b4d7" + ], + "x-ms-correlation-request-id": [ + "84aa4c15-5a40-4a79-b97c-d5502aa8b4d7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222209Z:84aa4c15-5a40-4a79-b97c-d5502aa8b4d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"additionalLocations\": [\r\n {\r\n \"location\": \"North Europe\",\r\n \"sku\": {\r\n \"name\": \"Premium\"\r\n }\r\n }\r\n ],\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "439" + ], + "x-ms-client-request-id": [ + "8cb0738d-3da4-420b-ab61-3b77cdef1f4c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861\",\r\n \"name\": \"sdktestapim2861\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACat1M=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Created\",\r\n \"targetProvisioningState\": \"Activating\",\r\n \"createdAtUtc\": \"2017-08-02T22:22:10.9747747Z\",\r\n \"gatewayUrl\": null,\r\n \"portalUrl\": null,\r\n \"managementApiUrl\": null,\r\n \"scmUrl\": null,\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [],\r\n \"additionalLocations\": [\r\n {\r\n \"location\": \"North Europe\",\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n },\r\n \"staticIps\": [],\r\n \"virtualNetworkConfiguration\": null\r\n }\r\n ],\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "963" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:22:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAACat1M=\"" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw==?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3ac2d900-c6de-48b1-9174-4baa64e29524", + "28e6ee9e-f2c5-4522-bdc2-6b9888e9dac6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "e4c5e44b-2263-49a7-880f-53a32aaf03d9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222211Z:e4c5e44b-2263-49a7-880f-53a32aaf03d9" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw==?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXc9PT9hcGktdmVyc2lvbj0yMDE3LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:22:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6d185d05-e8c6-4093-8589-080e46a4009d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "ab9c6fa4-cdea-4bfd-a4d4-926f165632a6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222241Z:ab9c6fa4-cdea-4bfd-a4d4-926f165632a6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:23:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7b713b94-24ef-43aa-a0db-65f5e38e6cbe" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "b0d85dd9-a588-443c-b2ee-a343c1bcc460" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222311Z:b0d85dd9-a588-443c-b2ee-a343c1bcc460" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:23:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9317bced-3cd2-4db5-a672-6c9cf40e7f04" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "d8f34589-96ab-4bef-80ba-805e1f44cd58" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222341Z:d8f34589-96ab-4bef-80ba-805e1f44cd58" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:24:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9f4c27c8-1eff-4882-8e88-79eca296ad5a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "8b12afee-4406-40be-b936-e664da0d0620" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222411Z:8b12afee-4406-40be-b936-e664da0d0620" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:24:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4c83c9c9-4fa5-491c-a585-68b5099a39f2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "7813fbad-f9f5-49dd-afb2-425603334d37" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222442Z:7813fbad-f9f5-49dd-afb2-425603334d37" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:25:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f8e92d9c-9683-4c70-92ba-f65db40b0b68" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "98517bd6-1cd9-46c4-acdf-c46d58ad4a73" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222512Z:98517bd6-1cd9-46c4-acdf-c46d58ad4a73" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:25:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "51c461aa-6d65-4363-a56b-2937ffc08270" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "f63856ca-ede4-4c5a-9cb5-1e0844abed46" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222542Z:f63856ca-ede4-4c5a-9cb5-1e0844abed46" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:26:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9371d4c3-769b-49ce-a6ee-68fffc9f718c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "d9952b87-45fc-4dc5-b9db-12ec61ff1e03" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222612Z:d9952b87-45fc-4dc5-b9db-12ec61ff1e03" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:26:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "38225b9c-d73c-4e6b-9e4b-b10219149fd6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "02ac141f-2901-4141-9307-ed40881abba1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222642Z:02ac141f-2901-4141-9307-ed40881abba1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:27:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2b46d6a0-503f-4407-8922-41d675a226b5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "40d68c51-1bd2-4787-a972-5485a10be4d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222713Z:40d68c51-1bd2-4787-a972-5485a10be4d2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:27:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "44e740ca-b123-4e57-b032-80290ddb4390" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-correlation-request-id": [ + "43700046-b718-4af2-9f09-7c6a5fc06b37" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222743Z:43700046-b718-4af2-9f09-7c6a5fc06b37" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:28:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "83f5aa09-5354-4598-bdc5-2cb1a26188eb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "68f765aa-673a-4e5e-baaf-baddc421ae1b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222813Z:68f765aa-673a-4e5e-baaf-baddc421ae1b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:28:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3812b4a6-6c80-4709-965b-11bc103a6e53" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "4a85e9cb-a99f-46e2-aff9-f1c4f59aae22" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222843Z:4a85e9cb-a99f-46e2-aff9-f1c4f59aae22" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:29:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "abfbc2b6-36ae-4462-bb9e-0967b8238b4e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "40046678-b50a-4ffd-9a5e-7fcd9157363e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222913Z:40046678-b50a-4ffd-9a5e-7fcd9157363e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:29:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "17da3989-a751-42fb-9d03-d633e72c6036" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "b3dc9917-b966-40f7-bbd0-7fe73da46b15" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T222943Z:b3dc9917-b966-40f7-bbd0-7fe73da46b15" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:30:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ba6a7789-3dbb-4f37-8e13-cc17f4e6ad8a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "b2b10930-1865-40d4-8aa1-bf3b08901e99" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223014Z:b2b10930-1865-40d4-8aa1-bf3b08901e99" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:30:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7e887225-c060-4bb4-9078-01b47d8204a0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-correlation-request-id": [ + "1e66ad64-9f61-49e7-b446-0c2d8b338654" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223044Z:1e66ad64-9f61-49e7-b446-0c2d8b338654" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:31:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8e78390e-2226-4805-9757-fcf374ff3888" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "755721b8-6ffa-4c79-93a3-1e84ef2a94bb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223114Z:755721b8-6ffa-4c79-93a3-1e84ef2a94bb" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:31:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "332100ca-6b3d-4ec5-bb22-4ee34ee2d8da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "33f23748-b11b-4f96-9444-fc54048b2361" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223144Z:33f23748-b11b-4f96-9444-fc54048b2361" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:32:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b1683503-68bf-4863-acc1-13e55b3abb33" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "66406bf8-7537-4358-9ed3-b427e130a586" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223214Z:66406bf8-7537-4358-9ed3-b427e130a586" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:32:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "42c694d6-11d7-4b2e-aa65-46174c1a33ba" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14973" + ], + "x-ms-correlation-request-id": [ + "a4e31e7f-c0b6-4931-a77b-4b37bbc54fd5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223245Z:a4e31e7f-c0b6-4931-a77b-4b37bbc54fd5" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:33:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d31e6fae-112d-49b0-988c-0fdccfde7334" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14972" + ], + "x-ms-correlation-request-id": [ + "9d86d5df-b174-49b6-b254-c70001599c29" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223315Z:9d86d5df-b174-49b6-b254-c70001599c29" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:33:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "050a4d83-2151-4b8a-8399-edc4e9c27c03" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14971" + ], + "x-ms-correlation-request-id": [ + "0a8b4b5c-5b8e-4b09-8305-7a1c97f6f50c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223345Z:0a8b4b5c-5b8e-4b09-8305-7a1c97f6f50c" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:34:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6fac91ae-d810-4497-8307-e4cb309ee646" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "7985378f-a2a3-4034-8e2b-ea9ea0ec5c56" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223415Z:7985378f-a2a3-4034-8e2b-ea9ea0ec5c56" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:34:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7a76689a-0a96-4d28-bc12-3f42a4f544b2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "b6c9a530-6c08-4f19-af66-1a0120f883c4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223445Z:b6c9a530-6c08-4f19-af66-1a0120f883c4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:35:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cb553857-8fb2-4f17-8f91-c802ce07e840" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14969" + ], + "x-ms-correlation-request-id": [ + "deb4eb27-46e6-4934-82ef-8f57ee54e3d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223516Z:deb4eb27-46e6-4934-82ef-8f57ee54e3d2" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:35:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a63ac4ae-2b52-4588-9580-9667af55bc42" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14968" + ], + "x-ms-correlation-request-id": [ + "481ea25e-9dac-4364-a9d1-e89bbe02fa58" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223546Z:481ea25e-9dac-4364-a9d1-e89bbe02fa58" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:36:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4abedd5f-054b-4161-89ae-a053f32368a3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14967" + ], + "x-ms-correlation-request-id": [ + "b24b7231-0774-4770-ae12-7bd1ea694717" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223616Z:b24b7231-0774-4770-ae12-7bd1ea694717" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:36:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5e537ae1-ef7f-4be4-ad74-de5de46e7806" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14966" + ], + "x-ms-correlation-request-id": [ + "6286826e-7516-4a68-97a8-a685172f5d04" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223646Z:6286826e-7516-4a68-97a8-a685172f5d04" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:37:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "83bddab2-c6b2-46de-8b01-fc6f097a8378" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14965" + ], + "x-ms-correlation-request-id": [ + "cff50b7c-3348-4ab2-bebf-c874697ccf66" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223716Z:cff50b7c-3348-4ab2-bebf-c874697ccf66" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:37:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "77e53584-7012-4278-a6d2-08b364725096" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14964" + ], + "x-ms-correlation-request-id": [ + "33ec342c-f9c5-4816-a6ce-5be403c5288d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223746Z:33ec342c-f9c5-4816-a6ce-5be403c5288d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:38:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "06baa76b-6eb6-4e38-9f55-fe589ccd323e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14962" + ], + "x-ms-correlation-request-id": [ + "fbed5b4e-9573-45e0-b7d6-6727acaef249" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223817Z:fbed5b4e-9573-45e0-b7d6-6727acaef249" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:38:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ab7cb89f-aba3-4107-8b7f-385bf2340aca" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14960" + ], + "x-ms-correlation-request-id": [ + "4468974b-fd39-497a-9cec-bcc1542a7542" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223847Z:4468974b-fd39-497a-9cec-bcc1542a7542" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:39:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "040985a9-7f12-44e7-98eb-38ab75e99311" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14959" + ], + "x-ms-correlation-request-id": [ + "b0be7672-5d27-4d16-ab73-6884151f54b4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223917Z:b0be7672-5d27-4d16-ab73-6884151f54b4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:39:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "798a20cb-7cc8-4059-87a9-b8d2a77e084c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14958" + ], + "x-ms-correlation-request-id": [ + "739c7701-8601-41a0-a78d-255cfec3ff6b" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T223947Z:739c7701-8601-41a0-a78d-255cfec3ff6b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:40:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a068090e-dbde-46fd-8381-2f014e5acfd0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14956" + ], + "x-ms-correlation-request-id": [ + "ce8c1f29-e077-46c0-a9bc-951267096841" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224018Z:ce8c1f29-e077-46c0-a9bc-951267096841" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:40:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d23a1a6c-17d2-4372-80cd-876c29827693" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14955" + ], + "x-ms-correlation-request-id": [ + "c52846fb-6ba1-47a0-95de-32361873da9d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224048Z:c52846fb-6ba1-47a0-95de-32361873da9d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:41:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5984f766-d09a-4931-ae80-65470ebd7c26" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14954" + ], + "x-ms-correlation-request-id": [ + "35f5ebe2-d718-4fc0-9b1a-e73569c0a939" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224118Z:35f5ebe2-d718-4fc0-9b1a-e73569c0a939" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:41:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2df601e5-169b-4a9c-926b-0b5e5f7597a2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14953" + ], + "x-ms-correlation-request-id": [ + "1a090b07-5eac-4cde-8eae-7c20f4537d65" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224148Z:1a090b07-5eac-4cde-8eae-7c20f4537d65" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:42:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4aa8a248-1d57-4125-849b-af6d4c1ead69" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14952" + ], + "x-ms-correlation-request-id": [ + "6636462b-58c7-4030-90cf-2b2d63441786" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224218Z:6636462b-58c7-4030-90cf-2b2d63441786" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:42:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3793ce2c-1be3-4205-b589-6a1e8d1c291c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14951" + ], + "x-ms-correlation-request-id": [ + "14277b49-d2c2-43a0-ac27-f011d548e9cf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224249Z:14277b49-d2c2-43a0-ac27-f011d548e9cf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:43:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c079aa6a-1e9b-4c4b-b6b8-ccf1cb483133" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14950" + ], + "x-ms-correlation-request-id": [ + "be5d765b-fa55-4e4e-84a3-c051e0cd96a3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224319Z:be5d765b-fa55-4e4e-84a3-c051e0cd96a3" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:43:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9cb319b6-27e7-4fe0-9ca6-a8e5b256638e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14949" + ], + "x-ms-correlation-request-id": [ + "d8272326-de7b-4282-bf9a-b20a6ca49428" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224349Z:d8272326-de7b-4282-bf9a-b20a6ca49428" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:44:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5642a4a2-ea9e-4dcb-8c98-69d49051a874" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14948" + ], + "x-ms-correlation-request-id": [ + "d5eb33cb-0d75-4fa3-9b08-d59e1e9bbb88" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224419Z:d5eb33cb-0d75-4fa3-9b08-d59e1e9bbb88" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:44:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2b717c68-58bf-4455-b5ae-fdcc70a9f773" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "947d9c74-67a3-4bcb-87af-5959ba0a677f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224450Z:947d9c74-67a3-4bcb-87af-5959ba0a677f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:45:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6716a7da-8f27-418e-81af-435f90bcd1af" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14947" + ], + "x-ms-correlation-request-id": [ + "94198a5d-11ef-4811-8168-dc2e956edeaf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224520Z:94198a5d-11ef-4811-8168-dc2e956edeaf" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:45:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01" + ], + "Retry-After": [ + "60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3c9b667b-8d25-4894-a8b0-fd43750d5317" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14946" + ], + "x-ms-correlation-request-id": [ + "dee19051-ad42-43bb-a5cc-79918e24bbcb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224550Z:dee19051-ad42-43bb-a5cc-79918e24bbcb" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861/operationresults/c2RrdGVzdGFwaW0yODYxX0FjdF9lYjUxYzFkYw%3D%3D?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxL29wZXJhdGlvbnJlc3VsdHMvYzJScmRHVnpkR0Z3YVcweU9EWXhYMEZqZEY5bFlqVXhZekZrWXclM0QlM0Q/YXBpLXZlcnNpb249MjAxNy0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861\",\r\n \"name\": \"sdktestapim2861\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\",\r\n \"tag3\": \"value3\"\r\n },\r\n \"location\": \"Central US\",\r\n \"etag\": \"AAAAAACauE8=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2017-08-02T22:22:10.9747747Z\",\r\n \"gatewayUrl\": \"https://sdktestapim2861.azure-api.net\",\r\n \"portalUrl\": \"https://sdktestapim2861.portal.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktestapim2861.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktestapim2861.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [],\r\n \"staticIps\": [\r\n \"52.173.203.184\"\r\n ],\r\n \"additionalLocations\": [\r\n {\r\n \"location\": \"North Europe\",\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n },\r\n \"staticIps\": [\r\n \"40.69.204.96\"\r\n ],\r\n \"virtualNetworkConfiguration\": null\r\n }\r\n ],\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": null,\r\n \"virtualNetworkType\": \"None\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"capacity\": 1\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:46:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dba12725-3534-40f5-8409-68cc5752cee4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14945" + ], + "x-ms-correlation-request-id": [ + "2d8d539c-81ab-4f55-aca0-d4b1b5978b14" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224620Z:2d8d539c-81ab-4f55-aca0-d4b1b5978b14" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f7521a8d-f3f2-42ec-a591-fed62d451c80" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "\"\"", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:46:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Vary": [ + "Accept-Encoding" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d476e3eb-5a88-4dd2-abd0-592cfa74c0a4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "059cfd6d-e2b9-4f88-9758-ade9b2e0e656" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224622Z:059cfd6d-e2b9-4f88-9758-ade9b2e0e656" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/bab08e11-7b12-4354-9fd1-4b5d64d40b68/resourceGroups/sdktestrg1890/providers/Microsoft.ApiManagement/service/sdktestapim2861?api-version=2017-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiMDhlMTEtN2IxMi00MzU0LTlmZDEtNGI1ZDY0ZDQwYjY4L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RyZzE4OTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BcGlNYW5hZ2VtZW50L3NlcnZpY2Uvc2RrdGVzdGFwaW0yODYxP2FwaS12ZXJzaW9uPTIwMTctMDMtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6822306f-eaba-440b-ac48-ecb5921b8a6a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.ApiManagement/service/sdktestapim2861' under resource group 'sdktestrg1890' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "164" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 22:46:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "43e80033-aa30-4363-8d04-f0acd339d6fa" + ], + "x-ms-correlation-request-id": [ + "43e80033-aa30-4363-8d04-f0acd339d6fa" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T224623Z:43e80033-aa30-4363-8d04-f0acd339d6fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Initialize": [ + "sdktestapim2861", + "sdktestrg1890" + ] + }, + "Variables": { + "SubscriptionId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "TestCertificate": "MIIKBAIBAzCCCcAGCSqGSIb3DQEHAaCCCbEEggmtMIIJqTCCBhoGCSqGSIb3DQEHAaCCBgsEggYHMIIGAzCCBf8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAi6nUtB1pk8bwICB9AEggTYHTQWEah9YeHvpuE4TX0Vyjq8nR+1FZ5D0JCY5TMBIrKgs8TOhZ18n8IG8u2okXq3w8foE7zwZSGKOHLYmSAfANAyok+2P3YlHpnH/wNccP10Z5PtDwKvHD2ourQYAuQg7fLmTBHIi6iEcO3pAR3gAv+x5otQJs55Oykkx2jItnDfAZGurA7IOiJWSDb3UtyTpCJov8Li5k0AiKd81YGJFu+I098v7dLmJAZJEcs4n/D6QjIkmQKv7ICOzXSgeYZIomJ7lXmzLmpscWZo43KBf/YPSFk7eS5x24DFoa5iCoYpUBXE2SI0TG/unG/y31Z3nInLct71PwK+arOfGw6+7cUTtPWprepY0KnwWSxCijOr7V4NjcpqtznhyAw2b2SkeurR9VZdAD03SpBhZ3RzLU35ypsth26fVH7q3baPZONR3wRSApU5B1aFw4EmfyKDY9613pWuROHxvBqdgb0+wAJeKpYF9oXlc4yGB/NtRRsnAo3YrAJoRhBpiXZqnSn1tuRRL8mhNnUSCGOFxGRyg/lAVILEzrRcvUFUcDGUQzjMS/niy+d28LwgZC1hprmdIXWlxUMyQ4R8JOY9TUIpYCKp/YMk0KJimIDUrhYLM029JZ7axjlhAykleoJGQrRlfA9aog5EJ6saL8UkdZAzQfzM6SdKnGWwNZ5/wWIfoAiFsXAG78FY/Io8MUBUBnOUF+sNFlxk/nrsHH/ZLRMBwbPcDzCi2HJqvFZcE/sA+InjGoijSPbaresixM6QmtTNaD4ZzbRm+GpY6EMT2uUIXdT6wFlZJ1rveQ5SBqO4xjkbfU5y1FxCtfNxzYWh/qNyqUQDbusJY7ekUHhquymreXZ7Pr3zkJMndbnCPe+3MQMaqFOp+gUUUov+Qdk7q4HYJpsqUIrwhXLqi++vD+gaEKaXYkPeYkJplDkFCXSOhpWDGYWjwjKmnH/EpFdBclHAkZ8Ldwdzu33XYJi1uZUO7KMA8FYQLhkb+FAOg6EqE8Px28q+TRnGeDhvpV4MQlxcs8t0H11iXZ4+Ucr3DQpOiylNRc1lBabRPnPnAadOrc0WoumH/i33pGkP1ECWAwbfHGgDwUvcwO0/GOhVTjGW9v82pC7emb16T4Eeww5lKoTxcqza35ZMZQj0EAD69caWjW+NID7L0HZ/JHPU9iqG7dx+xcFaG/JhrR0M2MQRBotzRVWwcQD/O3vNNgZlKPSbx2EbuymaVe8t5dyQdRW5+9dB+ab9TQbf71+WVEYUBYyC5UHgg1F3jpMxBAjJqm+m7rm/kmD3/PXrCO//Cgbcb3J3qisjAZU7o/rx8QHYGLBq+TPNzbaCd7BJR17Z6f3QU8jKag21xBNrIxqL0UnVNWsPo7AHiq34WIPCax191dtvs6MdNwvvT03Kpi3fxpUbB5i4ia8M3qIFamutlnYKEWIOXwvTKSJ/PRG0I8VzXT0RGH9X0KXyvBqtm4vcVxarsYTiOe1LrDqrxfxmQyBJLbP93oKFd+4gog8mCh9eb6ecG9tM5q7Pcmeoe/KUmXKl+LsLWriPKWy7FMAv4vjN+VMKy5G0k7E3qLzzpzGDV+gVsef6XN0HgL5VRjMpJC/r+0mfZt9R9tuE0bMKcJdomCrHeOELSD6k48cpagF+GKVKHHMxS29fOTGB7TATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANAA5ADcAMAAzADkARQBGAC0ANQA0ADEAMgAtADQAMQAwADcALQBBADMAQgAwAC0AMAA5ADAANQA2AEYANAA3ADIARQA4AEQAfTB5BgkrBgEEAYI3EQExbB5qAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAUgBTAEEAIABhAG4AZAAgAEEARQBTACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjCCA4cGCSqGSIb3DQEHBqCCA3gwggN0AgEAMIIDbQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEhOq6lmMu+ACAgfQgIIDQJy8hO9pVz3I/iZLB3HL55Ln3o5liDDzH9HVFTIThW2Zi5KT3z+vvVIdJNPhbLlrdZJ7FzxhE0USttK+aR17hJLbHSxw+1qZJ9CcYElXIApbsw9W+kScdK3F+pjsdFxR1Zdpxa4vNTaucaJ8ckUTVdGnDDX7OwHAlyQnVvSrL3AYuhU+FSgimzGocfGuPu8PgiSncPlnI5UKcxwnTkLnv51YDWaJkOx+NZYLQqm86fupRLn7waLcvQ0BfBADSfypAYInyqxpw3x78k/1z5aEI5RNX08GgNqDG1oBb8Dr9QHAPZNvLEnlmgzGJvkEoKZ1bQQQZau+JiKFzJ2GL+A5oZxgAcmw0L9aHP8MEJ1cVgnapldGHRaC10VDHEmhPAyOk67hcFHu1aBkxHlS/fRf2oLOSbGO0uVIhFpKPmgUuNjImJBmfB42Fsmt6i1hdoi4Ksawm6SLwLA3aqfpzO0yczYUzykU98/DHShe9GUvchg9AoNat3hUS9H3v2QoGFDDF1AGR284l8MsHN+hHyqZgv0xvFyzlMqAl2oh7/vKZADNbt64Do/dDz0G/dAW4YRwljAC7PqiTHZ6ctyGnWi3pm+ThZov9KtUhu4qtB092hShLFGOaVWeIDPpKc7dFefKmarBi7R6AKyQu0QIyBANdUTXMHK8JGTPSkUrWkGL6FBOVmyh5LNv4qQn51gHvBO+7B2AXVe3BRyPHFavfZ+y7lKKUnn223bGqF3AxBPeTXnrwTPIPJdIfTZ6fwHPj23RhhXKBvQ5b4PbxTdvZgQ47OZgR1yHCSnQcDFCxB4gqVmFJmvoTTBcNGEW8BSyGwuACHb61K/x/1zzC9oa1hrrgWkv9PnjCQgDt52Zma2SwbFaezVPWuhNpjRX2TFQhGgsSmPdozHKcQ/g0ynSDv598t1b5p26fI+Hh/vS/0M3JVts3FaBIMsvYz2GamUsl0O4N18WF6NnB1JVTYQwDe5kBvAkGhw1gBOOcMdsF8XfBohbWZYY2oAIOhSpzcvhwU3pKKiXyCnjE8oxOeJt98P5EjPy1Q01he0ss690n2KcFdShNJQg86HiK9eb4xMvA/Emsx9stndidEabAKYwcwLuygQwOzAfMAcGBSsOAwIaBBTn8idtNZ8KT0SxhorK9HHB3r2OrAQUC+mAIUAQz6VrXyhF9TTidJ/gSyQCAgfQ", + "TestCertificatePassword": "g0BdrCRORWI2ctk_g5Wdf5QpTsI9vxnw", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubId": "bab08e11-7b12-4354-9fd1-4b5d64d40b68", + "ServiceName": "sdktestapim2861", + "Location": "Central US", + "ResourceGroup": "sdktestrg1890" + } +} \ No newline at end of file diff --git a/src/SDKs/ApiManagement/Management.ApiManagement.sln b/src/SDKs/ApiManagement/Management.ApiManagement.sln new file mode 100644 index 000000000000..1b27285e7c12 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.4 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiManagement.Tests", "ApiManagement.Tests\ApiManagement.Tests.csproj", "{030623AB-8A12-44B3-8CB3-2356152F9C9F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ApiManagement", "Management.ApiManagement\Microsoft.Azure.Management.ApiManagement.csproj", "{7AFDC922-F852-4D10-8157-9AA667DC1569}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {030623AB-8A12-44B3-8CB3-2356152F9C9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {030623AB-8A12-44B3-8CB3-2356152F9C9F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {030623AB-8A12-44B3-8CB3-2356152F9C9F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {030623AB-8A12-44B3-8CB3-2356152F9C9F}.Release|Any CPU.Build.0 = Release|Any CPU + {7AFDC922-F852-4D10-8157-9AA667DC1569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7AFDC922-F852-4D10-8157-9AA667DC1569}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7AFDC922-F852-4D10-8157-9AA667DC1569}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7AFDC922-F852-4D10-8157-9AA667DC1569}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs new file mode 100644 index 000000000000..767be8bb84e3 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs @@ -0,0 +1,44 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + using System.Text.RegularExpressions; + + /// + /// Subscription details. + /// + public partial class OperationContract + { + private static readonly Regex OperationIdPathRegex = new Regex(@"/subscriptions/(?.+)/resourceGroups/(?.+)/providers/Microsoft.ApiManagement/service/(?.+)/apis/(?.+)/operations/(?.+)"); + + public string ApiIdentifier + { + get + { + if (!string.IsNullOrWhiteSpace(this.Id)) + { + var match = OperationIdPathRegex.Match(this.Id); + if (match.Success) + { + var aidGroup = match.Groups["aid"]; + if (aidGroup != null && aidGroup.Success) + { + return aidGroup.Value; + } + } + } + + return this.Id; + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs new file mode 100644 index 000000000000..c817c01f941b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs @@ -0,0 +1,47 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subscription details. + /// + public partial class SubscriptionContract + { + public string ProductIdentifier + { + get + { + if (!string.IsNullOrEmpty(this.ProductId)) + { + return this.ProductId.Split(new[] { '/' }).Last(); + } + + return null; + } + } + + public string UserIdentifier + { + get + { + if (!string.IsNullOrEmpty(this.UserId)) + { + return this.UserId.Split(new[] { '/' }).Last(); + } + + return null; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementClient.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementClient.cs new file mode 100644 index 000000000000..3d7ce8e9cf2b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementClient.cs @@ -0,0 +1,537 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + /// + /// ApiManagement Client + /// + public partial class ApiManagementClient : ServiceClient, IApiManagementClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// Version of the API to be used with the client request. + /// + public string ApiVersion { get; private set; } + + /// + /// Subscription credentials which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every service + /// call. + /// + public string SubscriptionId { get; set; } + + /// + /// Gets or sets the preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// Gets or sets the retry timeout in seconds for Long Running Operations. + /// Default value is 30. + /// + public 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. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IPolicyOperations. + /// + public virtual IPolicyOperations Policy { get; private set; } + + /// + /// Gets the IPolicySnippetsOperations. + /// + public virtual IPolicySnippetsOperations PolicySnippets { get; private set; } + + /// + /// Gets the IRegionsOperations. + /// + public virtual IRegionsOperations Regions { get; private set; } + + /// + /// Gets the IApiOperations. + /// + public virtual IApiOperations Api { get; private set; } + + /// + /// Gets the IApiOperationOperations. + /// + public virtual IApiOperationOperations ApiOperation { get; private set; } + + /// + /// Gets the IApiOperationPolicyOperations. + /// + public virtual IApiOperationPolicyOperations ApiOperationPolicy { get; private set; } + + /// + /// Gets the IApiProductOperations. + /// + public virtual IApiProductOperations ApiProduct { get; private set; } + + /// + /// Gets the IApiPolicyOperations. + /// + public virtual IApiPolicyOperations ApiPolicy { get; private set; } + + /// + /// Gets the IAuthorizationServerOperations. + /// + public virtual IAuthorizationServerOperations AuthorizationServer { get; private set; } + + /// + /// Gets the IBackendOperations. + /// + public virtual IBackendOperations Backend { get; private set; } + + /// + /// Gets the ICertificateOperations. + /// + public virtual ICertificateOperations Certificate { get; private set; } + + /// + /// Gets the IApiManagementOperations. + /// + public virtual IApiManagementOperations ApiManagementOperations { get; private set; } + + /// + /// Gets the IApiManagementServiceOperations. + /// + public virtual IApiManagementServiceOperations ApiManagementService { get; private set; } + + /// + /// Gets the IEmailTemplateOperations. + /// + public virtual IEmailTemplateOperations EmailTemplate { get; private set; } + + /// + /// Gets the IGroupOperations. + /// + public virtual IGroupOperations Group { get; private set; } + + /// + /// Gets the IGroupUserOperations. + /// + public virtual IGroupUserOperations GroupUser { get; private set; } + + /// + /// Gets the IIdentityProviderOperations. + /// + public virtual IIdentityProviderOperations IdentityProvider { get; private set; } + + /// + /// Gets the ILoggerOperations. + /// + public virtual ILoggerOperations Logger { get; private set; } + + /// + /// Gets the INetworkStatusOperations. + /// + public virtual INetworkStatusOperations NetworkStatus { get; private set; } + + /// + /// Gets the IOpenIdConnectProviderOperations. + /// + public virtual IOpenIdConnectProviderOperations OpenIdConnectProvider { get; private set; } + + /// + /// Gets the IProductOperations. + /// + public virtual IProductOperations Product { get; private set; } + + /// + /// Gets the IProductApiOperations. + /// + public virtual IProductApiOperations ProductApi { get; private set; } + + /// + /// Gets the IProductGroupOperations. + /// + public virtual IProductGroupOperations ProductGroup { get; private set; } + + /// + /// Gets the IProductSubscriptionsOperations. + /// + public virtual IProductSubscriptionsOperations ProductSubscriptions { get; private set; } + + /// + /// Gets the IProductPolicyOperations. + /// + public virtual IProductPolicyOperations ProductPolicy { get; private set; } + + /// + /// Gets the IPropertyOperations. + /// + public virtual IPropertyOperations Property { get; private set; } + + /// + /// Gets the IQuotaByCounterKeysOperations. + /// + public virtual IQuotaByCounterKeysOperations QuotaByCounterKeys { get; private set; } + + /// + /// Gets the IQuotaByPeriodKeysOperations. + /// + public virtual IQuotaByPeriodKeysOperations QuotaByPeriodKeys { get; private set; } + + /// + /// Gets the IReportsOperations. + /// + public virtual IReportsOperations Reports { get; private set; } + + /// + /// Gets the ISubscriptionOperations. + /// + public virtual ISubscriptionOperations Subscription { get; private set; } + + /// + /// Gets the ITenantAccessOperations. + /// + public virtual ITenantAccessOperations TenantAccess { get; private set; } + + /// + /// Gets the ITenantAccessGitOperations. + /// + public virtual ITenantAccessGitOperations TenantAccessGit { get; private set; } + + /// + /// Gets the ITenantConfigurationOperations. + /// + public virtual ITenantConfigurationOperations TenantConfiguration { get; private set; } + + /// + /// Gets the IUserOperations. + /// + public virtual IUserOperations User { get; private set; } + + /// + /// Gets the IUserGroupOperations. + /// + public virtual IUserGroupOperations UserGroup { get; private set; } + + /// + /// Gets the IUserSubscriptionOperations. + /// + public virtual IUserSubscriptionOperations UserSubscription { get; private set; } + + /// + /// Gets the IUserIdentitiesOperations. + /// + public virtual IUserIdentitiesOperations UserIdentities { get; private set; } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected ApiManagementClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected ApiManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected ApiManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected ApiManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ApiManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ApiManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ApiManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the ApiManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public ApiManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + Policy = new PolicyOperations(this); + PolicySnippets = new PolicySnippetsOperations(this); + Regions = new RegionsOperations(this); + Api = new ApiOperations(this); + ApiOperation = new ApiOperationOperations(this); + ApiOperationPolicy = new ApiOperationPolicyOperations(this); + ApiProduct = new ApiProductOperations(this); + ApiPolicy = new ApiPolicyOperations(this); + AuthorizationServer = new AuthorizationServerOperations(this); + Backend = new BackendOperations(this); + Certificate = new CertificateOperations(this); + ApiManagementOperations = new ApiManagementOperations(this); + ApiManagementService = new ApiManagementServiceOperations(this); + EmailTemplate = new EmailTemplateOperations(this); + Group = new GroupOperations(this); + GroupUser = new GroupUserOperations(this); + IdentityProvider = new IdentityProviderOperations(this); + Logger = new LoggerOperations(this); + NetworkStatus = new NetworkStatusOperations(this); + OpenIdConnectProvider = new OpenIdConnectProviderOperations(this); + Product = new ProductOperations(this); + ProductApi = new ProductApiOperations(this); + ProductGroup = new ProductGroupOperations(this); + ProductSubscriptions = new ProductSubscriptionsOperations(this); + ProductPolicy = new ProductPolicyOperations(this); + Property = new PropertyOperations(this); + QuotaByCounterKeys = new QuotaByCounterKeysOperations(this); + QuotaByPeriodKeys = new QuotaByPeriodKeysOperations(this); + Reports = new ReportsOperations(this); + Subscription = new SubscriptionOperations(this); + TenantAccess = new TenantAccessOperations(this); + TenantAccessGit = new TenantAccessGitOperations(this); + TenantConfiguration = new TenantConfigurationOperations(this); + User = new UserOperations(this); + UserGroup = new UserGroupOperations(this); + UserSubscription = new UserSubscriptionOperations(this); + UserIdentities = new UserIdentitiesOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2017-03-01"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperations.cs new file mode 100644 index 000000000000..ff2883f3764c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperations.cs @@ -0,0 +1,402 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// ApiManagementOperations operations. + /// + internal partial class ApiManagementOperations : IServiceOperations, IApiManagementOperations + { + /// + /// Initializes a new instance of the ApiManagementOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiManagementOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// 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.ApiManagement/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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperationsExtensions.cs new file mode 100644 index 000000000000..654e38ba00fb --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementOperationsExtensions.cs @@ -0,0 +1,91 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiManagementOperations. + /// + public static partial class ApiManagementOperationsExtensions + { + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IApiManagementOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IApiManagementOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IApiManagementOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// 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 IApiManagementOperations 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/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperations.cs new file mode 100644 index 000000000000..16f3f14b5496 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperations.cs @@ -0,0 +1,2871 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// ApiManagementServiceOperations operations. + /// + internal partial class ApiManagementServiceOperations : IServiceOperations, IApiManagementServiceOperations + { + /// + /// Initializes a new instance of the ApiManagementServiceOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiManagementServiceOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from backup + /// operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RestoreWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestoreWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates a backup of the API Management service to the given Azure Storage + /// Account. This is long running operation and could take several minutes to + /// complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> BackupWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginBackupWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates an existing API Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an API Management service resource description. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + 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.ApiManagement/service/{serviceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes an existing API Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + 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.ApiManagement/service/{serviceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List all API Management services within a resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(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"); + } + // 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the Single-Sign-On token for the API Management Service which is valid + /// for 5 Minutes. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> GetSsoTokenWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetSsoToken", 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.ApiManagement/service/{serviceName}/getssotoken").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Checks availability and correctness of a name for an API Management + /// service. + /// + /// + /// Parameters supplied to the CheckNameAvailability 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> CheckNameAvailabilityWithHttpMessagesAsync(ApiManagementServiceCheckNameAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual network + /// to pick the updated network settings. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. If the + /// parameters are empty, all the regions in which the Api Management service + /// is deployed will be updated sequentially without incurring downtime in the + /// region. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from backup + /// 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> BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestore", 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.ApiManagement/service/{serviceName}/restore").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a backup of the API Management service to the given Azure Storage + /// Account. This is long running operation and could take several minutes to + /// complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup 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> BeginBackupWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginBackup", 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.ApiManagement/service/{serviceName}/backup").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.ApiManagement/service/{serviceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates an existing API Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual network + /// to pick the updated network settings. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. If the + /// parameters are empty, all the regions in which the Api Management service + /// is deployed will be updated sequentially without incurring downtime in the + /// region. + /// + /// + /// 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> BeginApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginApplyNetworkConfigurationUpdates", 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.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 202 && (int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List all API Management services within a resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperationsExtensions.cs new file mode 100644 index 000000000000..6a0969f8d2f6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementServiceOperationsExtensions.cs @@ -0,0 +1,810 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiManagementServiceOperations. + /// + public static partial class ApiManagementServiceOperationsExtensions + { + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from backup + /// operation. + /// + public static ApiManagementServiceResource Restore(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters) + { + return operations.RestoreAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from backup + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task RestoreAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RestoreWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a backup of the API Management service to the given Azure Storage + /// Account. This is long running operation and could take several minutes to + /// complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup operation. + /// + public static ApiManagementServiceResource Backup(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters) + { + return operations.BackupAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a backup of the API Management service to the given Azure Storage + /// Account. This is long running operation and could take several minutes to + /// complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup operation. + /// + /// + /// The cancellation token. + /// + public static async Task BackupAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BackupWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + public static ApiManagementServiceResource CreateOrUpdate(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceResource parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an existing API Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + public static ApiManagementServiceResource Update(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters) + { + return operations.UpdateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing API Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets an API Management service resource description. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static ApiManagementServiceResource Get(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName) + { + return operations.GetAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets an API Management service resource description. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes an existing API Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static void Delete(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName) + { + operations.DeleteAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an existing API Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List all API Management services within a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + public static IPage ListByResourceGroup(this IApiManagementServiceOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// List all API Management services within a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IApiManagementServiceOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IApiManagementServiceOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IApiManagementServiceOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the Single-Sign-On token for the API Management Service which is valid + /// for 5 Minutes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static ApiManagementServiceGetSsoTokenResult GetSsoToken(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName) + { + return operations.GetSsoTokenAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the Single-Sign-On token for the API Management Service which is valid + /// for 5 Minutes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task GetSsoTokenAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSsoTokenWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Checks availability and correctness of a name for an API Management + /// service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Parameters supplied to the CheckNameAvailability operation. + /// + public static ApiManagementServiceNameAvailabilityResult CheckNameAvailability(this IApiManagementServiceOperations operations, ApiManagementServiceCheckNameAvailabilityParameters parameters) + { + return operations.CheckNameAvailabilityAsync(parameters).GetAwaiter().GetResult(); + } + + /// + /// Checks availability and correctness of a name for an API Management + /// service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Parameters supplied to the CheckNameAvailability operation. + /// + /// + /// The cancellation token. + /// + public static async Task CheckNameAvailabilityAsync(this IApiManagementServiceOperations operations, ApiManagementServiceCheckNameAvailabilityParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual network + /// to pick the updated network settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. If the + /// parameters are empty, all the regions in which the Api Management service + /// is deployed will be updated sequentially without incurring downtime in the + /// region. + /// + public static ApiManagementServiceResource ApplyNetworkConfigurationUpdates(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters)) + { + return operations.ApplyNetworkConfigurationUpdatesAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual network + /// to pick the updated network settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. If the + /// parameters are empty, all the regions in which the Api Management service + /// is deployed will be updated sequentially without incurring downtime in the + /// region. + /// + /// + /// The cancellation token. + /// + public static async Task ApplyNetworkConfigurationUpdatesAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from backup + /// operation. + /// + public static ApiManagementServiceResource BeginRestore(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters) + { + return operations.BeginRestoreAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from backup + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRestoreAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRestoreWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a backup of the API Management service to the given Azure Storage + /// Account. This is long running operation and could take several minutes to + /// complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup operation. + /// + public static ApiManagementServiceResource BeginBackup(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters) + { + return operations.BeginBackupAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a backup of the API Management service to the given Azure Storage + /// Account. This is long running operation and could take several minutes to + /// complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginBackupAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginBackupWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + public static ApiManagementServiceResource BeginCreateOrUpdate(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceResource parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an existing API Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + public static ApiManagementServiceResource BeginUpdate(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters) + { + return operations.BeginUpdateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing API Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual network + /// to pick the updated network settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. If the + /// parameters are empty, all the regions in which the Api Management service + /// is deployed will be updated sequentially without incurring downtime in the + /// region. + /// + public static ApiManagementServiceResource BeginApplyNetworkConfigurationUpdates(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters)) + { + return operations.BeginApplyNetworkConfigurationUpdatesAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual network + /// to pick the updated network settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. If the + /// parameters are empty, all the regions in which the Api Management service + /// is deployed will be updated sequentially without incurring downtime in the + /// region. + /// + /// + /// The cancellation token. + /// + public static async Task BeginApplyNetworkConfigurationUpdatesAsync(this IApiManagementServiceOperations operations, string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List all API Management services within a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IApiManagementServiceOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List all API Management services within a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IApiManagementServiceOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IApiManagementServiceOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IApiManagementServiceOperations 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/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperations.cs new file mode 100644 index 000000000000..eee3f7c6145d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperations.cs @@ -0,0 +1,1548 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ApiOperationOperations operations. + /// + internal partial class ApiOperationOperations : IServiceOperations, IApiOperationOperations + { + /// + /// Initializes a new instance of the ApiOperationOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiOperationOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByApi", 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the API Operation specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// 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 serviceName, string apiId, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a new operation in the API or updates an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string apiId, string operationId, OperationContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the details of the operation in the API specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// API Operation Update parameters. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string operationId, OperationUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified operation in the API. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// 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 serviceName, string apiId, string operationId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// 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>> ListByApiNextWithHttpMessagesAsync(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, "ListByApiNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperationsExtensions.cs new file mode 100644 index 000000000000..9b1c201e5815 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationOperationsExtensions.cs @@ -0,0 +1,366 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiOperationOperations. + /// + public static partial class ApiOperationOperationsExtensions + { + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByApi(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IApiOperationOperations)operations).ListByApiAsync(resourceGroupName, serviceName, apiId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByApiAsync(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApiWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the API Operation specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + public static OperationContract Get(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId) + { + return operations.GetAsync(resourceGroupName, serviceName, apiId, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the API Operation specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a new operation in the API or updates an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + public static OperationContract CreateOrUpdate(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, OperationContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, operationId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a new operation in the API or updates an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, OperationContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the details of the operation in the API specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// API Operation Update parameters. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * for + /// unconditional update. + /// + public static void Update(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, OperationUpdateContract parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the details of the operation in the API specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// API Operation Update parameters. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, OperationUpdateContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes the specified operation in the API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * for + /// unconditional update. + /// + public static void Delete(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified operation in the API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IApiOperationOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByApiNext(this IApiOperationOperations operations, string nextPageLink) + { + return operations.ListByApiNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByApiNextAsync(this IApiOperationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApiNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperations.cs new file mode 100644 index 000000000000..40cabefc2c62 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperations.cs @@ -0,0 +1,895 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// ApiOperationPolicyOperations operations. + /// + internal partial class ApiOperationPolicyOperations : IServiceOperations, IApiOperationPolicyOperations + { + /// + /// Initializes a new instance of the ApiOperationPolicyOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiOperationPolicyOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Get the policy configuration at the API Operation level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// 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 serviceName, string apiId, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates policy configuration for the API Operation level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Operation policy to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string operationId, PolicyContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("policyId", policyId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the policy configuration at the Api Operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the Api Operation Policy to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string apiId, string operationId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (operationId != null) + { + if (operationId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "operationId", 256); + } + if (operationId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "operationId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("operationId", operationId); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperationsExtensions.cs new file mode 100644 index 000000000000..82fd30c60567 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationPolicyOperationsExtensions.cs @@ -0,0 +1,216 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiOperationPolicyOperations. + /// + public static partial class ApiOperationPolicyOperationsExtensions + { + /// + /// Get the policy configuration at the API Operation level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + public static PolicyContract Get(this IApiOperationPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId) + { + return operations.GetAsync(resourceGroupName, serviceName, apiId, operationId).GetAwaiter().GetResult(); + } + + /// + /// Get the policy configuration at the API Operation level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IApiOperationPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates policy configuration for the API Operation level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Operation policy to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + public static PolicyContract CreateOrUpdate(this IApiOperationPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, PolicyContract parameters, string ifMatch) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates policy configuration for the API Operation level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Operation policy to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IApiOperationPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, PolicyContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the policy configuration at the Api Operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the Api Operation Policy to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + public static void Delete(this IApiOperationPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the policy configuration at the Api Operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the Api Operation Policy to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IApiOperationPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string operationId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, operationId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperations.cs new file mode 100644 index 000000000000..225ea9dd927d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperations.cs @@ -0,0 +1,1452 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ApiOperations operations. + /// + internal partial class ApiOperations : IServiceOperations, IApiOperations + { + /// + /// Initializes a new instance of the ApiOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/apis").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the API specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates new or updates existing specified API of the API Management service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Api Entity. For Create Api Etag should not be specified. For + /// Update Etag should match the existing Entity or it can be * for + /// unconditional update. + /// + /// + /// 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 serviceName, string apiId, ApiCreateOrUpdateParameter parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/apis/{apiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates the specified API of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API Update Contract parameters. + /// + /// + /// ETag of the API entity. ETag should match the current entity state in the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, ApiUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified API of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the API Entity. ETag should match the current entity state from the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// 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 serviceName, string apiId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ApiOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationsExtensions.cs new file mode 100644 index 000000000000..4c6236757389 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiOperationsExtensions.cs @@ -0,0 +1,340 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiOperations. + /// + public static partial class ApiOperationsExtensions + { + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IApiOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IApiOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IApiOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the API specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + public static ApiContract Get(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId) + { + return operations.GetAsync(resourceGroupName, serviceName, apiId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the API specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates new or updates existing specified API of the API Management service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Api Entity. For Create Api Etag should not be specified. For + /// Update Etag should match the existing Entity or it can be * for + /// unconditional update. + /// + public static ApiContract CreateOrUpdate(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiCreateOrUpdateParameter parameters, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates new or updates existing specified API of the API Management service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Api Entity. For Create Api Etag should not be specified. For + /// Update Etag should match the existing Entity or it can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiCreateOrUpdateParameter parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the specified API of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API Update Contract parameters. + /// + /// + /// ETag of the API entity. ETag should match the current entity state in the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + public static void Update(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiUpdateContract parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the specified API of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API Update Contract parameters. + /// + /// + /// ETag of the API entity. ETag should match the current entity state in the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiUpdateContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes the specified API of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the API Entity. ETag should match the current entity state from the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + public static void Delete(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, apiId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified API of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the API Entity. ETag should match the current entity state from the + /// header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IApiOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IApiOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperations.cs new file mode 100644 index 000000000000..3025d4b30ed4 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperations.cs @@ -0,0 +1,1062 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// ApiPolicyOperations operations. + /// + internal partial class ApiPolicyOperations : IServiceOperations, IApiPolicyOperations + { + /// + /// Initializes a new instance of the ApiPolicyOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiPolicyOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Get the policy configuration at the API level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByApi", 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.ApiManagement/service/{serviceName}/apis/{apiId}/policies").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the policy configuration at the API level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates policy configuration for the API. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Policy to update. A value of "*" + /// can be used for If-Match to unconditionally apply the 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, PolicyContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("policyId", policyId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the policy configuration at the Api. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the Api policy to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string apiId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperationsExtensions.cs new file mode 100644 index 000000000000..f5f9733de84c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiPolicyOperationsExtensions.cs @@ -0,0 +1,236 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiPolicyOperations. + /// + public static partial class ApiPolicyOperationsExtensions + { + /// + /// Get the policy configuration at the API level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + public static PolicyCollection ListByApi(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId) + { + return operations.ListByApiAsync(resourceGroupName, serviceName, apiId).GetAwaiter().GetResult(); + } + + /// + /// Get the policy configuration at the API level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task ListByApiAsync(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApiWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the policy configuration at the API level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + public static PolicyContract Get(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId) + { + return operations.GetAsync(resourceGroupName, serviceName, apiId).GetAwaiter().GetResult(); + } + + /// + /// Get the policy configuration at the API level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates policy configuration for the API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Policy to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static PolicyContract CreateOrUpdate(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, PolicyContract parameters, string ifMatch) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates policy configuration for the API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Policy to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, PolicyContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the policy configuration at the Api. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the Api policy to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, apiId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the policy configuration at the Api. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the Api policy to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IApiPolicyOperations operations, string resourceGroupName, string serviceName, string apiId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperations.cs new file mode 100644 index 000000000000..575026feccc7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperations.cs @@ -0,0 +1,466 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ApiProductOperations operations. + /// + internal partial class ApiProductOperations : IServiceOperations, IApiProductOperations + { + /// + /// Initializes a new instance of the ApiProductOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ApiProductOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all Products, which the API is part of. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListByApisWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiId", apiId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByApis", 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.ApiManagement/service/{serviceName}/apis/{apiId}/products").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 Products, which the API is part of. + /// + /// + /// 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>> ListByApisNextWithHttpMessagesAsync(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, "ListByApisNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ApiProductOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperationsExtensions.cs new file mode 100644 index 000000000000..b77e35d6dce4 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiProductOperationsExtensions.cs @@ -0,0 +1,114 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ApiProductOperations. + /// + public static partial class ApiProductOperationsExtensions + { + /// + /// Lists all Products, which the API is part of. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByApis(this IApiProductOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery)) + { + return operations.ListByApisAsync(resourceGroupName, serviceName, apiId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists all Products, which the API is part of. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByApisAsync(this IApiProductOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApisWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all Products, which the API is part of. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByApisNext(this IApiProductOperations operations, string nextPageLink) + { + return operations.ListByApisNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all Products, which the API is part of. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByApisNextAsync(this IApiProductOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApisNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperations.cs new file mode 100644 index 000000000000..b806e5ed1fd2 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperations.cs @@ -0,0 +1,1416 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// AuthorizationServerOperations operations. + /// + internal partial class AuthorizationServerOperations : IServiceOperations, IAuthorizationServerOperations + { + /// + /// Initializes a new instance of the AuthorizationServerOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal AuthorizationServerOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of authorization servers defined within a service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/authorizationServers").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the authorization server specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// 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 serviceName, string authsid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (authsid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authsid"); + } + if (authsid != null) + { + if (authsid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "authsid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(authsid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "authsid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("authsid", authsid); + 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.ApiManagement/service/{serviceName}/authorizationServers/{authsid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{authsid}", System.Uri.EscapeDataString(authsid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates new authorization server or updates an existing authorization + /// server. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// Create or update parameters. + /// + /// + /// 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 serviceName, string authsid, AuthorizationServerContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (authsid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authsid"); + } + if (authsid != null) + { + if (authsid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "authsid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(authsid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "authsid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("authsid", authsid); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/authorizationServers/{authsid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{authsid}", System.Uri.EscapeDataString(authsid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the details of the authorization server specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// OAuth2 Server settings Update parameters. + /// + /// + /// The entity state (Etag) version of the authorization server to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string authsid, AuthorizationServerUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (authsid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authsid"); + } + if (authsid != null) + { + if (authsid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "authsid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(authsid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "authsid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("authsid", authsid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{authsid}", System.Uri.EscapeDataString(authsid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes specific authorization server instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// The entity state (Etag) version of the authentication server to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string authsid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (authsid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "authsid"); + } + if (authsid != null) + { + if (authsid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "authsid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(authsid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "authsid", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("authsid", authsid); + 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.ApiManagement/service/{serviceName}/authorizationServers/{authsid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{authsid}", System.Uri.EscapeDataString(authsid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of authorization servers defined within a service + /// instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperationsExtensions.cs new file mode 100644 index 000000000000..20897b5e10a6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/AuthorizationServerOperationsExtensions.cs @@ -0,0 +1,324 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for AuthorizationServerOperations. + /// + public static partial class AuthorizationServerOperationsExtensions + { + /// + /// Lists a collection of authorization servers defined within a service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IAuthorizationServerOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of authorization servers defined within a service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the authorization server specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + public static AuthorizationServerContract Get(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid) + { + return operations.GetAsync(resourceGroupName, serviceName, authsid).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the authorization server specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, authsid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates new authorization server or updates an existing authorization + /// server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// Create or update parameters. + /// + public static AuthorizationServerContract CreateOrUpdate(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, AuthorizationServerContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, authsid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates new authorization server or updates an existing authorization + /// server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// Create or update parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, AuthorizationServerContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, authsid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the details of the authorization server specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// OAuth2 Server settings Update parameters. + /// + /// + /// The entity state (Etag) version of the authorization server to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + public static void Update(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, AuthorizationServerUpdateContract parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the details of the authorization server specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// OAuth2 Server settings Update parameters. + /// + /// + /// The entity state (Etag) version of the authorization server to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, AuthorizationServerUpdateContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, authsid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes specific authorization server instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// The entity state (Etag) version of the authentication server to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + public static void Delete(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, authsid, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific authorization server instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// The entity state (Etag) version of the authentication server to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IAuthorizationServerOperations operations, string resourceGroupName, string serviceName, string authsid, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, authsid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of authorization servers defined within a service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IAuthorizationServerOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of authorization servers defined within a service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IAuthorizationServerOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperations.cs new file mode 100644 index 000000000000..29d39417b35d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperations.cs @@ -0,0 +1,1420 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// BackendOperations operations. + /// + internal partial class BackendOperations : IServiceOperations, IBackendOperations + { + /// + /// Initializes a new instance of the BackendOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal BackendOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/backends").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// 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 serviceName, string backendid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (backendid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backendid"); + } + if (backendid != null) + { + if (backendid.Length > 255) + { + throw new ValidationException(ValidationRules.MaxLength, "backendid", 255); + } + if (backendid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "backendid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(backendid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "backendid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("backendid", backendid); + 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.ApiManagement/service/{serviceName}/backends/{backendid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{backendid}", System.Uri.EscapeDataString(backendid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a backend. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string backendid, BackendContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (backendid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backendid"); + } + if (backendid != null) + { + if (backendid.Length > 255) + { + throw new ValidationException(ValidationRules.MaxLength, "backendid", 255); + } + if (backendid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "backendid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(backendid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "backendid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("backendid", backendid); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/backends/{backendid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{backendid}", System.Uri.EscapeDataString(backendid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates an existing backend. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the backend to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string backendid, BackendUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (backendid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backendid"); + } + if (backendid != null) + { + if (backendid.Length > 255) + { + throw new ValidationException(ValidationRules.MaxLength, "backendid", 255); + } + if (backendid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "backendid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(backendid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "backendid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("backendid", backendid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{backendid}", System.Uri.EscapeDataString(backendid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified backend. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the backend to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string backendid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (backendid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "backendid"); + } + if (backendid != null) + { + if (backendid.Length > 255) + { + throw new ValidationException(ValidationRules.MaxLength, "backendid", 255); + } + if (backendid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "backendid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(backendid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "backendid", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("backendid", backendid); + 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.ApiManagement/service/{serviceName}/backends/{backendid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{backendid}", System.Uri.EscapeDataString(backendid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/BackendOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperationsExtensions.cs new file mode 100644 index 000000000000..df55e03964f7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/BackendOperationsExtensions.cs @@ -0,0 +1,320 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for BackendOperations. + /// + public static partial class BackendOperationsExtensions + { + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IBackendOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IBackendOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + public static BackendContract Get(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid) + { + return operations.GetAsync(resourceGroupName, serviceName, backendid).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, backendid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a backend. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + public static BackendContract CreateOrUpdate(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, backendid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a backend. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, backendid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an existing backend. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the backend to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Update(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing backend. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the backend to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes the specified backend. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the backend to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, backendid, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified backend. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the backend to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, backendid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IBackendOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IBackendOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperations.cs new file mode 100644 index 000000000000..4e5e2d0d4af9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperations.cs @@ -0,0 +1,1194 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// CertificateOperations operations. + /// + internal partial class CertificateOperations : IServiceOperations, ICertificateOperations + { + /// + /// Initializes a new instance of the CertificateOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal CertificateOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of all certificates in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/certificates").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// 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 serviceName, string certificateId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (certificateId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateId"); + } + if (certificateId != null) + { + if (certificateId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "certificateId", 256); + } + if (certificateId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "certificateId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("certificateId", certificateId); + 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.ApiManagement/service/{serviceName}/certificates/{certificateId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{certificateId}", System.Uri.EscapeDataString(certificateId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates the certificate being used for authentication with the + /// backend. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create or Update parameters. + /// + /// + /// The entity state (Etag) version of the certificate to update. A value of + /// "*" can be used for If-Match to unconditionally apply the 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string certificateId, CertificateCreateOrUpdateParameters parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (certificateId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateId"); + } + if (certificateId != null) + { + if (certificateId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "certificateId", 256); + } + if (certificateId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "certificateId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("certificateId", certificateId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/certificates/{certificateId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{certificateId}", System.Uri.EscapeDataString(certificateId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes specific certificate. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the certificate to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string certificateId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (certificateId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "certificateId"); + } + if (certificateId != null) + { + if (certificateId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "certificateId", 256); + } + if (certificateId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "certificateId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(certificateId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "certificateId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("certificateId", certificateId); + 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.ApiManagement/service/{serviceName}/certificates/{certificateId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{certificateId}", System.Uri.EscapeDataString(certificateId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of all certificates in the specified service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/CertificateOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperationsExtensions.cs new file mode 100644 index 000000000000..8fe08e229205 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/CertificateOperationsExtensions.cs @@ -0,0 +1,273 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for CertificateOperations. + /// + public static partial class CertificateOperationsExtensions + { + /// + /// Lists a collection of all certificates in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this ICertificateOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((ICertificateOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of all certificates in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + public static CertificateContract Get(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId) + { + return operations.GetAsync(resourceGroupName, serviceName, certificateId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates the certificate being used for authentication with the + /// backend. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create or Update parameters. + /// + /// + /// The entity state (Etag) version of the certificate to update. A value of + /// "*" can be used for If-Match to unconditionally apply the operation.. + /// + public static CertificateContract CreateOrUpdate(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CertificateCreateOrUpdateParameters parameters, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates the certificate being used for authentication with the + /// backend. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create or Update parameters. + /// + /// + /// The entity state (Etag) version of the certificate to update. A value of + /// "*" can be used for If-Match to unconditionally apply the operation.. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CertificateCreateOrUpdateParameters parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes specific certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the certificate to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, certificateId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the certificate to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of all certificates in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this ICertificateOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of all certificates in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this ICertificateOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperations.cs new file mode 100644 index 000000000000..c4b5d1a4e8b2 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperations.cs @@ -0,0 +1,1393 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// EmailTemplateOperations operations. + /// + internal partial class EmailTemplateOperations : IServiceOperations, IEmailTemplateOperations + { + /// + /// Initializes a new instance of the EmailTemplateOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal EmailTemplateOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Number of records to return. + /// + /// + /// Number of records to skip. + /// + /// + /// 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (top < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "top", 1); + } + if (skip < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "skip", 0); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("top", top); + tracingParameters.Add("skip", skip); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/templates").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + if (skip != null) + { + _queryParameters.Add(string.Format("$skip={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(skip, Client.SerializationSettings).Trim('"')))); + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the email template specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// 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 serviceName, string templateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (templateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "templateName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("templateName", templateName); + 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.ApiManagement/service/{serviceName}/templates/{templateName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{templateName}", System.Uri.EscapeDataString(templateName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates an Email Template. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// Email Template update parameters. + /// + /// + /// 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 serviceName, string templateName, EmailTemplateUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (templateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "templateName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("templateName", templateName); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/templates/{templateName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{templateName}", System.Uri.EscapeDataString(templateName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the specific Email Template. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// Update parameters. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string templateName, EmailTemplateUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (templateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "templateName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("templateName", templateName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{templateName}", System.Uri.EscapeDataString(templateName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Reset the Email Template to default template provided by the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// The entity state (Etag) version of the Email Template to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string templateName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (templateName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "templateName"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("templateName", templateName); + 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.ApiManagement/service/{serviceName}/templates/{templateName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{templateName}", System.Uri.EscapeDataString(templateName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperationsExtensions.cs new file mode 100644 index 000000000000..9067abe51f08 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/EmailTemplateOperationsExtensions.cs @@ -0,0 +1,375 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for EmailTemplateOperations. + /// + public static partial class EmailTemplateOperationsExtensions + { + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Number of records to return. + /// + /// + /// Number of records to skip. + /// + public static IPage ListByService(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, int? top = default(int?), int? skip = default(int?)) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName, top, skip).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Number of records to return. + /// + /// + /// Number of records to skip. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, int? top = default(int?), int? skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, top, skip, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the email template specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + public static EmailTemplateContract Get(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName) + { + return operations.GetAsync(resourceGroupName, serviceName, templateName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the email template specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, templateName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an Email Template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// Email Template update parameters. + /// + public static EmailTemplateContract CreateOrUpdate(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, EmailTemplateUpdateParameters parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, templateName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates an Email Template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// Email Template update parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, EmailTemplateUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, templateName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the specific Email Template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// Update parameters. + /// + public static void Update(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, EmailTemplateUpdateParameters parameters) + { + operations.UpdateAsync(resourceGroupName, serviceName, templateName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates the specific Email Template. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// Update parameters. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, EmailTemplateUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, templateName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Reset the Email Template to default template provided by the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// The entity state (Etag) version of the Email Template to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, templateName, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Reset the Email Template to default template provided by the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', 'requestDeveloperNotificationMessage' + /// + /// + /// The entity state (Etag) version of the Email Template to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IEmailTemplateOperations operations, string resourceGroupName, string serviceName, string templateName, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, templateName, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IEmailTemplateOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IEmailTemplateOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperations.cs new file mode 100644 index 000000000000..85ebf4b84c7c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperations.cs @@ -0,0 +1,1434 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// GroupOperations operations. + /// + internal partial class GroupOperations : IServiceOperations, IGroupOperations + { + /// + /// Initializes a new instance of the GroupOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GroupOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/groups").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the group specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + 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.ApiManagement/service/{serviceName}/groups/{groupId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string groupId, GroupCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/groups/{groupId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the details of the group specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string groupId, GroupUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes specific group of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// 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 serviceName, string groupId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + 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.ApiManagement/service/{serviceName}/groups/{groupId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperationsExtensions.cs new file mode 100644 index 000000000000..d13ab43f0006 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupOperationsExtensions.cs @@ -0,0 +1,328 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for GroupOperations. + /// + public static partial class GroupOperationsExtensions + { + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IGroupOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IGroupOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the group specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + public static GroupContract Get(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId) + { + return operations.GetAsync(resourceGroupName, serviceName, groupId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the group specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create parameters. + /// + public static GroupContract CreateOrUpdate(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, GroupCreateParameters parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, groupId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, GroupCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the details of the group specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + public static void Update(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, GroupUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the details of the group specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, GroupUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes specific group of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + public static void Delete(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, groupId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific group of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IGroupOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IGroupOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperations.cs new file mode 100644 index 000000000000..0ff94028b4bf --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperations.cs @@ -0,0 +1,977 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// GroupUserOperations operations. + /// + internal partial class GroupUserOperations : IServiceOperations, IGroupUserOperations + { + /// + /// Initializes a new instance of the GroupUserOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GroupUserOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string groupId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Adds a user to the specified group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string groupId, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + tracingParameters.Add("uid", uid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", 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.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Remove existing user from existing group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string groupId, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("groupId", groupId); + tracingParameters.Add("uid", uid); + 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.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/GroupUserOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperationsExtensions.cs new file mode 100644 index 000000000000..367308d67d74 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/GroupUserOperationsExtensions.cs @@ -0,0 +1,227 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for GroupUserOperations. + /// + public static partial class GroupUserOperationsExtensions + { + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage List(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IGroupUserOperations)operations).ListAsync(resourceGroupName, serviceName, groupId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Adds a user to the specified group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + public static UserContract Create(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string uid) + { + return operations.CreateAsync(resourceGroupName, serviceName, groupId, uid).GetAwaiter().GetResult(); + } + + /// + /// Adds a user to the specified group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string uid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, uid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Remove existing user from existing group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + public static void Delete(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string uid) + { + operations.DeleteAsync(resourceGroupName, serviceName, groupId, uid).GetAwaiter().GetResult(); + } + + /// + /// Remove existing user from existing group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IGroupUserOperations operations, string resourceGroupName, string serviceName, string groupId, string uid, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, uid, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IGroupUserOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// 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 IGroupUserOperations 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/ApiManagement/Management.ApiManagement/Generated/IApiManagementClient.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementClient.cs new file mode 100644 index 000000000000..27ca80cae00b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementClient.cs @@ -0,0 +1,259 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// ApiManagement Client + /// + public partial interface IApiManagementClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// Version of the API to be used with the client request. + /// + string ApiVersion { get; } + + /// + /// Subscription credentials which uniquely identify Microsoft Azure + /// subscription. The subscription ID forms part of the URI for every + /// service call. + /// + string SubscriptionId { get; set; } + + /// + /// Gets or sets the preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// Gets or sets the retry timeout in seconds for Long Running + /// Operations. Default value is 30. + /// + 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. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IPolicyOperations. + /// + IPolicyOperations Policy { get; } + + /// + /// Gets the IPolicySnippetsOperations. + /// + IPolicySnippetsOperations PolicySnippets { get; } + + /// + /// Gets the IRegionsOperations. + /// + IRegionsOperations Regions { get; } + + /// + /// Gets the IApiOperations. + /// + IApiOperations Api { get; } + + /// + /// Gets the IApiOperationOperations. + /// + IApiOperationOperations ApiOperation { get; } + + /// + /// Gets the IApiOperationPolicyOperations. + /// + IApiOperationPolicyOperations ApiOperationPolicy { get; } + + /// + /// Gets the IApiProductOperations. + /// + IApiProductOperations ApiProduct { get; } + + /// + /// Gets the IApiPolicyOperations. + /// + IApiPolicyOperations ApiPolicy { get; } + + /// + /// Gets the IAuthorizationServerOperations. + /// + IAuthorizationServerOperations AuthorizationServer { get; } + + /// + /// Gets the IBackendOperations. + /// + IBackendOperations Backend { get; } + + /// + /// Gets the ICertificateOperations. + /// + ICertificateOperations Certificate { get; } + + /// + /// Gets the IApiManagementOperations. + /// + IApiManagementOperations ApiManagementOperations { get; } + + /// + /// Gets the IApiManagementServiceOperations. + /// + IApiManagementServiceOperations ApiManagementService { get; } + + /// + /// Gets the IEmailTemplateOperations. + /// + IEmailTemplateOperations EmailTemplate { get; } + + /// + /// Gets the IGroupOperations. + /// + IGroupOperations Group { get; } + + /// + /// Gets the IGroupUserOperations. + /// + IGroupUserOperations GroupUser { get; } + + /// + /// Gets the IIdentityProviderOperations. + /// + IIdentityProviderOperations IdentityProvider { get; } + + /// + /// Gets the ILoggerOperations. + /// + ILoggerOperations Logger { get; } + + /// + /// Gets the INetworkStatusOperations. + /// + INetworkStatusOperations NetworkStatus { get; } + + /// + /// Gets the IOpenIdConnectProviderOperations. + /// + IOpenIdConnectProviderOperations OpenIdConnectProvider { get; } + + /// + /// Gets the IProductOperations. + /// + IProductOperations Product { get; } + + /// + /// Gets the IProductApiOperations. + /// + IProductApiOperations ProductApi { get; } + + /// + /// Gets the IProductGroupOperations. + /// + IProductGroupOperations ProductGroup { get; } + + /// + /// Gets the IProductSubscriptionsOperations. + /// + IProductSubscriptionsOperations ProductSubscriptions { get; } + + /// + /// Gets the IProductPolicyOperations. + /// + IProductPolicyOperations ProductPolicy { get; } + + /// + /// Gets the IPropertyOperations. + /// + IPropertyOperations Property { get; } + + /// + /// Gets the IQuotaByCounterKeysOperations. + /// + IQuotaByCounterKeysOperations QuotaByCounterKeys { get; } + + /// + /// Gets the IQuotaByPeriodKeysOperations. + /// + IQuotaByPeriodKeysOperations QuotaByPeriodKeys { get; } + + /// + /// Gets the IReportsOperations. + /// + IReportsOperations Reports { get; } + + /// + /// Gets the ISubscriptionOperations. + /// + ISubscriptionOperations Subscription { get; } + + /// + /// Gets the ITenantAccessOperations. + /// + ITenantAccessOperations TenantAccess { get; } + + /// + /// Gets the ITenantAccessGitOperations. + /// + ITenantAccessGitOperations TenantAccessGit { get; } + + /// + /// Gets the ITenantConfigurationOperations. + /// + ITenantConfigurationOperations TenantConfiguration { get; } + + /// + /// Gets the IUserOperations. + /// + IUserOperations User { get; } + + /// + /// Gets the IUserGroupOperations. + /// + IUserGroupOperations UserGroup { get; } + + /// + /// Gets the IUserSubscriptionOperations. + /// + IUserSubscriptionOperations UserSubscription { get; } + + /// + /// Gets the IUserIdentitiesOperations. + /// + IUserIdentitiesOperations UserIdentities { get; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementOperations.cs new file mode 100644 index 000000000000..6a6854843f68 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementOperations.cs @@ -0,0 +1,70 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiManagementOperations operations. + /// + public partial interface IApiManagementOperations + { + /// + /// Lists all of the available REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// 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 REST API operations of the + /// Microsoft.ApiManagement provider. + /// + /// + /// 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/ApiManagement/Management.ApiManagement/Generated/IApiManagementServiceOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementServiceOperations.cs new file mode 100644 index 000000000000..7cfc454c8bdb --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiManagementServiceOperations.cs @@ -0,0 +1,514 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiManagementServiceOperations operations. + /// + public partial interface IApiManagementServiceOperations + { + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This + /// is a long running operation and could take several minutes to + /// complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from + /// backup 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> RestoreWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a backup of the API Management service to the given Azure + /// Storage Account. This is long running operation and could take + /// several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup 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> BackupWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing API Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service + /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets an API Management service resource description. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes an existing API Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all API Management services within a resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the Single-Sign-On token for the API Management Service which + /// is valid for 5 Minutes. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> GetSsoTokenWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Checks availability and correctness of a name for an API Management + /// service. + /// + /// + /// Parameters supplied to the CheckNameAvailability 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> CheckNameAvailabilityWithHttpMessagesAsync(ApiManagementServiceCheckNameAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual + /// network to pick the updated network settings. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. + /// If the parameters are empty, all the regions in which the Api + /// Management service is deployed will be updated sequentially without + /// incurring downtime in the region. + /// + /// + /// 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> ApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Restores a backup of an API Management service created using the + /// ApiManagementService_Backup operation on the current service. This + /// is a long running operation and could take several minutes to + /// complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Restore API Management service from + /// backup 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> BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a backup of the API Management service to the given Azure + /// Storage Account. This is long running operation and could take + /// several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the ApiManagementService_Backup 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> BeginBackupWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceBackupRestoreParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates an API Management service. This is long running + /// operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service + /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing API Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the CreateOrUpdate API Management service + /// 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> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the Microsoft.ApiManagement resource running in the Virtual + /// network to pick the updated network settings. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to the Apply Network Configuration operation. + /// If the parameters are empty, all the regions in which the Api + /// Management service is deployed will be updated sequentially without + /// incurring downtime in the region. + /// + /// + /// 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> BeginApplyNetworkConfigurationUpdatesWithHttpMessagesAsync(string resourceGroupName, string serviceName, ApiManagementServiceApplyNetworkConfigurationParameters parameters = default(ApiManagementServiceApplyNetworkConfigurationParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List all API Management services within a resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all API Management services within an Azure subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationOperations.cs new file mode 100644 index 000000000000..1dc2bc308bd5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationOperations.cs @@ -0,0 +1,225 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiOperationOperations operations. + /// + public partial interface IApiOperationOperations + { + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the API Operation specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// 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 serviceName, string apiId, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new operation in the API or updates an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string apiId, string operationId, OperationContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the details of the operation in the API specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// API Operation Update parameters. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current + /// entity state from the header response of the GET request or it + /// should be * for unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string operationId, OperationUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified operation in the API. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// ETag of the API Operation Entity. ETag should match the current + /// entity state from the header response of the GET request or it + /// should be * for unconditional update. + /// + /// + /// 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 serviceName, string apiId, string operationId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of the operations for the specified API. + /// + /// + /// 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>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationPolicyOperations.cs new file mode 100644 index 000000000000..316e128b7377 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperationPolicyOperations.cs @@ -0,0 +1,137 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiOperationPolicyOperations operations. + /// + public partial interface IApiOperationPolicyOperations + { + /// + /// Get the policy configuration at the API Operation level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// 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 serviceName, string apiId, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates policy configuration for the API Operation + /// level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Operation policy to + /// update. A value of "*" can be used for If-Match to unconditionally + /// apply the 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, string operationId, PolicyContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the policy configuration at the Api Operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Operation identifier within an API. Must be unique in the current + /// API Management service instance. + /// + /// + /// The entity state (Etag) version of the Api Operation Policy to + /// delete. A value of "*" can be used for If-Match to unconditionally + /// apply the operation. + /// + /// + /// 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 serviceName, string apiId, string operationId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperations.cs new file mode 100644 index 000000000000..7499d7f89dda --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiOperations.cs @@ -0,0 +1,212 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiOperations operations. + /// + public partial interface IApiOperations + { + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the API specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates new or updates existing specified API of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create or update parameters. + /// + /// + /// ETag of the Api Entity. For Create Api Etag should not be + /// specified. For Update Etag should match the existing Entity or it + /// can be * for unconditional update. + /// + /// + /// 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 serviceName, string apiId, ApiCreateOrUpdateParameter parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the specified API of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// API Update Contract parameters. + /// + /// + /// ETag of the API entity. ETag should match the current entity state + /// in the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, ApiUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified API of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// ETag of the API Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// 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 serviceName, string apiId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all APIs of the API Management service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiPolicyOperations.cs new file mode 100644 index 000000000000..5e9f7124c434 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiPolicyOperations.cs @@ -0,0 +1,153 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiPolicyOperations operations. + /// + public partial interface IApiPolicyOperations + { + /// + /// Get the policy configuration at the API level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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> ListByApiWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the policy configuration at the API level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates policy configuration for the API. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The entity state (Etag) version of the Api Policy to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, PolicyContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the policy configuration at the Api. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The entity state (Etag) version of the Api policy to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string apiId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiProductOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiProductOperations.cs new file mode 100644 index 000000000000..9256f5089d52 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IApiProductOperations.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ApiProductOperations operations. + /// + public partial interface IApiProductOperations + { + /// + /// Lists all Products, which the API is part of. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListByApisWithHttpMessagesAsync(string resourceGroupName, string serviceName, string apiId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all Products, which the API is part of. + /// + /// + /// 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>> ListByApisNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IAuthorizationServerOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IAuthorizationServerOperations.cs new file mode 100644 index 000000000000..bdc09fd229ba --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IAuthorizationServerOperations.cs @@ -0,0 +1,205 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// AuthorizationServerOperations operations. + /// + public partial interface IAuthorizationServerOperations + { + /// + /// Lists a collection of authorization servers defined within a + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the authorization server specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// 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 serviceName, string authsid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates new authorization server or updates an existing + /// authorization server. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// Create or update parameters. + /// + /// + /// 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 serviceName, string authsid, AuthorizationServerContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the details of the authorization server specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// OAuth2 Server settings Update parameters. + /// + /// + /// The entity state (Etag) version of the authorization server to + /// update. A value of "*" can be used for If-Match to unconditionally + /// apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string authsid, AuthorizationServerUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific authorization server instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the authorization server. + /// + /// + /// The entity state (Etag) version of the authentication server to + /// delete. A value of "*" can be used for If-Match to unconditionally + /// apply the operation. + /// + /// + /// 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 serviceName, string authsid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of authorization servers defined within a + /// service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IBackendOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IBackendOperations.cs new file mode 100644 index 000000000000..498e7db3ed75 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IBackendOperations.cs @@ -0,0 +1,204 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// BackendOperations operations. + /// + public partial interface IBackendOperations + { + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// 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 serviceName, string backendid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a backend. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string backendid, BackendContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing backend. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the backend to update. A value + /// of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string backendid, BackendUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified backend. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API + /// Management service instance. + /// + /// + /// The entity state (Etag) version of the backend to delete. A value + /// of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string backendid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of backends in the specified service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ICertificateOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ICertificateOperations.cs new file mode 100644 index 000000000000..b0f4774e5cf1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ICertificateOperations.cs @@ -0,0 +1,179 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// CertificateOperations operations. + /// + public partial interface ICertificateOperations + { + /// + /// Lists a collection of all certificates in the specified service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current + /// API Management service instance. + /// + /// + /// 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 serviceName, string certificateId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates the certificate being used for authentication + /// with the backend. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current + /// API Management service instance. + /// + /// + /// Create or Update parameters. + /// + /// + /// The entity state (Etag) version of the certificate to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string certificateId, CertificateCreateOrUpdateParameters parameters, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific certificate. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the certificate entity. Must be unique in the current + /// API Management service instance. + /// + /// + /// The entity state (Etag) version of the certificate to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string certificateId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of all certificates in the specified service + /// instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IEmailTemplateOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IEmailTemplateOperations.cs new file mode 100644 index 000000000000..4eaa87c2dad0 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IEmailTemplateOperations.cs @@ -0,0 +1,238 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// EmailTemplateOperations operations. + /// + public partial interface IEmailTemplateOperations + { + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Number of records to return. + /// + /// + /// Number of records to skip. + /// + /// + /// 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, int? top = default(int?), int? skip = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the email template specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', + /// 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', + /// 'requestDeveloperNotificationMessage' + /// + /// + /// 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 serviceName, string templateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an Email Template. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', + /// 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', + /// 'requestDeveloperNotificationMessage' + /// + /// + /// Email Template update parameters. + /// + /// + /// 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 serviceName, string templateName, EmailTemplateUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the specific Email Template. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', + /// 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', + /// 'requestDeveloperNotificationMessage' + /// + /// + /// Update parameters. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string templateName, EmailTemplateUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Reset the Email Template to default template provided by the API + /// Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Email Template Name Identifier. Possible values include: + /// 'applicationApprovedNotificationMessage', 'accountClosedDeveloper', + /// 'quotaLimitApproachingDeveloperNotificationMessage', + /// 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + /// 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + /// 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + /// 'purchaseDeveloperNotificationMessage', + /// 'passwordResetIdentityDefault', + /// 'passwordResetByAdminNotificationMessage', + /// 'rejectDeveloperNotificationMessage', + /// 'requestDeveloperNotificationMessage' + /// + /// + /// The entity state (Etag) version of the Email Template to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string templateName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupOperations.cs new file mode 100644 index 000000000000..4f60b04d79d2 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupOperations.cs @@ -0,0 +1,206 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// GroupOperations operations. + /// + public partial interface IGroupOperations + { + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the group specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string groupId, GroupCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the details of the group specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * + /// for unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string groupId, GroupUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific group of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// ETag of the Group Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * + /// for unconditional update. + /// + /// + /// 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 serviceName, string groupId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of groups defined within a service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupUserOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupUserOperations.cs new file mode 100644 index 000000000000..aaf68fba8eb2 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IGroupUserOperations.cs @@ -0,0 +1,147 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// GroupUserOperations operations. + /// + public partial interface IGroupUserOperations + { + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string groupId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Adds a user to the specified group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string groupId, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove existing user from existing group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string groupId, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of the members of the group, specified by its + /// identifier. + /// + /// + /// 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/ApiManagement/Management.ApiManagement/Generated/IIdentityProviderOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IIdentityProviderOperations.cs new file mode 100644 index 000000000000..35a22778f177 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IIdentityProviderOperations.cs @@ -0,0 +1,181 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IdentityProviderOperations operations. + /// + public partial interface IIdentityProviderOperations + { + /// + /// Lists a collection of Identity Provider configured in the specified + /// service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the configuration details of the identity Provider configured + /// in specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: + /// 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// 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 serviceName, IdentityProviderType identityProviderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates the IdentityProvider configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: + /// 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, IdentityProviderType identityProviderName, IdentityProviderContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing IdentityProvider configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: + /// 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the identity provider + /// configuration to update. A value of "*" can be used for If-Match to + /// unconditionally apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified identity provider configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: + /// 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// The entity state (Etag) version of the backend to delete. A value + /// of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, IdentityProviderType identityProviderName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ILoggerOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ILoggerOperations.cs new file mode 100644 index 000000000000..8446ac193f60 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ILoggerOperations.cs @@ -0,0 +1,206 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// LoggerOperations operations. + /// + public partial interface ILoggerOperations + { + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service + /// instance. + /// + /// + /// 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 serviceName, string loggerid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a logger. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service + /// instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string loggerid, LoggerContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing logger. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the logger to update. A value of + /// "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string loggerid, LoggerUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified logger. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the logger to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string loggerid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/INetworkStatusOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/INetworkStatusOperations.cs new file mode 100644 index 000000000000..5c063e0fd17d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/INetworkStatusOperations.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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NetworkStatusOperations operations. + /// + public partial interface INetworkStatusOperations + { + /// + /// Gets the Connectivity Status to the external resources on which the + /// Api Management service depends from inside the Cloud Service. This + /// also returns the DNS Servers as visible to the CloudService. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the Connectivity Status to the external resources on which the + /// Api Management service depends from inside the Cloud Service. This + /// also returns the DNS Servers as visible to the CloudService. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Location in which the API Management service is deployed. This is + /// one of the Azure Regions like West US, East US, South Central US. + /// + /// + /// 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> ListByLocationWithHttpMessagesAsync(string resourceGroupName, string serviceName, string locationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IOpenIdConnectProviderOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IOpenIdConnectProviderOperations.cs new file mode 100644 index 000000000000..2e0ea848e579 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IOpenIdConnectProviderOperations.cs @@ -0,0 +1,201 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OpenIdConnectProviderOperations operations. + /// + public partial interface IOpenIdConnectProviderOperations + { + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets specific OpenID Connect Provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// 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 serviceName, string opid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates the OpenID Connect Provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string opid, OpenidConnectProviderContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the specific OpenID Connect Provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to + /// update. A value of "*" can be used for If-Match to unconditionally + /// apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string opid, OpenidConnectProviderUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific OpenID Connect Provider of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to + /// delete. A value of "*" can be used for If-Match to unconditionally + /// apply the operation. + /// + /// + /// 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 serviceName, string opid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicyOperations.cs new file mode 100644 index 000000000000..34d33e45e34a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicyOperations.cs @@ -0,0 +1,139 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PolicyOperations operations. + /// + public partial interface IPolicyOperations + { + /// + /// Lists all the Global Policy definitions of the Api Management + /// service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the Global policy definition of the Api Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates the global policy configuration of the Api + /// Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The policy contents to apply. + /// + /// + /// 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 serviceName, PolicyContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the global policy configuration of the Api Management + /// Service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The entity state (Etag) version of the policy to be deleted. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicySnippetsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicySnippetsOperations.cs new file mode 100644 index 000000000000..8dac4f4539e9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPolicySnippetsOperations.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PolicySnippetsOperations operations. + /// + public partial interface IPolicySnippetsOperations + { + /// + /// Lists all policy snippets. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductApiOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductApiOperations.cs new file mode 100644 index 000000000000..ad3b7855a367 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductApiOperations.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ProductApiOperations operations. + /// + public partial interface IProductApiOperations + { + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListByProductWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Adds an API to the specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string productId, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified API from the specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// API identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string productId, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// 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>> ListByProductNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductGroupOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductGroupOperations.cs new file mode 100644 index 000000000000..0179b1a97577 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductGroupOperations.cs @@ -0,0 +1,148 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ProductGroupOperations operations. + /// + public partial interface IProductGroupOperations + { + /// + /// Lists the collection of developer groups associated with the + /// specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListByProductWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Adds the association between the specified developer group with the + /// specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string productId, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the association between the specified group and product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Group identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string productId, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the collection of developer groups associated with the + /// specified product. + /// + /// + /// 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>> ListByProductNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductOperations.cs new file mode 100644 index 000000000000..7bd51ee2415a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductOperations.cs @@ -0,0 +1,211 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ProductOperations operations. + /// + public partial interface IProductOperations + { + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// When set to true, the response contains an array of groups that + /// have visibility to the product. The default is false. + /// + /// + /// 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), bool? expandGroups = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the product specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string productId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create or update parameters. + /// + /// + /// 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 serviceName, string productId, ProductContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * + /// for unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ProductUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity + /// state from the header response of the GET request or it should be * + /// for unconditional update. + /// + /// + /// Delete existing subscriptions to the product or not. + /// + /// + /// 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 serviceName, string productId, string ifMatch, bool? deleteSubscriptions = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductPolicyOperations.cs new file mode 100644 index 000000000000..94ac46eee64e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductPolicyOperations.cs @@ -0,0 +1,148 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ProductPolicyOperations operations. + /// + public partial interface IProductPolicyOperations + { + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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> ListByProductWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string productId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates policy configuration for the Product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// 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 serviceName, string productId, PolicyContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the policy configuration at the Product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The entity state (Etag) version of the product policy to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string productId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductSubscriptionsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductSubscriptionsOperations.cs new file mode 100644 index 000000000000..b1b9736a4a73 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IProductSubscriptionsOperations.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ProductSubscriptionsOperations operations. + /// + public partial interface IProductSubscriptionsOperations + { + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// 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/ApiManagement/Management.ApiManagement/Generated/IPropertyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPropertyOperations.cs new file mode 100644 index 000000000000..4ccf240d3a62 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IPropertyOperations.cs @@ -0,0 +1,203 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PropertyOperations operations. + /// + public partial interface IPropertyOperations + { + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the property specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// 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 serviceName, string propId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a property. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string propId, PropertyContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the specific property. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the property to update. A value + /// of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string propId, PropertyUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific property from the the API Management service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// The entity state (Etag) version of the property to delete. A value + /// of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string propId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByCounterKeysOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByCounterKeysOperations.cs new file mode 100644 index 000000000000..33b14a618473 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByCounterKeysOperations.cs @@ -0,0 +1,97 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// QuotaByCounterKeysOperations operations. + /// + public partial interface IQuotaByCounterKeysOperations + { + /// + /// Lists a collection of current quota counter periods associated with + /// the counter-key configured in the policy on the specified service + /// instance. The api does not support paging yet. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression + /// defined in counter-key attribute of the quota-by-key policy.For + /// Example, if you specify counter-key="boo" in the policy, then it’s + /// accessible by "boo" counter key. But if it’s defined as + /// counter-key="@("b"+"a")" then it will be accessible by "ba" key + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, string quotaCounterKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates all the quota counter values specified with the existing + /// quota counter key to a value in the specified service instance. + /// This should be used for reset of the quota counter values. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression + /// defined in counter-key attribute of the quota-by-key policy.For + /// Example, if you specify counter-key="boo" in the policy, then it’s + /// accessible by "boo" counter key. But if it’s defined as + /// counter-key="@("b"+"a")" then it will be accessible by "ba" key + /// + /// + /// The value of the quota counter to be applied to all quota counter + /// periods. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string quotaCounterKey, QuotaCounterValueContractProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByPeriodKeysOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByPeriodKeysOperations.cs new file mode 100644 index 000000000000..8312f1097d45 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IQuotaByPeriodKeysOperations.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// QuotaByPeriodKeysOperations operations. + /// + public partial interface IQuotaByPeriodKeysOperations + { + /// + /// Gets the value of the quota counter associated with the counter-key + /// in the policy for the specific period in service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression + /// defined in counter-key attribute of the quota-by-key policy.For + /// Example, if you specify counter-key="boo" in the policy, then it’s + /// accessible by "boo" counter key. But if it’s defined as + /// counter-key="@("b"+"a")" then it will be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// 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 serviceName, string quotaCounterKey, string quotaPeriodKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing quota counter value in the specified service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression + /// defined in counter-key attribute of the quota-by-key policy.For + /// Example, if you specify counter-key="boo" in the policy, then it’s + /// accessible by "boo" counter key. But if it’s defined as + /// counter-key="@("b"+"a")" then it will be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// The value of the Quota counter to be applied on the specified + /// period. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string quotaCounterKey, string quotaPeriodKey, QuotaCounterValueContractProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IRegionsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IRegionsOperations.cs new file mode 100644 index 000000000000..cfc23b18b78e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IRegionsOperations.cs @@ -0,0 +1,52 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// RegionsOperations operations. + /// + public partial interface IRegionsOperations + { + /// + /// Lists all azure regions in which the service exists. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IReportsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IReportsOperations.cs new file mode 100644 index 000000000000..336621b50d17 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IReportsOperations.cs @@ -0,0 +1,413 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReportsOperations operations. + /// + public partial interface IReportsOperations + { + /// + /// Lists report records. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByApiWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by User. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByUserWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by API Operations. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByOperationWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by Product. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByProductWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by GeoGraphy. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByGeoWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by subscription. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListBySubscriptionWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by Time. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// By time interval. Interval must be multiple of 15 minutes and may + /// not be zero. The value should be in ISO 8601 format + /// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be + /// used to convert TimeSpan to a valid interval string: + /// XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) + /// + /// + /// OData parameters to apply to the 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>> ListByTimeWithHttpMessagesAsync(string resourceGroupName, string serviceName, System.TimeSpan interval, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by Request. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByRequestWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records. + /// + /// + /// 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>> ListByApiNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by User. + /// + /// + /// 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>> ListByUserNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by 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>> ListByOperationNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by Product. + /// + /// + /// 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>> ListByProductNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by GeoGraphy. + /// + /// + /// 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>> ListByGeoNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists report records by Time. + /// + /// + /// 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>> ListByTimeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ISubscriptionOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ISubscriptionOperations.cs new file mode 100644 index 000000000000..5cba77500eca --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ISubscriptionOperations.cs @@ -0,0 +1,260 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SubscriptionOperations operations. + /// + public partial interface ISubscriptionOperations + { + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the specified Subscription entity. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the + /// association between a user and a product in API Management. + /// + /// + /// 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 serviceName, string sid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates the subscription of specified user to the + /// specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the + /// association between a user and a product in API Management. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string sid, SubscriptionCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the details of a subscription specificied by its + /// identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the + /// association between a user and a product in API Management. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current + /// entity state from the header response of the GET request or it + /// should be * for unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified subscription. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the + /// association between a user and a product in API Management. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current + /// entity state from the header response of the GET request or it + /// should be * for unconditional update. + /// + /// + /// 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 serviceName, string sid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerates primary key of existing subscription of the API + /// Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the + /// association between a user and a product in API Management. + /// + /// + /// 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 RegeneratePrimaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, string sid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerates secondary key of existing subscription of the API + /// Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the + /// association between a user and a product in API Management. + /// + /// + /// 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 RegenerateSecondaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, string sid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// 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/ApiManagement/Management.ApiManagement/Generated/ITenantAccessGitOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessGitOperations.cs new file mode 100644 index 000000000000..d1cab818a159 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessGitOperations.cs @@ -0,0 +1,96 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TenantAccessGitOperations operations. + /// + public partial interface ITenantAccessGitOperations + { + /// + /// Gets the Git access configuration for the tenant. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerate primary access key for GIT. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegeneratePrimaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerate secondary access key for GIT. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegenerateSecondaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessOperations.cs new file mode 100644 index 000000000000..0c6c1cdfb2ba --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantAccessOperations.cs @@ -0,0 +1,126 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TenantAccessOperations operations. + /// + public partial interface ITenantAccessOperations + { + /// + /// Get tenant access information details. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update tenant access information details. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to retrieve the Tenant Access Information. + /// + /// + /// The entity state (Etag) version of the property to update. A value + /// of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, AccessInformationUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerate primary access key. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegeneratePrimaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerate secondary access key. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegenerateSecondaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantConfigurationOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantConfigurationOperations.cs new file mode 100644 index 000000000000..48197cf07605 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ITenantConfigurationOperations.cs @@ -0,0 +1,237 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TenantConfigurationOperations operations. + /// + public partial interface ITenantConfigurationOperations + { + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could + /// take several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + /// + /// 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> DeployWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// This operation creates a commit with the current configuration + /// snapshot to the specified branch in the repository. This is a long + /// running operation and could take several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + /// + /// 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> SaveWithHttpMessagesAsync(string resourceGroupName, string serviceName, SaveConfigurationParameter parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// This operation validates the changes in the specified Git branch. + /// This is a long running operation and could take several minutes to + /// complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + /// + /// 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> ValidateWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the status of the most recent synchronization between the + /// configuration database and the Git repository. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> GetSyncStateWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could + /// take several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + /// + /// 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> BeginDeployWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// This operation creates a commit with the current configuration + /// snapshot to the specified branch in the repository. This is a long + /// running operation and could take several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + /// + /// 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> BeginSaveWithHttpMessagesAsync(string resourceGroupName, string serviceName, SaveConfigurationParameter parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// This operation validates the changes in the specified Git branch. + /// This is a long running operation and could take several minutes to + /// complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + /// + /// 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> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserGroupOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserGroupOperations.cs new file mode 100644 index 000000000000..677f1a17d0fb --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserGroupOperations.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// UserGroupOperations operations. + /// + public partial interface IUserGroupOperations + { + /// + /// Lists all user groups. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all user groups. + /// + /// + /// 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/ApiManagement/Management.ApiManagement/Generated/IUserIdentitiesOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserIdentitiesOperations.cs new file mode 100644 index 000000000000..5cefcf86d6be --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserIdentitiesOperations.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// UserIdentitiesOperations operations. + /// + public partial interface IUserIdentitiesOperations + { + /// + /// Lists all user identities. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserOperations.cs new file mode 100644 index 000000000000..5d2223d1ef69 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserOperations.cs @@ -0,0 +1,274 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// UserOperations operations. + /// + public partial interface IUserOperations + { + /// + /// Lists a collection of registered users in the specified service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of the user specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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 serviceName, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or Updates a user. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create or update parameters. + /// + /// + /// 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 serviceName, string uid, UserCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the details of the user specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the user to update. A value of + /// "*" can be used for If-Match to unconditionally apply the + /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, UserUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specific user. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// The entity state (Etag) version of the user to delete. A value of + /// "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// Whether to delete user's subscription or not. + /// + /// + /// 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 serviceName, string uid, string ifMatch, bool? deleteSubscriptions = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieves a redirection URL containing an authentication token for + /// signing a given user into the developer portal. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// 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> GenerateSsoUrlWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the Shared Access Authorization Token for the User. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// Create Authorization Token parameters. + /// + /// + /// 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> GetSharedAccessTokenWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, UserTokenParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists a collection of registered users in the specified service + /// instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserSubscriptionOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserSubscriptionOperations.cs new file mode 100644 index 000000000000..d4deff1ff37d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IUserSubscriptionOperations.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// UserSubscriptionOperations operations. + /// + public partial interface IUserSubscriptionOperations + { + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management + /// service instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// 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/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperations.cs new file mode 100644 index 000000000000..d5c02ae4e4ad --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperations.cs @@ -0,0 +1,1167 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// IdentityProviderOperations operations. + /// + internal partial class IdentityProviderOperations : IServiceOperations, IIdentityProviderOperations + { + /// + /// Initializes a new instance of the IdentityProviderOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IdentityProviderOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of Identity Provider configured in the specified service + /// instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + 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("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/identityProviders").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the configuration details of the identity Provider configured in + /// specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// 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 serviceName, IdentityProviderType identityProviderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + 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("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("identityProviderName", identityProviderName); + 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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{identityProviderName}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(identityProviderName, Client.SerializationSettings).Trim('"'))); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates the IdentityProvider configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, IdentityProviderType identityProviderName, IdentityProviderContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("identityProviderName", identityProviderName); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{identityProviderName}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(identityProviderName, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates an existing IdentityProvider configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the identity provider configuration to + /// update. A value of "*" can be used for If-Match to unconditionally apply + /// the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("identityProviderName", identityProviderName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{identityProviderName}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(identityProviderName, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified identity provider configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// The entity state (Etag) version of the backend to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, IdentityProviderType identityProviderName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("identityProviderName", identityProviderName); + 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.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{identityProviderName}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(identityProviderName, Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperationsExtensions.cs new file mode 100644 index 000000000000..8f872b3b834b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/IdentityProviderOperationsExtensions.cs @@ -0,0 +1,287 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IdentityProviderOperations. + /// + public static partial class IdentityProviderOperationsExtensions + { + /// + /// Lists a collection of Identity Provider configured in the specified service + /// instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IdentityProviderList ListByService(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of Identity Provider configured in the specified service + /// instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task ListByServiceAsync(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the configuration details of the identity Provider configured in + /// specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + public static IdentityProviderContract Get(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName) + { + return operations.GetAsync(resourceGroupName, serviceName, identityProviderName).GetAwaiter().GetResult(); + } + + /// + /// Gets the configuration details of the identity Provider configured in + /// specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, identityProviderName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates the IdentityProvider configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Create parameters. + /// + public static IdentityProviderContract CreateOrUpdate(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, IdentityProviderContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, identityProviderName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates the IdentityProvider configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, IdentityProviderContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, identityProviderName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an existing IdentityProvider configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the identity provider configuration to + /// update. A value of "*" can be used for If-Match to unconditionally apply + /// the operation. + /// + public static void Update(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing IdentityProvider configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the identity provider configuration to + /// update. A value of "*" can be used for If-Match to unconditionally apply + /// the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, IdentityProviderUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, identityProviderName, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes the specified identity provider configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// The entity state (Etag) version of the backend to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, identityProviderName, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified identity provider configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identity Provider Type identifier. Possible values include: 'facebook', + /// 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + /// + /// + /// The entity state (Etag) version of the backend to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IIdentityProviderOperations operations, string resourceGroupName, string serviceName, IdentityProviderType identityProviderName, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, identityProviderName, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperations.cs new file mode 100644 index 000000000000..dea0f2cae830 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperations.cs @@ -0,0 +1,1406 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// LoggerOperations operations. + /// + internal partial class LoggerOperations : IServiceOperations, ILoggerOperations + { + /// + /// Initializes a new instance of the LoggerOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal LoggerOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/loggers").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// 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 serviceName, string loggerid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (loggerid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "loggerid"); + } + if (loggerid != null) + { + if (loggerid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "loggerid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(loggerid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "loggerid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("loggerid", loggerid); + 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.ApiManagement/service/{serviceName}/loggers/{loggerid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{loggerid}", System.Uri.EscapeDataString(loggerid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a logger. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string loggerid, LoggerContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (loggerid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "loggerid"); + } + if (loggerid != null) + { + if (loggerid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "loggerid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(loggerid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "loggerid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + 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 (parameters == null) + { + parameters = new LoggerContract(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("loggerid", loggerid); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/loggers/{loggerid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{loggerid}", System.Uri.EscapeDataString(loggerid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates an existing logger. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the logger to update. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string loggerid, LoggerUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (loggerid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "loggerid"); + } + if (loggerid != null) + { + if (loggerid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "loggerid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(loggerid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "loggerid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("loggerid", loggerid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{loggerid}", System.Uri.EscapeDataString(loggerid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified logger. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// The entity state (Etag) version of the logger to delete. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string loggerid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (loggerid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "loggerid"); + } + if (loggerid != null) + { + if (loggerid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "loggerid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(loggerid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "loggerid", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("loggerid", loggerid); + 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.ApiManagement/service/{serviceName}/loggers/{loggerid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{loggerid}", System.Uri.EscapeDataString(loggerid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/LoggerOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperationsExtensions.cs new file mode 100644 index 000000000000..75e6e12a884b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/LoggerOperationsExtensions.cs @@ -0,0 +1,316 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for LoggerOperations. + /// + public static partial class LoggerOperationsExtensions + { + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this ILoggerOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((ILoggerOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this ILoggerOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + public static LoggerContract Get(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid) + { + return operations.GetAsync(resourceGroupName, serviceName, loggerid).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, loggerid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a logger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// Create parameters. + /// + public static LoggerContract CreateOrUpdate(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, LoggerContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, loggerid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a logger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, LoggerContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, loggerid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an existing logger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the logger to update. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + public static void Update(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, LoggerUpdateContract parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing logger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the logger to update. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, LoggerUpdateContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, loggerid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes the specified logger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// The entity state (Etag) version of the logger to delete. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, loggerid, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified logger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// + /// + /// The entity state (Etag) version of the logger to delete. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ILoggerOperations operations, string resourceGroupName, string serviceName, string loggerid, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, loggerid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this ILoggerOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of loggers in the specified service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this ILoggerOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationContract.cs new file mode 100644 index 000000000000..f9e8be93e3e9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationContract.cs @@ -0,0 +1,78 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tenant access information contract of the API Management service. + /// + public partial class AccessInformationContract + { + /// + /// Initializes a new instance of the AccessInformationContract class. + /// + public AccessInformationContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AccessInformationContract class. + /// + /// Identifier. + /// Primary access key. + /// Secondary access key. + /// Tenant access information of the API + /// Management service. + public AccessInformationContract(string id = default(string), string primaryKey = default(string), string secondaryKey = default(string), bool? enabled = default(bool?)) + { + Id = id; + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets primary access key. + /// + [JsonProperty(PropertyName = "primaryKey")] + public string PrimaryKey { get; set; } + + /// + /// Gets or sets secondary access key. + /// + [JsonProperty(PropertyName = "secondaryKey")] + public string SecondaryKey { get; set; } + + /// + /// Gets or sets tenant access information of the API Management + /// service. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationUpdateParameters.cs new file mode 100644 index 000000000000..4b4ba10f3c2c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AccessInformationUpdateParameters.cs @@ -0,0 +1,57 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tenant access information update parameters of the API Management + /// service. + /// + public partial class AccessInformationUpdateParameters + { + /// + /// Initializes a new instance of the AccessInformationUpdateParameters + /// class. + /// + public AccessInformationUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AccessInformationUpdateParameters + /// class. + /// + /// Tenant access information of the API + /// Management service. + public AccessInformationUpdateParameters(bool? enabled = default(bool?)) + { + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets tenant access information of the API Management + /// service. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AdditionalLocation.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AdditionalLocation.cs new file mode 100644 index 000000000000..84b4e041da51 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AdditionalLocation.cs @@ -0,0 +1,109 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Description of an additional API Management resource location. + /// + public partial class AdditionalLocation + { + /// + /// Initializes a new instance of the AdditionalLocation class. + /// + public AdditionalLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AdditionalLocation class. + /// + /// The location name of the additional region + /// among Azure Data center regions. + /// SKU properties of the API Management + /// service. + /// Static IP addresses of the location's + /// virtual machines. + /// Virtual network + /// configuration for the location. + public AdditionalLocation(string location, ApiManagementServiceSkuProperties sku, IList staticIps = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration)) + { + Location = location; + Sku = sku; + StaticIps = staticIps; + VirtualNetworkConfiguration = virtualNetworkConfiguration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location name of the additional region among Azure + /// Data center regions. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets SKU properties of the API Management service. + /// + [JsonProperty(PropertyName = "sku")] + public ApiManagementServiceSkuProperties Sku { get; set; } + + /// + /// Gets static IP addresses of the location's virtual machines. + /// + [JsonProperty(PropertyName = "staticIps")] + public IList StaticIps { get; private set; } + + /// + /// Gets or sets virtual network configuration for the location. + /// + [JsonProperty(PropertyName = "virtualNetworkConfiguration")] + public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (Sku == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Sku"); + } + if (Sku != null) + { + Sku.Validate(); + } + if (VirtualNetworkConfiguration != null) + { + VirtualNetworkConfiguration.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContract.cs new file mode 100644 index 000000000000..6926b75e20a3 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContract.cs @@ -0,0 +1,221 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// API details. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiContract : Resource + { + /// + /// Initializes a new instance of the ApiContract class. + /// + public ApiContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiContract class. + /// + /// Relative URL uniquely identifying this API and + /// all of its resource paths within the API Management service + /// instance. It is appended to the API endpoint base URL specified + /// during the service instance creation to form a public URL for this + /// API. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Description of the API. May include HTML + /// formatting tags. + /// Collection of authentication + /// settings included into this API. + /// Protocols over which + /// API is made available. + /// Type of API. Possible values include: 'http', + /// 'soap' + /// Describes the Revision of the Api. If no + /// value is provided, default revision 1 is created + /// Indicates if API revision is current api + /// revision. + /// Indicates if API revision is accessible via + /// the gateway. + /// API name. + /// Absolute URL of the backend service + /// implementing this API. + /// Describes on which protocols the operations + /// in this API can be invoked. + public ApiContract(string path, string id = default(string), string name = default(string), string type = default(string), string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList)) + : base(id, name, type) + { + Description = description; + AuthenticationSettings = authenticationSettings; + SubscriptionKeyParameterNames = subscriptionKeyParameterNames; + ApiType = apiType; + ApiRevision = apiRevision; + IsCurrent = isCurrent; + IsOnline = isOnline; + DisplayName = displayName; + ServiceUrl = serviceUrl; + Path = path; + Protocols = protocols; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the API. May include HTML formatting + /// tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets collection of authentication settings included into + /// this API. + /// + [JsonProperty(PropertyName = "properties.authenticationSettings")] + public AuthenticationSettingsContract AuthenticationSettings { get; set; } + + /// + /// Gets or sets protocols over which API is made available. + /// + [JsonProperty(PropertyName = "properties.subscriptionKeyParameterNames")] + public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } + + /// + /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// + [JsonProperty(PropertyName = "properties.type")] + public string ApiType { get; set; } + + /// + /// Gets or sets describes the Revision of the Api. If no value is + /// provided, default revision 1 is created + /// + [JsonProperty(PropertyName = "properties.apiRevision")] + public string ApiRevision { get; set; } + + /// + /// Gets or sets indicates if API revision is current api revision. + /// + [JsonProperty(PropertyName = "properties.isCurrent")] + public bool? IsCurrent { get; set; } + + /// + /// Gets or sets indicates if API revision is accessible via the + /// gateway. + /// + [JsonProperty(PropertyName = "properties.isOnline")] + public bool? IsOnline { get; set; } + + /// + /// Gets or sets API name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets absolute URL of the backend service implementing this + /// API. + /// + [JsonProperty(PropertyName = "properties.serviceUrl")] + public string ServiceUrl { get; set; } + + /// + /// Gets or sets relative URL uniquely identifying this API and all of + /// its resource paths within the API Management service instance. It + /// is appended to the API endpoint base URL specified during the + /// service instance creation to form a public URL for this API. + /// + [JsonProperty(PropertyName = "properties.path")] + public string Path { get; set; } + + /// + /// Gets or sets describes on which protocols the operations in this + /// API can be invoked. + /// + [JsonProperty(PropertyName = "properties.protocols")] + public IList Protocols { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + if (ApiRevision != null) + { + if (ApiRevision.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "ApiRevision", 100); + } + if (ApiRevision.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ApiRevision", 1); + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (ServiceUrl != null) + { + if (ServiceUrl.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "ServiceUrl", 2000); + } + if (ServiceUrl.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ServiceUrl", 1); + } + } + if (Path != null) + { + if (Path.Length > 400) + { + throw new ValidationException(ValidationRules.MaxLength, "Path", 400); + } + if (Path.Length < 0) + { + throw new ValidationException(ValidationRules.MinLength, "Path", 0); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContractProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContractProperties.cs new file mode 100644 index 000000000000..db282c6fb228 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiContractProperties.cs @@ -0,0 +1,152 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Api Entity Properties + /// + public partial class ApiContractProperties : ApiEntityBaseContract + { + /// + /// Initializes a new instance of the ApiContractProperties class. + /// + public ApiContractProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiContractProperties class. + /// + /// Relative URL uniquely identifying this API and + /// all of its resource paths within the API Management service + /// instance. It is appended to the API endpoint base URL specified + /// during the service instance creation to form a public URL for this + /// API. + /// Description of the API. May include HTML + /// formatting tags. + /// Collection of authentication + /// settings included into this API. + /// Protocols over which + /// API is made available. + /// Type of API. Possible values include: 'http', + /// 'soap' + /// Describes the Revision of the Api. If no + /// value is provided, default revision 1 is created + /// Indicates if API revision is current api + /// revision. + /// Indicates if API revision is accessible via + /// the gateway. + /// API name. + /// Absolute URL of the backend service + /// implementing this API. + /// Describes on which protocols the operations + /// in this API can be invoked. + public ApiContractProperties(string path, string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList)) + : base(description, authenticationSettings, subscriptionKeyParameterNames, apiType, apiRevision, isCurrent, isOnline) + { + DisplayName = displayName; + ServiceUrl = serviceUrl; + Path = path; + Protocols = protocols; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets absolute URL of the backend service implementing this + /// API. + /// + [JsonProperty(PropertyName = "serviceUrl")] + public string ServiceUrl { get; set; } + + /// + /// Gets or sets relative URL uniquely identifying this API and all of + /// its resource paths within the API Management service instance. It + /// is appended to the API endpoint base URL specified during the + /// service instance creation to form a public URL for this API. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets describes on which protocols the operations in this + /// API can be invoked. + /// + [JsonProperty(PropertyName = "protocols")] + public IList Protocols { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (ServiceUrl != null) + { + if (ServiceUrl.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "ServiceUrl", 2000); + } + if (ServiceUrl.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ServiceUrl", 1); + } + } + if (Path != null) + { + if (Path.Length > 400) + { + throw new ValidationException(ValidationRules.MaxLength, "Path", 400); + } + if (Path.Length < 0) + { + throw new ValidationException(ValidationRules.MinLength, "Path", 0); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..905fb21fbf60 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for CreateOrUpdate operation. + /// + public partial class ApiCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the ApiCreateOrUpdateHeaders class. + /// + public ApiCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiCreateOrUpdateHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ApiCreateOrUpdateHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateParameter.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateParameter.cs new file mode 100644 index 000000000000..ee98f57104b0 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiCreateOrUpdateParameter.cs @@ -0,0 +1,238 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// API Create or Update Parameters. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiCreateOrUpdateParameter + { + /// + /// Initializes a new instance of the ApiCreateOrUpdateParameter class. + /// + public ApiCreateOrUpdateParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiCreateOrUpdateParameter class. + /// + /// Relative URL uniquely identifying this API and + /// all of its resource paths within the API Management service + /// instance. It is appended to the API endpoint base URL specified + /// during the service instance creation to form a public URL for this + /// API. + /// Description of the API. May include HTML + /// formatting tags. + /// Collection of authentication + /// settings included into this API. + /// Protocols over which + /// API is made available. + /// Type of API. Possible values include: 'http', + /// 'soap' + /// Describes the Revision of the Api. If no + /// value is provided, default revision 1 is created + /// Indicates if API revision is current api + /// revision. + /// Indicates if API revision is accessible via + /// the gateway. + /// API name. + /// Absolute URL of the backend service + /// implementing this API. + /// Describes on which protocols the operations + /// in this API can be invoked. + /// Content value when Importing an + /// API. + /// Format of the Content in which the API + /// is getting imported. Possible values include: 'wadl-xml', + /// 'wadl-link-json', 'swagger-json', 'swagger-link-json', 'wsdl', + /// 'wsdl-link' + public ApiCreateOrUpdateParameter(string path, string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string displayName = default(string), string serviceUrl = default(string), IList protocols = default(IList), string contentValue = default(string), ContentFormat? contentFormat = default(ContentFormat?)) + { + Description = description; + AuthenticationSettings = authenticationSettings; + SubscriptionKeyParameterNames = subscriptionKeyParameterNames; + ApiType = apiType; + ApiRevision = apiRevision; + IsCurrent = isCurrent; + IsOnline = isOnline; + DisplayName = displayName; + ServiceUrl = serviceUrl; + Path = path; + Protocols = protocols; + ContentValue = contentValue; + ContentFormat = contentFormat; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the API. May include HTML formatting + /// tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets collection of authentication settings included into + /// this API. + /// + [JsonProperty(PropertyName = "properties.authenticationSettings")] + public AuthenticationSettingsContract AuthenticationSettings { get; set; } + + /// + /// Gets or sets protocols over which API is made available. + /// + [JsonProperty(PropertyName = "properties.subscriptionKeyParameterNames")] + public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } + + /// + /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// + [JsonProperty(PropertyName = "properties.type")] + public string ApiType { get; set; } + + /// + /// Gets or sets describes the Revision of the Api. If no value is + /// provided, default revision 1 is created + /// + [JsonProperty(PropertyName = "properties.apiRevision")] + public string ApiRevision { get; set; } + + /// + /// Gets or sets indicates if API revision is current api revision. + /// + [JsonProperty(PropertyName = "properties.isCurrent")] + public bool? IsCurrent { get; set; } + + /// + /// Gets or sets indicates if API revision is accessible via the + /// gateway. + /// + [JsonProperty(PropertyName = "properties.isOnline")] + public bool? IsOnline { get; set; } + + /// + /// Gets or sets API name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets absolute URL of the backend service implementing this + /// API. + /// + [JsonProperty(PropertyName = "properties.serviceUrl")] + public string ServiceUrl { get; set; } + + /// + /// Gets or sets relative URL uniquely identifying this API and all of + /// its resource paths within the API Management service instance. It + /// is appended to the API endpoint base URL specified during the + /// service instance creation to form a public URL for this API. + /// + [JsonProperty(PropertyName = "properties.path")] + public string Path { get; set; } + + /// + /// Gets or sets describes on which protocols the operations in this + /// API can be invoked. + /// + [JsonProperty(PropertyName = "properties.protocols")] + public IList Protocols { get; set; } + + /// + /// Gets or sets content value when Importing an API. + /// + [JsonProperty(PropertyName = "properties.contentValue")] + public string ContentValue { get; set; } + + /// + /// Gets or sets format of the Content in which the API is getting + /// imported. Possible values include: 'wadl-xml', 'wadl-link-json', + /// 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link' + /// + [JsonProperty(PropertyName = "properties.contentFormat")] + public ContentFormat? ContentFormat { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + if (ApiRevision != null) + { + if (ApiRevision.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "ApiRevision", 100); + } + if (ApiRevision.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ApiRevision", 1); + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (ServiceUrl != null) + { + if (ServiceUrl.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "ServiceUrl", 2000); + } + if (ServiceUrl.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ServiceUrl", 1); + } + } + if (Path != null) + { + if (Path.Length > 400) + { + throw new ValidationException(ValidationRules.MaxLength, "Path", 400); + } + if (Path.Length < 0) + { + throw new ValidationException(ValidationRules.MinLength, "Path", 0); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiEntityBaseContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiEntityBaseContract.cs new file mode 100644 index 000000000000..935e5e4543a6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiEntityBaseContract.cs @@ -0,0 +1,132 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// API base contract details. + /// + public partial class ApiEntityBaseContract + { + /// + /// Initializes a new instance of the ApiEntityBaseContract class. + /// + public ApiEntityBaseContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiEntityBaseContract class. + /// + /// Description of the API. May include HTML + /// formatting tags. + /// Collection of authentication + /// settings included into this API. + /// Protocols over which + /// API is made available. + /// Type of API. Possible values include: 'http', + /// 'soap' + /// Describes the Revision of the Api. If no + /// value is provided, default revision 1 is created + /// Indicates if API revision is current api + /// revision. + /// Indicates if API revision is accessible via + /// the gateway. + public ApiEntityBaseContract(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?)) + { + Description = description; + AuthenticationSettings = authenticationSettings; + SubscriptionKeyParameterNames = subscriptionKeyParameterNames; + ApiType = apiType; + ApiRevision = apiRevision; + IsCurrent = isCurrent; + IsOnline = isOnline; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the API. May include HTML formatting + /// tags. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets collection of authentication settings included into + /// this API. + /// + [JsonProperty(PropertyName = "authenticationSettings")] + public AuthenticationSettingsContract AuthenticationSettings { get; set; } + + /// + /// Gets or sets protocols over which API is made available. + /// + [JsonProperty(PropertyName = "subscriptionKeyParameterNames")] + public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } + + /// + /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// + [JsonProperty(PropertyName = "type")] + public string ApiType { get; set; } + + /// + /// Gets or sets describes the Revision of the Api. If no value is + /// provided, default revision 1 is created + /// + [JsonProperty(PropertyName = "apiRevision")] + public string ApiRevision { get; set; } + + /// + /// Gets or sets indicates if API revision is current api revision. + /// + [JsonProperty(PropertyName = "isCurrent")] + public bool? IsCurrent { get; set; } + + /// + /// Gets or sets indicates if API revision is accessible via the + /// gateway. + /// + [JsonProperty(PropertyName = "isOnline")] + public bool? IsOnline { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ApiRevision != null) + { + if (ApiRevision.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "ApiRevision", 100); + } + if (ApiRevision.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ApiRevision", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiGetHeaders.cs new file mode 100644 index 000000000000..10c51356235e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class ApiGetHeaders + { + /// + /// Initializes a new instance of the ApiGetHeaders class. + /// + public ApiGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ApiGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceApplyNetworkConfigurationParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceApplyNetworkConfigurationParameters.cs new file mode 100644 index 000000000000..d1df1bb2c927 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceApplyNetworkConfigurationParameters.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameter supplied to the Apply Network configuration operation. + /// + public partial class ApiManagementServiceApplyNetworkConfigurationParameters + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceApplyNetworkConfigurationParameters class. + /// + public ApiManagementServiceApplyNetworkConfigurationParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceApplyNetworkConfigurationParameters class. + /// + /// Location of the Api Management service to + /// update for a multi-region service. For a service deployed in a + /// single region, this parameter is not required. + public ApiManagementServiceApplyNetworkConfigurationParameters(string location = default(string)) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets location of the Api Management service to update for a + /// multi-region service. For a service deployed in a single region, + /// this parameter is not required. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs new file mode 100644 index 000000000000..8f8d547b9dcd --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBackupRestoreParameters.cs @@ -0,0 +1,112 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Backup/Restore of an API Management service + /// operation. + /// + public partial class ApiManagementServiceBackupRestoreParameters + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceBackupRestoreParameters class. + /// + public ApiManagementServiceBackupRestoreParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceBackupRestoreParameters class. + /// + /// Azure Cloud Storage account (used to + /// place/retrieve the backup) name. + /// Azure Cloud Storage account (used to + /// place/retrieve the backup) access key. + /// Azure Cloud Storage blob container name + /// used to place/retrieve the backup. + /// The name of the backup file to + /// create. + public ApiManagementServiceBackupRestoreParameters(string storageAccount, string accessKey, string containerName, string backupName) + { + StorageAccount = storageAccount; + AccessKey = accessKey; + ContainerName = containerName; + BackupName = backupName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure Cloud Storage account (used to place/retrieve + /// the backup) name. + /// + [JsonProperty(PropertyName = "storageAccount")] + public string StorageAccount { get; set; } + + /// + /// Gets or sets azure Cloud Storage account (used to place/retrieve + /// the backup) access key. + /// + [JsonProperty(PropertyName = "accessKey")] + public string AccessKey { get; set; } + + /// + /// Gets or sets azure Cloud Storage blob container name used to + /// place/retrieve the backup. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets the name of the backup file to create. + /// + [JsonProperty(PropertyName = "backupName")] + public string BackupName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StorageAccount == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccount"); + } + if (AccessKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccessKey"); + } + if (ContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContainerName"); + } + if (BackupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BackupName"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBaseProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBaseProperties.cs new file mode 100644 index 000000000000..872013b27f83 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceBaseProperties.cs @@ -0,0 +1,244 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Base Properties of an API Management service resource description. + /// + public partial class ApiManagementServiceBaseProperties + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceBaseProperties class. + /// + public ApiManagementServiceBaseProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceBaseProperties class. + /// + /// Email address from which the + /// notification will be sent. + /// The current provisioning state of + /// the API Management service which can be one of the following: + /// Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the + /// API Management service, which is targeted by the long running + /// operation started on the service. + /// Creation UTC date of the API Management + /// service.The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// Gateway URL of the API Management + /// service. + /// Publisher portal endpoint Url of the API + /// Management service. + /// Management API endpoint URL of the + /// API Management service. + /// SCM endpoint URL of the API Management + /// service. + /// Custom hostname configuration + /// of the API Management service. + /// Static IP addresses of the API Management + /// service virtual machines. Available only for Standard and Premium + /// SKU. + /// Virtual network + /// configuration of the API Management service. + /// Additional datacenter locations + /// of the API Management service. + /// Custom properties of the API + /// Management service, like disabling TLS 1.0. + /// The type of VPN in which API + /// Managemet service needs to be configured in. None (Default Value) + /// means the API Management service is not part of any Virtual + /// Network, External means the API Management deployment is set up + /// inside a Virtual Network having an Internet Facing Endpoint, and + /// Internal means that API Management deployment is setup inside a + /// Virtual Network having an Intranet Facing Endpoint only. Possible + /// values include: 'None', 'External', 'Internal' + public ApiManagementServiceBaseProperties(string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), IList hostnameConfigurations = default(IList), IList staticIps = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), VirtualNetworkType? virtualNetworkType = default(VirtualNetworkType?)) + { + NotificationSenderEmail = notificationSenderEmail; + ProvisioningState = provisioningState; + TargetProvisioningState = targetProvisioningState; + CreatedAtUtc = createdAtUtc; + GatewayUrl = gatewayUrl; + PortalUrl = portalUrl; + ManagementApiUrl = managementApiUrl; + ScmUrl = scmUrl; + HostnameConfigurations = hostnameConfigurations; + StaticIps = staticIps; + VirtualNetworkConfiguration = virtualNetworkConfiguration; + AdditionalLocations = additionalLocations; + CustomProperties = customProperties; + VirtualNetworkType = virtualNetworkType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets email address from which the notification will be + /// sent. + /// + [JsonProperty(PropertyName = "notificationSenderEmail")] + public string NotificationSenderEmail { get; set; } + + /// + /// Gets the current provisioning state of the API Management service + /// which can be one of the following: + /// Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets the provisioning state of the API Management service, which is + /// targeted by the long running operation started on the service. + /// + [JsonProperty(PropertyName = "targetProvisioningState")] + public string TargetProvisioningState { get; private set; } + + /// + /// Gets creation UTC date of the API Management service.The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + [JsonProperty(PropertyName = "createdAtUtc")] + public System.DateTime? CreatedAtUtc { get; private set; } + + /// + /// Gets gateway URL of the API Management service. + /// + [JsonProperty(PropertyName = "gatewayUrl")] + public string GatewayUrl { get; private set; } + + /// + /// Gets publisher portal endpoint Url of the API Management service. + /// + [JsonProperty(PropertyName = "portalUrl")] + public string PortalUrl { get; private set; } + + /// + /// Gets management API endpoint URL of the API Management service. + /// + [JsonProperty(PropertyName = "managementApiUrl")] + public string ManagementApiUrl { get; private set; } + + /// + /// Gets SCM endpoint URL of the API Management service. + /// + [JsonProperty(PropertyName = "scmUrl")] + public string ScmUrl { get; private set; } + + /// + /// Gets or sets custom hostname configuration of the API Management + /// service. + /// + [JsonProperty(PropertyName = "hostnameConfigurations")] + public IList HostnameConfigurations { get; set; } + + /// + /// Gets static IP addresses of the API Management service virtual + /// machines. Available only for Standard and Premium SKU. + /// + [JsonProperty(PropertyName = "staticIps")] + public IList StaticIps { get; private set; } + + /// + /// Gets or sets virtual network configuration of the API Management + /// service. + /// + [JsonProperty(PropertyName = "virtualNetworkConfiguration")] + public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } + + /// + /// Gets or sets additional datacenter locations of the API Management + /// service. + /// + [JsonProperty(PropertyName = "additionalLocations")] + public IList AdditionalLocations { get; set; } + + /// + /// Gets or sets custom properties of the API Management service, like + /// disabling TLS 1.0. + /// + [JsonProperty(PropertyName = "customProperties")] + public IDictionary CustomProperties { get; set; } + + /// + /// Gets or sets the type of VPN in which API Managemet service needs + /// to be configured in. None (Default Value) means the API Management + /// service is not part of any Virtual Network, External means the API + /// Management deployment is set up inside a Virtual Network having an + /// Internet Facing Endpoint, and Internal means that API Management + /// deployment is setup inside a Virtual Network having an Intranet + /// Facing Endpoint only. Possible values include: 'None', 'External', + /// 'Internal' + /// + [JsonProperty(PropertyName = "virtualNetworkType")] + public VirtualNetworkType? VirtualNetworkType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NotificationSenderEmail != null) + { + if (NotificationSenderEmail.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "NotificationSenderEmail", 100); + } + } + if (HostnameConfigurations != null) + { + foreach (var element in HostnameConfigurations) + { + if (element != null) + { + element.Validate(); + } + } + } + if (VirtualNetworkConfiguration != null) + { + VirtualNetworkConfiguration.Validate(); + } + if (AdditionalLocations != null) + { + foreach (var element1 in AdditionalLocations) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceCheckNameAvailabilityParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceCheckNameAvailabilityParameters.cs new file mode 100644 index 000000000000..2e5ad62bb37f --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceCheckNameAvailabilityParameters.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the CheckNameAvailability operation. + /// + public partial class ApiManagementServiceCheckNameAvailabilityParameters + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceCheckNameAvailabilityParameters class. + /// + public ApiManagementServiceCheckNameAvailabilityParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceCheckNameAvailabilityParameters class. + /// + /// The name to check for availability. + public ApiManagementServiceCheckNameAvailabilityParameters(string name) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name to check for availability. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs new file mode 100644 index 000000000000..ee91c4d2e5ee --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The response of the GetSsoToken operation. + /// + public partial class ApiManagementServiceGetSsoTokenResult + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceGetSsoTokenResult class. + /// + public ApiManagementServiceGetSsoTokenResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceGetSsoTokenResult class. + /// + /// Redirect URL to the Publisher Portal + /// containing the SSO token. + public ApiManagementServiceGetSsoTokenResult(string redirectUri = default(string)) + { + RedirectUri = redirectUri; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets redirect URL to the Publisher Portal containing the + /// SSO token. + /// + [JsonProperty(PropertyName = "redirectUri")] + public string RedirectUri { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs new file mode 100644 index 000000000000..5902dda9c161 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs @@ -0,0 +1,89 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response of the CheckNameAvailability operation. + /// + public partial class ApiManagementServiceNameAvailabilityResult + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceNameAvailabilityResult class. + /// + public ApiManagementServiceNameAvailabilityResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceNameAvailabilityResult class. + /// + /// True if the name is available and can + /// be used to create a new API Management service; otherwise + /// false. + /// If reason == invalid, provide the user with + /// the reason why the given name is invalid, and provide the resource + /// naming requirements so that the user can select a valid name. If + /// reason == AlreadyExists, explain that <resourceName> is + /// already in use, and direct them to select a different name. + /// Invalid indicates the name provided does not + /// match the resource provider’s naming requirements (incorrect + /// length, unsupported characters, etc.) AlreadyExists indicates that + /// the name is already in use and is therefore unavailable. Possible + /// values include: 'Valid', 'Invalid', 'AlreadyExists' + public ApiManagementServiceNameAvailabilityResult(bool? nameAvailable = default(bool?), string message = default(string), NameAvailabilityReason? reason = default(NameAvailabilityReason?)) + { + NameAvailable = nameAvailable; + Message = message; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets true if the name is available and can be used to create a new + /// API Management service; otherwise false. + /// + [JsonProperty(PropertyName = "nameAvailable")] + public bool? NameAvailable { get; private set; } + + /// + /// Gets if reason == invalid, provide the user with the reason why the + /// given name is invalid, and provide the resource naming requirements + /// so that the user can select a valid name. If reason == + /// AlreadyExists, explain that &lt;resourceName&gt; is already + /// in use, and direct them to select a different name. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets or sets invalid indicates the name provided does not match the + /// resource provider’s naming requirements (incorrect length, + /// unsupported characters, etc.) AlreadyExists indicates that the + /// name is already in use and is therefore unavailable. Possible + /// values include: 'Valid', 'Invalid', 'AlreadyExists' + /// + [JsonProperty(PropertyName = "reason")] + public NameAvailabilityReason? Reason { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceResource.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceResource.cs new file mode 100644 index 000000000000..191af02cf3d9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceResource.cs @@ -0,0 +1,327 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A single API Management service resource in List or Get response. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiManagementServiceResource : ApimResource + { + /// + /// Initializes a new instance of the ApiManagementServiceResource + /// class. + /// + public ApiManagementServiceResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiManagementServiceResource + /// class. + /// + /// Publisher email. + /// Publisher name. + /// SKU properties of the API Management + /// service. + /// Resource location. + /// Resource ID. + /// Resource name. + /// Resource type for API Management resource is set + /// to Microsoft.ApiManagement. + /// Resource tags. + /// Email address from which the + /// notification will be sent. + /// The current provisioning state of + /// the API Management service which can be one of the following: + /// Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the + /// API Management service, which is targeted by the long running + /// operation started on the service. + /// Creation UTC date of the API Management + /// service.The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// Gateway URL of the API Management + /// service. + /// Publisher portal endpoint Url of the API + /// Management service. + /// Management API endpoint URL of the + /// API Management service. + /// SCM endpoint URL of the API Management + /// service. + /// Custom hostname configuration + /// of the API Management service. + /// Static IP addresses of the API Management + /// service virtual machines. Available only for Standard and Premium + /// SKU. + /// Virtual network + /// configuration of the API Management service. + /// Additional datacenter locations + /// of the API Management service. + /// Custom properties of the API + /// Management service, like disabling TLS 1.0. + /// The type of VPN in which API + /// Managemet service needs to be configured in. None (Default Value) + /// means the API Management service is not part of any Virtual + /// Network, External means the API Management deployment is set up + /// inside a Virtual Network having an Internet Facing Endpoint, and + /// Internal means that API Management deployment is setup inside a + /// Virtual Network having an Intranet Facing Endpoint only. Possible + /// values include: 'None', 'External', 'Internal' + /// ETag of the resource. + public ApiManagementServiceResource(string publisherEmail, string publisherName, ApiManagementServiceSkuProperties sku, string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), IList hostnameConfigurations = default(IList), IList staticIps = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), VirtualNetworkType? virtualNetworkType = default(VirtualNetworkType?), string etag = default(string)) + : base(id, name, type, tags) + { + NotificationSenderEmail = notificationSenderEmail; + ProvisioningState = provisioningState; + TargetProvisioningState = targetProvisioningState; + CreatedAtUtc = createdAtUtc; + GatewayUrl = gatewayUrl; + PortalUrl = portalUrl; + ManagementApiUrl = managementApiUrl; + ScmUrl = scmUrl; + HostnameConfigurations = hostnameConfigurations; + StaticIps = staticIps; + VirtualNetworkConfiguration = virtualNetworkConfiguration; + AdditionalLocations = additionalLocations; + CustomProperties = customProperties; + VirtualNetworkType = virtualNetworkType; + PublisherEmail = publisherEmail; + PublisherName = publisherName; + Sku = sku; + Location = location; + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets email address from which the notification will be + /// sent. + /// + [JsonProperty(PropertyName = "properties.notificationSenderEmail")] + public string NotificationSenderEmail { get; set; } + + /// + /// Gets the current provisioning state of the API Management service + /// which can be one of the following: + /// Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets the provisioning state of the API Management service, which is + /// targeted by the long running operation started on the service. + /// + [JsonProperty(PropertyName = "properties.targetProvisioningState")] + public string TargetProvisioningState { get; private set; } + + /// + /// Gets creation UTC date of the API Management service.The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + [JsonProperty(PropertyName = "properties.createdAtUtc")] + public System.DateTime? CreatedAtUtc { get; private set; } + + /// + /// Gets gateway URL of the API Management service. + /// + [JsonProperty(PropertyName = "properties.gatewayUrl")] + public string GatewayUrl { get; private set; } + + /// + /// Gets publisher portal endpoint Url of the API Management service. + /// + [JsonProperty(PropertyName = "properties.portalUrl")] + public string PortalUrl { get; private set; } + + /// + /// Gets management API endpoint URL of the API Management service. + /// + [JsonProperty(PropertyName = "properties.managementApiUrl")] + public string ManagementApiUrl { get; private set; } + + /// + /// Gets SCM endpoint URL of the API Management service. + /// + [JsonProperty(PropertyName = "properties.scmUrl")] + public string ScmUrl { get; private set; } + + /// + /// Gets or sets custom hostname configuration of the API Management + /// service. + /// + [JsonProperty(PropertyName = "properties.hostnameConfigurations")] + public IList HostnameConfigurations { get; set; } + + /// + /// Gets static IP addresses of the API Management service virtual + /// machines. Available only for Standard and Premium SKU. + /// + [JsonProperty(PropertyName = "properties.staticIps")] + public IList StaticIps { get; private set; } + + /// + /// Gets or sets virtual network configuration of the API Management + /// service. + /// + [JsonProperty(PropertyName = "properties.virtualNetworkConfiguration")] + public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } + + /// + /// Gets or sets additional datacenter locations of the API Management + /// service. + /// + [JsonProperty(PropertyName = "properties.additionalLocations")] + public IList AdditionalLocations { get; set; } + + /// + /// Gets or sets custom properties of the API Management service, like + /// disabling TLS 1.0. + /// + [JsonProperty(PropertyName = "properties.customProperties")] + public IDictionary CustomProperties { get; set; } + + /// + /// Gets or sets the type of VPN in which API Managemet service needs + /// to be configured in. None (Default Value) means the API Management + /// service is not part of any Virtual Network, External means the API + /// Management deployment is set up inside a Virtual Network having an + /// Internet Facing Endpoint, and Internal means that API Management + /// deployment is setup inside a Virtual Network having an Intranet + /// Facing Endpoint only. Possible values include: 'None', 'External', + /// 'Internal' + /// + [JsonProperty(PropertyName = "properties.virtualNetworkType")] + public VirtualNetworkType? VirtualNetworkType { get; set; } + + /// + /// Gets or sets publisher email. + /// + [JsonProperty(PropertyName = "properties.publisherEmail")] + public string PublisherEmail { get; set; } + + /// + /// Gets or sets publisher name. + /// + [JsonProperty(PropertyName = "properties.publisherName")] + public string PublisherName { get; set; } + + /// + /// Gets or sets SKU properties of the API Management service. + /// + [JsonProperty(PropertyName = "sku")] + public ApiManagementServiceSkuProperties Sku { get; set; } + + /// + /// Gets or sets resource location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets eTag of the resource. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PublisherEmail == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PublisherEmail"); + } + if (PublisherName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PublisherName"); + } + if (Sku == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Sku"); + } + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (NotificationSenderEmail != null) + { + if (NotificationSenderEmail.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "NotificationSenderEmail", 100); + } + } + if (HostnameConfigurations != null) + { + foreach (var element in HostnameConfigurations) + { + if (element != null) + { + element.Validate(); + } + } + } + if (VirtualNetworkConfiguration != null) + { + VirtualNetworkConfiguration.Validate(); + } + if (AdditionalLocations != null) + { + foreach (var element1 in AdditionalLocations) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (PublisherEmail != null) + { + if (PublisherEmail.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "PublisherEmail", 100); + } + } + if (PublisherName != null) + { + if (PublisherName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "PublisherName", 100); + } + } + if (Sku != null) + { + Sku.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceSkuProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceSkuProperties.cs new file mode 100644 index 000000000000..1ff6cea98e04 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceSkuProperties.cs @@ -0,0 +1,75 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// API Management service resource SKU properties. + /// + public partial class ApiManagementServiceSkuProperties + { + /// + /// Initializes a new instance of the ApiManagementServiceSkuProperties + /// class. + /// + public ApiManagementServiceSkuProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiManagementServiceSkuProperties + /// class. + /// + /// Name of the Sku. Possible values include: + /// 'Developer', 'Standard', 'Premium' + /// Capacity of the SKU (number of deployed + /// units of the SKU). The default value is 1. + public ApiManagementServiceSkuProperties(SkuType name, int? capacity = default(int?)) + { + Name = name; + Capacity = capacity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the Sku. Possible values include: 'Developer', + /// 'Standard', 'Premium' + /// + [JsonProperty(PropertyName = "name")] + public SkuType Name { get; set; } + + /// + /// Gets or sets capacity of the SKU (number of deployed units of the + /// SKU). The default value is 1. + /// + [JsonProperty(PropertyName = "capacity")] + public int? Capacity { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceUpdateParameters.cs new file mode 100644 index 000000000000..bbd9ef2dd767 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiManagementServiceUpdateParameters.cs @@ -0,0 +1,303 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parameter supplied to Update Api Management Service. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiManagementServiceUpdateParameters : ApimResource + { + /// + /// Initializes a new instance of the + /// ApiManagementServiceUpdateParameters class. + /// + public ApiManagementServiceUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApiManagementServiceUpdateParameters class. + /// + /// Resource ID. + /// Resource name. + /// Resource type for API Management resource is set + /// to Microsoft.ApiManagement. + /// Resource tags. + /// Email address from which the + /// notification will be sent. + /// The current provisioning state of + /// the API Management service which can be one of the following: + /// Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the + /// API Management service, which is targeted by the long running + /// operation started on the service. + /// Creation UTC date of the API Management + /// service.The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// Gateway URL of the API Management + /// service. + /// Publisher portal endpoint Url of the API + /// Management service. + /// Management API endpoint URL of the + /// API Management service. + /// SCM endpoint URL of the API Management + /// service. + /// Custom hostname configuration + /// of the API Management service. + /// Static IP addresses of the API Management + /// service virtual machines. Available only for Standard and Premium + /// SKU. + /// Virtual network + /// configuration of the API Management service. + /// Additional datacenter locations + /// of the API Management service. + /// Custom properties of the API + /// Management service, like disabling TLS 1.0. + /// The type of VPN in which API + /// Managemet service needs to be configured in. None (Default Value) + /// means the API Management service is not part of any Virtual + /// Network, External means the API Management deployment is set up + /// inside a Virtual Network having an Internet Facing Endpoint, and + /// Internal means that API Management deployment is setup inside a + /// Virtual Network having an Intranet Facing Endpoint only. Possible + /// values include: 'None', 'External', 'Internal' + /// Publisher email. + /// Publisher name. + /// SKU properties of the API Management + /// service. + /// ETag of the resource. + public ApiManagementServiceUpdateParameters(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string notificationSenderEmail = default(string), string provisioningState = default(string), string targetProvisioningState = default(string), System.DateTime? createdAtUtc = default(System.DateTime?), string gatewayUrl = default(string), string portalUrl = default(string), string managementApiUrl = default(string), string scmUrl = default(string), IList hostnameConfigurations = default(IList), IList staticIps = default(IList), VirtualNetworkConfiguration virtualNetworkConfiguration = default(VirtualNetworkConfiguration), IList additionalLocations = default(IList), IDictionary customProperties = default(IDictionary), VirtualNetworkType? virtualNetworkType = default(VirtualNetworkType?), string publisherEmail = default(string), string publisherName = default(string), ApiManagementServiceSkuProperties sku = default(ApiManagementServiceSkuProperties), string etag = default(string)) + : base(id, name, type, tags) + { + NotificationSenderEmail = notificationSenderEmail; + ProvisioningState = provisioningState; + TargetProvisioningState = targetProvisioningState; + CreatedAtUtc = createdAtUtc; + GatewayUrl = gatewayUrl; + PortalUrl = portalUrl; + ManagementApiUrl = managementApiUrl; + ScmUrl = scmUrl; + HostnameConfigurations = hostnameConfigurations; + StaticIps = staticIps; + VirtualNetworkConfiguration = virtualNetworkConfiguration; + AdditionalLocations = additionalLocations; + CustomProperties = customProperties; + VirtualNetworkType = virtualNetworkType; + PublisherEmail = publisherEmail; + PublisherName = publisherName; + Sku = sku; + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets email address from which the notification will be + /// sent. + /// + [JsonProperty(PropertyName = "properties.notificationSenderEmail")] + public string NotificationSenderEmail { get; set; } + + /// + /// Gets the current provisioning state of the API Management service + /// which can be one of the following: + /// Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets the provisioning state of the API Management service, which is + /// targeted by the long running operation started on the service. + /// + [JsonProperty(PropertyName = "properties.targetProvisioningState")] + public string TargetProvisioningState { get; private set; } + + /// + /// Gets creation UTC date of the API Management service.The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + [JsonProperty(PropertyName = "properties.createdAtUtc")] + public System.DateTime? CreatedAtUtc { get; private set; } + + /// + /// Gets gateway URL of the API Management service. + /// + [JsonProperty(PropertyName = "properties.gatewayUrl")] + public string GatewayUrl { get; private set; } + + /// + /// Gets publisher portal endpoint Url of the API Management service. + /// + [JsonProperty(PropertyName = "properties.portalUrl")] + public string PortalUrl { get; private set; } + + /// + /// Gets management API endpoint URL of the API Management service. + /// + [JsonProperty(PropertyName = "properties.managementApiUrl")] + public string ManagementApiUrl { get; private set; } + + /// + /// Gets SCM endpoint URL of the API Management service. + /// + [JsonProperty(PropertyName = "properties.scmUrl")] + public string ScmUrl { get; private set; } + + /// + /// Gets or sets custom hostname configuration of the API Management + /// service. + /// + [JsonProperty(PropertyName = "properties.hostnameConfigurations")] + public IList HostnameConfigurations { get; set; } + + /// + /// Gets static IP addresses of the API Management service virtual + /// machines. Available only for Standard and Premium SKU. + /// + [JsonProperty(PropertyName = "properties.staticIps")] + public IList StaticIps { get; private set; } + + /// + /// Gets or sets virtual network configuration of the API Management + /// service. + /// + [JsonProperty(PropertyName = "properties.virtualNetworkConfiguration")] + public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } + + /// + /// Gets or sets additional datacenter locations of the API Management + /// service. + /// + [JsonProperty(PropertyName = "properties.additionalLocations")] + public IList AdditionalLocations { get; set; } + + /// + /// Gets or sets custom properties of the API Management service, like + /// disabling TLS 1.0. + /// + [JsonProperty(PropertyName = "properties.customProperties")] + public IDictionary CustomProperties { get; set; } + + /// + /// Gets or sets the type of VPN in which API Managemet service needs + /// to be configured in. None (Default Value) means the API Management + /// service is not part of any Virtual Network, External means the API + /// Management deployment is set up inside a Virtual Network having an + /// Internet Facing Endpoint, and Internal means that API Management + /// deployment is setup inside a Virtual Network having an Intranet + /// Facing Endpoint only. Possible values include: 'None', 'External', + /// 'Internal' + /// + [JsonProperty(PropertyName = "properties.virtualNetworkType")] + public VirtualNetworkType? VirtualNetworkType { get; set; } + + /// + /// Gets or sets publisher email. + /// + [JsonProperty(PropertyName = "properties.publisherEmail")] + public string PublisherEmail { get; set; } + + /// + /// Gets or sets publisher name. + /// + [JsonProperty(PropertyName = "properties.publisherName")] + public string PublisherName { get; set; } + + /// + /// Gets or sets SKU properties of the API Management service. + /// + [JsonProperty(PropertyName = "sku")] + public ApiManagementServiceSkuProperties Sku { get; set; } + + /// + /// Gets eTag of the resource. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NotificationSenderEmail != null) + { + if (NotificationSenderEmail.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "NotificationSenderEmail", 100); + } + } + if (HostnameConfigurations != null) + { + foreach (var element in HostnameConfigurations) + { + if (element != null) + { + element.Validate(); + } + } + } + if (VirtualNetworkConfiguration != null) + { + VirtualNetworkConfiguration.Validate(); + } + if (AdditionalLocations != null) + { + foreach (var element1 in AdditionalLocations) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (PublisherEmail != null) + { + if (PublisherEmail.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "PublisherEmail", 100); + } + } + if (PublisherName != null) + { + if (PublisherName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "PublisherName", 100); + } + } + if (Sku != null) + { + Sku.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationGetHeaders.cs new file mode 100644 index 000000000000..04276c7f70f1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class ApiOperationGetHeaders + { + /// + /// Initializes a new instance of the ApiOperationGetHeaders class. + /// + public ApiOperationGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiOperationGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ApiOperationGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationPolicyGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationPolicyGetHeaders.cs new file mode 100644 index 000000000000..21ea06f73fd5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiOperationPolicyGetHeaders.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class ApiOperationPolicyGetHeaders + { + /// + /// Initializes a new instance of the ApiOperationPolicyGetHeaders + /// class. + /// + public ApiOperationPolicyGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiOperationPolicyGetHeaders + /// class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ApiOperationPolicyGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyGetHeaders.cs new file mode 100644 index 000000000000..af9ae4a126c8 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class ApiPolicyGetHeaders + { + /// + /// Initializes a new instance of the ApiPolicyGetHeaders class. + /// + public ApiPolicyGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiPolicyGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ApiPolicyGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyListByApiHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyListByApiHeaders.cs new file mode 100644 index 000000000000..7b0f84431393 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiPolicyListByApiHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for ListByApi operation. + /// + public partial class ApiPolicyListByApiHeaders + { + /// + /// Initializes a new instance of the ApiPolicyListByApiHeaders class. + /// + public ApiPolicyListByApiHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiPolicyListByApiHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ApiPolicyListByApiHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiType.cs new file mode 100644 index 000000000000..359e576937be --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiType.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + + /// + /// Defines values for ApiType. + /// + public static class ApiType + { + public const string Http = "http"; + public const string Soap = "soap"; + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiUpdateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiUpdateContract.cs new file mode 100644 index 000000000000..856f6a4bfb77 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApiUpdateContract.cs @@ -0,0 +1,212 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// API update contract details. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApiUpdateContract + { + /// + /// Initializes a new instance of the ApiUpdateContract class. + /// + public ApiUpdateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApiUpdateContract class. + /// + /// Description of the API. May include HTML + /// formatting tags. + /// Collection of authentication + /// settings included into this API. + /// Protocols over which + /// API is made available. + /// Type of API. Possible values include: 'http', + /// 'soap' + /// Describes the Revision of the Api. If no + /// value is provided, default revision 1 is created + /// Indicates if API revision is current api + /// revision. + /// Indicates if API revision is accessible via + /// the gateway. + /// API name. + /// Absolute URL of the backend service + /// implementing this API. + /// Relative URL uniquely identifying this API and + /// all of its resource paths within the API Management service + /// instance. It is appended to the API endpoint base URL specified + /// during the service instance creation to form a public URL for this + /// API. + /// Describes on which protocols the operations + /// in this API can be invoked. + public ApiUpdateContract(string description = default(string), AuthenticationSettingsContract authenticationSettings = default(AuthenticationSettingsContract), SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = default(SubscriptionKeyParameterNamesContract), string apiType = default(string), string apiRevision = default(string), bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string displayName = default(string), string serviceUrl = default(string), string path = default(string), IList protocols = default(IList)) + { + Description = description; + AuthenticationSettings = authenticationSettings; + SubscriptionKeyParameterNames = subscriptionKeyParameterNames; + ApiType = apiType; + ApiRevision = apiRevision; + IsCurrent = isCurrent; + IsOnline = isOnline; + DisplayName = displayName; + ServiceUrl = serviceUrl; + Path = path; + Protocols = protocols; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the API. May include HTML formatting + /// tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets collection of authentication settings included into + /// this API. + /// + [JsonProperty(PropertyName = "properties.authenticationSettings")] + public AuthenticationSettingsContract AuthenticationSettings { get; set; } + + /// + /// Gets or sets protocols over which API is made available. + /// + [JsonProperty(PropertyName = "properties.subscriptionKeyParameterNames")] + public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } + + /// + /// Gets or sets type of API. Possible values include: 'http', 'soap' + /// + [JsonProperty(PropertyName = "properties.type")] + public string ApiType { get; set; } + + /// + /// Gets or sets describes the Revision of the Api. If no value is + /// provided, default revision 1 is created + /// + [JsonProperty(PropertyName = "properties.apiRevision")] + public string ApiRevision { get; set; } + + /// + /// Gets or sets indicates if API revision is current api revision. + /// + [JsonProperty(PropertyName = "properties.isCurrent")] + public bool? IsCurrent { get; set; } + + /// + /// Gets or sets indicates if API revision is accessible via the + /// gateway. + /// + [JsonProperty(PropertyName = "properties.isOnline")] + public bool? IsOnline { get; set; } + + /// + /// Gets or sets API name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets absolute URL of the backend service implementing this + /// API. + /// + [JsonProperty(PropertyName = "properties.serviceUrl")] + public string ServiceUrl { get; set; } + + /// + /// Gets or sets relative URL uniquely identifying this API and all of + /// its resource paths within the API Management service instance. It + /// is appended to the API endpoint base URL specified during the + /// service instance creation to form a public URL for this API. + /// + [JsonProperty(PropertyName = "properties.path")] + public string Path { get; set; } + + /// + /// Gets or sets describes on which protocols the operations in this + /// API can be invoked. + /// + [JsonProperty(PropertyName = "properties.protocols")] + public IList Protocols { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ApiRevision != null) + { + if (ApiRevision.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "ApiRevision", 100); + } + if (ApiRevision.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ApiRevision", 1); + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (ServiceUrl != null) + { + if (ServiceUrl.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "ServiceUrl", 2000); + } + if (ServiceUrl.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ServiceUrl", 1); + } + } + if (Path != null) + { + if (Path.Length > 400) + { + throw new ValidationException(ValidationRules.MaxLength, "Path", 400); + } + if (Path.Length < 0) + { + throw new ValidationException(ValidationRules.MinLength, "Path", 0); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApimResource.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApimResource.cs new file mode 100644 index 000000000000..910158c6a3f7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ApimResource.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Resource definition. + /// + public partial class ApimResource : IResource + { + /// + /// Initializes a new instance of the ApimResource class. + /// + public ApimResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApimResource class. + /// + /// Resource ID. + /// Resource name. + /// Resource type for API Management resource is set + /// to Microsoft.ApiManagement. + /// Resource tags. + public ApimResource(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + { + Id = id; + Name = name; + Type = type; + Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type for API Management resource is set to + /// Microsoft.ApiManagement. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AsyncOperationStatus.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AsyncOperationStatus.cs new file mode 100644 index 000000000000..4d07f3fe3f87 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AsyncOperationStatus.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for AsyncOperationStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AsyncOperationStatus + { + [EnumMember(Value = "Started")] + Started, + [EnumMember(Value = "InProgress")] + InProgress, + [EnumMember(Value = "Succeeded")] + Succeeded, + [EnumMember(Value = "Failed")] + Failed + } + internal static class AsyncOperationStatusEnumExtension + { + internal static string ToSerializedValue(this AsyncOperationStatus? value) => + value == null ? null : ((AsyncOperationStatus)value).ToSerializedValue(); + + internal static string ToSerializedValue(this AsyncOperationStatus value) + { + switch( value ) + { + case AsyncOperationStatus.Started: + return "Started"; + case AsyncOperationStatus.InProgress: + return "InProgress"; + case AsyncOperationStatus.Succeeded: + return "Succeeded"; + case AsyncOperationStatus.Failed: + return "Failed"; + } + return null; + } + + internal static AsyncOperationStatus? ParseAsyncOperationStatus(this string value) + { + switch( value ) + { + case "Started": + return AsyncOperationStatus.Started; + case "InProgress": + return AsyncOperationStatus.InProgress; + case "Succeeded": + return AsyncOperationStatus.Succeeded; + case "Failed": + return AsyncOperationStatus.Failed; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthenticationSettingsContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthenticationSettingsContract.cs new file mode 100644 index 000000000000..ba83c7a24217 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthenticationSettingsContract.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// API Authentication Settings. + /// + public partial class AuthenticationSettingsContract + { + /// + /// Initializes a new instance of the AuthenticationSettingsContract + /// class. + /// + public AuthenticationSettingsContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AuthenticationSettingsContract + /// class. + /// + /// OAuth2 Authentication settings + public AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2 = default(OAuth2AuthenticationSettingsContract)) + { + OAuth2 = oAuth2; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oAuth2 Authentication settings + /// + [JsonProperty(PropertyName = "oAuth2")] + public OAuth2AuthenticationSettingsContract OAuth2 { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationMethod.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationMethod.cs new file mode 100644 index 000000000000..63449e1714c1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationMethod.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for AuthorizationMethod. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AuthorizationMethod + { + [EnumMember(Value = "HEAD")] + HEAD, + [EnumMember(Value = "OPTIONS")] + OPTIONS, + [EnumMember(Value = "TRACE")] + TRACE, + [EnumMember(Value = "GET")] + GET, + [EnumMember(Value = "POST")] + POST, + [EnumMember(Value = "PUT")] + PUT, + [EnumMember(Value = "PATCH")] + PATCH, + [EnumMember(Value = "DELETE")] + DELETE + } + internal static class AuthorizationMethodEnumExtension + { + internal static string ToSerializedValue(this AuthorizationMethod? value) => + value == null ? null : ((AuthorizationMethod)value).ToSerializedValue(); + + internal static string ToSerializedValue(this AuthorizationMethod value) + { + switch( value ) + { + case AuthorizationMethod.HEAD: + return "HEAD"; + case AuthorizationMethod.OPTIONS: + return "OPTIONS"; + case AuthorizationMethod.TRACE: + return "TRACE"; + case AuthorizationMethod.GET: + return "GET"; + case AuthorizationMethod.POST: + return "POST"; + case AuthorizationMethod.PUT: + return "PUT"; + case AuthorizationMethod.PATCH: + return "PATCH"; + case AuthorizationMethod.DELETE: + return "DELETE"; + } + return null; + } + + internal static AuthorizationMethod? ParseAuthorizationMethod(this string value) + { + switch( value ) + { + case "HEAD": + return AuthorizationMethod.HEAD; + case "OPTIONS": + return AuthorizationMethod.OPTIONS; + case "TRACE": + return AuthorizationMethod.TRACE; + case "GET": + return AuthorizationMethod.GET; + case "POST": + return AuthorizationMethod.POST; + case "PUT": + return AuthorizationMethod.PUT; + case "PATCH": + return AuthorizationMethod.PATCH; + case "DELETE": + return AuthorizationMethod.DELETE; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContract.cs new file mode 100644 index 000000000000..3fe250cf0505 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContract.cs @@ -0,0 +1,290 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// External OAuth authorization server settings. + /// + [Rest.Serialization.JsonTransformation] + public partial class AuthorizationServerContract : Resource + { + /// + /// Initializes a new instance of the AuthorizationServerContract + /// class. + /// + public AuthorizationServerContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AuthorizationServerContract + /// class. + /// + /// User-friendly authorization server + /// name. + /// Optional reference to a + /// page where client or app registration for this authorization server + /// is performed. Contains absolute URL to entity being + /// referenced. + /// OAuth authorization endpoint. + /// See http://tools.ietf.org/html/rfc6749#section-3.2. + /// Form of an authorization grant, which the + /// client uses to request the access token. + /// Client or app id registered with this + /// authorization server. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Description of the authorization server. + /// Can contain HTML formatting tags. + /// HTTP verbs supported by the + /// authorization endpoint. GET must be always present. POST is + /// optional. + /// Method of authentication + /// supported by the token endpoint of this authorization server. + /// Possible values are Basic and/or Body. When Body is specified, + /// client credentials and other parameters are passed within the + /// request body in the application/x-www-form-urlencoded + /// format. + /// Additional parameters required by + /// the token endpoint of this authorization server represented as an + /// array of JSON objects with name and value string properties, i.e. + /// {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute + /// URI to entity being referenced. + /// If true, authorization server will + /// include state parameter from the authorization request to its + /// response. Client may use state parameter to raise protocol + /// security. + /// Access token scope that is going to be + /// requested by default. Can be overridden at the API level. Should be + /// provided in the form of a string containing space-delimited + /// values. + /// Specifies the mechanism by + /// which access token is passed to the API. + /// Client or app secret registered with + /// this authorization server. + /// Can be optionally specified + /// when resource owner password grant type is supported by this + /// authorization server. Default resource owner username. + /// Can be optionally specified + /// when resource owner password grant type is supported by this + /// authorization server. Default resource owner password. + public AuthorizationServerContract(string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string id = default(string), string name = default(string), string type = default(string), string description = default(string), IList authorizationMethods = default(IList), IList clientAuthenticationMethod = default(IList), IList tokenBodyParameters = default(IList), string tokenEndpoint = default(string), bool? supportState = default(bool?), string defaultScope = default(string), IList bearerTokenSendingMethods = default(IList), string clientSecret = default(string), string resourceOwnerUsername = default(string), string resourceOwnerPassword = default(string)) + : base(id, name, type) + { + Description = description; + AuthorizationMethods = authorizationMethods; + ClientAuthenticationMethod = clientAuthenticationMethod; + TokenBodyParameters = tokenBodyParameters; + TokenEndpoint = tokenEndpoint; + SupportState = supportState; + DefaultScope = defaultScope; + BearerTokenSendingMethods = bearerTokenSendingMethods; + ClientSecret = clientSecret; + ResourceOwnerUsername = resourceOwnerUsername; + ResourceOwnerPassword = resourceOwnerPassword; + DisplayName = displayName; + ClientRegistrationEndpoint = clientRegistrationEndpoint; + AuthorizationEndpoint = authorizationEndpoint; + GrantTypes = grantTypes; + ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the authorization server. Can contain + /// HTML formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets HTTP verbs supported by the authorization endpoint. + /// GET must be always present. POST is optional. + /// + [JsonProperty(PropertyName = "properties.authorizationMethods")] + public IList AuthorizationMethods { get; set; } + + /// + /// Gets or sets method of authentication supported by the token + /// endpoint of this authorization server. Possible values are Basic + /// and/or Body. When Body is specified, client credentials and other + /// parameters are passed within the request body in the + /// application/x-www-form-urlencoded format. + /// + [JsonProperty(PropertyName = "properties.clientAuthenticationMethod")] + public IList ClientAuthenticationMethod { get; set; } + + /// + /// Gets or sets additional parameters required by the token endpoint + /// of this authorization server represented as an array of JSON + /// objects with name and value string properties, i.e. {"name" : "name + /// value", "value": "a value"}. + /// + [JsonProperty(PropertyName = "properties.tokenBodyParameters")] + public IList TokenBodyParameters { get; set; } + + /// + /// Gets or sets oAuth token endpoint. Contains absolute URI to entity + /// being referenced. + /// + [JsonProperty(PropertyName = "properties.tokenEndpoint")] + public string TokenEndpoint { get; set; } + + /// + /// Gets or sets if true, authorization server will include state + /// parameter from the authorization request to its response. Client + /// may use state parameter to raise protocol security. + /// + [JsonProperty(PropertyName = "properties.supportState")] + public bool? SupportState { get; set; } + + /// + /// Gets or sets access token scope that is going to be requested by + /// default. Can be overridden at the API level. Should be provided in + /// the form of a string containing space-delimited values. + /// + [JsonProperty(PropertyName = "properties.defaultScope")] + public string DefaultScope { get; set; } + + /// + /// Gets or sets specifies the mechanism by which access token is + /// passed to the API. + /// + [JsonProperty(PropertyName = "properties.bearerTokenSendingMethods")] + public IList BearerTokenSendingMethods { get; set; } + + /// + /// Gets or sets client or app secret registered with this + /// authorization server. + /// + [JsonProperty(PropertyName = "properties.clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Gets or sets can be optionally specified when resource owner + /// password grant type is supported by this authorization server. + /// Default resource owner username. + /// + [JsonProperty(PropertyName = "properties.resourceOwnerUsername")] + public string ResourceOwnerUsername { get; set; } + + /// + /// Gets or sets can be optionally specified when resource owner + /// password grant type is supported by this authorization server. + /// Default resource owner password. + /// + [JsonProperty(PropertyName = "properties.resourceOwnerPassword")] + public string ResourceOwnerPassword { get; set; } + + /// + /// Gets or sets user-friendly authorization server name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets optional reference to a page where client or app + /// registration for this authorization server is performed. Contains + /// absolute URL to entity being referenced. + /// + [JsonProperty(PropertyName = "properties.clientRegistrationEndpoint")] + public string ClientRegistrationEndpoint { get; set; } + + /// + /// Gets or sets oAuth authorization endpoint. See + /// http://tools.ietf.org/html/rfc6749#section-3.2. + /// + [JsonProperty(PropertyName = "properties.authorizationEndpoint")] + public string AuthorizationEndpoint { get; set; } + + /// + /// Gets or sets form of an authorization grant, which the client uses + /// to request the access token. + /// + [JsonProperty(PropertyName = "properties.grantTypes")] + public IList GrantTypes { get; set; } + + /// + /// Gets or sets client or app id registered with this authorization + /// server. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (ClientRegistrationEndpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientRegistrationEndpoint"); + } + if (AuthorizationEndpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthorizationEndpoint"); + } + if (GrantTypes == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GrantTypes"); + } + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + if (TokenBodyParameters != null) + { + foreach (var element in TokenBodyParameters) + { + if (element != null) + { + element.Validate(); + } + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 50); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContractBaseProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContractBaseProperties.cs new file mode 100644 index 000000000000..d38709f0ca68 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerContractBaseProperties.cs @@ -0,0 +1,180 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// External OAuth authorization server Update settings contract. + /// + public partial class AuthorizationServerContractBaseProperties + { + /// + /// Initializes a new instance of the + /// AuthorizationServerContractBaseProperties class. + /// + public AuthorizationServerContractBaseProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AuthorizationServerContractBaseProperties class. + /// + /// Description of the authorization server. + /// Can contain HTML formatting tags. + /// HTTP verbs supported by the + /// authorization endpoint. GET must be always present. POST is + /// optional. + /// Method of authentication + /// supported by the token endpoint of this authorization server. + /// Possible values are Basic and/or Body. When Body is specified, + /// client credentials and other parameters are passed within the + /// request body in the application/x-www-form-urlencoded + /// format. + /// Additional parameters required by + /// the token endpoint of this authorization server represented as an + /// array of JSON objects with name and value string properties, i.e. + /// {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute + /// URI to entity being referenced. + /// If true, authorization server will + /// include state parameter from the authorization request to its + /// response. Client may use state parameter to raise protocol + /// security. + /// Access token scope that is going to be + /// requested by default. Can be overridden at the API level. Should be + /// provided in the form of a string containing space-delimited + /// values. + /// Specifies the mechanism by + /// which access token is passed to the API. + /// Client or app secret registered with + /// this authorization server. + /// Can be optionally specified + /// when resource owner password grant type is supported by this + /// authorization server. Default resource owner username. + /// Can be optionally specified + /// when resource owner password grant type is supported by this + /// authorization server. Default resource owner password. + public AuthorizationServerContractBaseProperties(string description = default(string), IList authorizationMethods = default(IList), IList clientAuthenticationMethod = default(IList), IList tokenBodyParameters = default(IList), string tokenEndpoint = default(string), bool? supportState = default(bool?), string defaultScope = default(string), IList bearerTokenSendingMethods = default(IList), string clientSecret = default(string), string resourceOwnerUsername = default(string), string resourceOwnerPassword = default(string)) + { + Description = description; + AuthorizationMethods = authorizationMethods; + ClientAuthenticationMethod = clientAuthenticationMethod; + TokenBodyParameters = tokenBodyParameters; + TokenEndpoint = tokenEndpoint; + SupportState = supportState; + DefaultScope = defaultScope; + BearerTokenSendingMethods = bearerTokenSendingMethods; + ClientSecret = clientSecret; + ResourceOwnerUsername = resourceOwnerUsername; + ResourceOwnerPassword = resourceOwnerPassword; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the authorization server. Can contain + /// HTML formatting tags. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets HTTP verbs supported by the authorization endpoint. + /// GET must be always present. POST is optional. + /// + [JsonProperty(PropertyName = "authorizationMethods")] + public IList AuthorizationMethods { get; set; } + + /// + /// Gets or sets method of authentication supported by the token + /// endpoint of this authorization server. Possible values are Basic + /// and/or Body. When Body is specified, client credentials and other + /// parameters are passed within the request body in the + /// application/x-www-form-urlencoded format. + /// + [JsonProperty(PropertyName = "clientAuthenticationMethod")] + public IList ClientAuthenticationMethod { get; set; } + + /// + /// Gets or sets additional parameters required by the token endpoint + /// of this authorization server represented as an array of JSON + /// objects with name and value string properties, i.e. {"name" : "name + /// value", "value": "a value"}. + /// + [JsonProperty(PropertyName = "tokenBodyParameters")] + public IList TokenBodyParameters { get; set; } + + /// + /// Gets or sets oAuth token endpoint. Contains absolute URI to entity + /// being referenced. + /// + [JsonProperty(PropertyName = "tokenEndpoint")] + public string TokenEndpoint { get; set; } + + /// + /// Gets or sets if true, authorization server will include state + /// parameter from the authorization request to its response. Client + /// may use state parameter to raise protocol security. + /// + [JsonProperty(PropertyName = "supportState")] + public bool? SupportState { get; set; } + + /// + /// Gets or sets access token scope that is going to be requested by + /// default. Can be overridden at the API level. Should be provided in + /// the form of a string containing space-delimited values. + /// + [JsonProperty(PropertyName = "defaultScope")] + public string DefaultScope { get; set; } + + /// + /// Gets or sets specifies the mechanism by which access token is + /// passed to the API. + /// + [JsonProperty(PropertyName = "bearerTokenSendingMethods")] + public IList BearerTokenSendingMethods { get; set; } + + /// + /// Gets or sets client or app secret registered with this + /// authorization server. + /// + [JsonProperty(PropertyName = "clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Gets or sets can be optionally specified when resource owner + /// password grant type is supported by this authorization server. + /// Default resource owner username. + /// + [JsonProperty(PropertyName = "resourceOwnerUsername")] + public string ResourceOwnerUsername { get; set; } + + /// + /// Gets or sets can be optionally specified when resource owner + /// password grant type is supported by this authorization server. + /// Default resource owner password. + /// + [JsonProperty(PropertyName = "resourceOwnerPassword")] + public string ResourceOwnerPassword { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerGetHeaders.cs new file mode 100644 index 000000000000..35860143143e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerGetHeaders.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class AuthorizationServerGetHeaders + { + /// + /// Initializes a new instance of the AuthorizationServerGetHeaders + /// class. + /// + public AuthorizationServerGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AuthorizationServerGetHeaders + /// class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public AuthorizationServerGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerUpdateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerUpdateContract.cs new file mode 100644 index 000000000000..4333b839d1d7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/AuthorizationServerUpdateContract.cs @@ -0,0 +1,270 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// External OAuth authorization server settings. + /// + [Rest.Serialization.JsonTransformation] + public partial class AuthorizationServerUpdateContract : Resource + { + /// + /// Initializes a new instance of the AuthorizationServerUpdateContract + /// class. + /// + public AuthorizationServerUpdateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AuthorizationServerUpdateContract + /// class. + /// + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Description of the authorization server. + /// Can contain HTML formatting tags. + /// HTTP verbs supported by the + /// authorization endpoint. GET must be always present. POST is + /// optional. + /// Method of authentication + /// supported by the token endpoint of this authorization server. + /// Possible values are Basic and/or Body. When Body is specified, + /// client credentials and other parameters are passed within the + /// request body in the application/x-www-form-urlencoded + /// format. + /// Additional parameters required by + /// the token endpoint of this authorization server represented as an + /// array of JSON objects with name and value string properties, i.e. + /// {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute + /// URI to entity being referenced. + /// If true, authorization server will + /// include state parameter from the authorization request to its + /// response. Client may use state parameter to raise protocol + /// security. + /// Access token scope that is going to be + /// requested by default. Can be overridden at the API level. Should be + /// provided in the form of a string containing space-delimited + /// values. + /// Specifies the mechanism by + /// which access token is passed to the API. + /// Client or app secret registered with + /// this authorization server. + /// Can be optionally specified + /// when resource owner password grant type is supported by this + /// authorization server. Default resource owner username. + /// Can be optionally specified + /// when resource owner password grant type is supported by this + /// authorization server. Default resource owner password. + /// User-friendly authorization server + /// name. + /// Optional reference to a + /// page where client or app registration for this authorization server + /// is performed. Contains absolute URL to entity being + /// referenced. + /// OAuth authorization endpoint. + /// See http://tools.ietf.org/html/rfc6749#section-3.2. + /// Form of an authorization grant, which the + /// client uses to request the access token. + /// Client or app id registered with this + /// authorization server. + public AuthorizationServerUpdateContract(string id = default(string), string name = default(string), string type = default(string), string description = default(string), IList authorizationMethods = default(IList), IList clientAuthenticationMethod = default(IList), IList tokenBodyParameters = default(IList), string tokenEndpoint = default(string), bool? supportState = default(bool?), string defaultScope = default(string), IList bearerTokenSendingMethods = default(IList), string clientSecret = default(string), string resourceOwnerUsername = default(string), string resourceOwnerPassword = default(string), string displayName = default(string), string clientRegistrationEndpoint = default(string), string authorizationEndpoint = default(string), IList grantTypes = default(IList), string clientId = default(string)) + : base(id, name, type) + { + Description = description; + AuthorizationMethods = authorizationMethods; + ClientAuthenticationMethod = clientAuthenticationMethod; + TokenBodyParameters = tokenBodyParameters; + TokenEndpoint = tokenEndpoint; + SupportState = supportState; + DefaultScope = defaultScope; + BearerTokenSendingMethods = bearerTokenSendingMethods; + ClientSecret = clientSecret; + ResourceOwnerUsername = resourceOwnerUsername; + ResourceOwnerPassword = resourceOwnerPassword; + DisplayName = displayName; + ClientRegistrationEndpoint = clientRegistrationEndpoint; + AuthorizationEndpoint = authorizationEndpoint; + GrantTypes = grantTypes; + ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the authorization server. Can contain + /// HTML formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets HTTP verbs supported by the authorization endpoint. + /// GET must be always present. POST is optional. + /// + [JsonProperty(PropertyName = "properties.authorizationMethods")] + public IList AuthorizationMethods { get; set; } + + /// + /// Gets or sets method of authentication supported by the token + /// endpoint of this authorization server. Possible values are Basic + /// and/or Body. When Body is specified, client credentials and other + /// parameters are passed within the request body in the + /// application/x-www-form-urlencoded format. + /// + [JsonProperty(PropertyName = "properties.clientAuthenticationMethod")] + public IList ClientAuthenticationMethod { get; set; } + + /// + /// Gets or sets additional parameters required by the token endpoint + /// of this authorization server represented as an array of JSON + /// objects with name and value string properties, i.e. {"name" : "name + /// value", "value": "a value"}. + /// + [JsonProperty(PropertyName = "properties.tokenBodyParameters")] + public IList TokenBodyParameters { get; set; } + + /// + /// Gets or sets oAuth token endpoint. Contains absolute URI to entity + /// being referenced. + /// + [JsonProperty(PropertyName = "properties.tokenEndpoint")] + public string TokenEndpoint { get; set; } + + /// + /// Gets or sets if true, authorization server will include state + /// parameter from the authorization request to its response. Client + /// may use state parameter to raise protocol security. + /// + [JsonProperty(PropertyName = "properties.supportState")] + public bool? SupportState { get; set; } + + /// + /// Gets or sets access token scope that is going to be requested by + /// default. Can be overridden at the API level. Should be provided in + /// the form of a string containing space-delimited values. + /// + [JsonProperty(PropertyName = "properties.defaultScope")] + public string DefaultScope { get; set; } + + /// + /// Gets or sets specifies the mechanism by which access token is + /// passed to the API. + /// + [JsonProperty(PropertyName = "properties.bearerTokenSendingMethods")] + public IList BearerTokenSendingMethods { get; set; } + + /// + /// Gets or sets client or app secret registered with this + /// authorization server. + /// + [JsonProperty(PropertyName = "properties.clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Gets or sets can be optionally specified when resource owner + /// password grant type is supported by this authorization server. + /// Default resource owner username. + /// + [JsonProperty(PropertyName = "properties.resourceOwnerUsername")] + public string ResourceOwnerUsername { get; set; } + + /// + /// Gets or sets can be optionally specified when resource owner + /// password grant type is supported by this authorization server. + /// Default resource owner password. + /// + [JsonProperty(PropertyName = "properties.resourceOwnerPassword")] + public string ResourceOwnerPassword { get; set; } + + /// + /// Gets or sets user-friendly authorization server name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets optional reference to a page where client or app + /// registration for this authorization server is performed. Contains + /// absolute URL to entity being referenced. + /// + [JsonProperty(PropertyName = "properties.clientRegistrationEndpoint")] + public string ClientRegistrationEndpoint { get; set; } + + /// + /// Gets or sets oAuth authorization endpoint. See + /// http://tools.ietf.org/html/rfc6749#section-3.2. + /// + [JsonProperty(PropertyName = "properties.authorizationEndpoint")] + public string AuthorizationEndpoint { get; set; } + + /// + /// Gets or sets form of an authorization grant, which the client uses + /// to request the access token. + /// + [JsonProperty(PropertyName = "properties.grantTypes")] + public IList GrantTypes { get; set; } + + /// + /// Gets or sets client or app id registered with this authorization + /// server. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TokenBodyParameters != null) + { + foreach (var element in TokenBodyParameters) + { + if (element != null) + { + element.Validate(); + } + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 50); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendAuthorizationHeaderCredentials.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendAuthorizationHeaderCredentials.cs new file mode 100644 index 000000000000..2a5876e6dd5e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendAuthorizationHeaderCredentials.cs @@ -0,0 +1,102 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Authorization header information. + /// + public partial class BackendAuthorizationHeaderCredentials + { + /// + /// Initializes a new instance of the + /// BackendAuthorizationHeaderCredentials class. + /// + public BackendAuthorizationHeaderCredentials() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// BackendAuthorizationHeaderCredentials class. + /// + /// Authentication Scheme name. + /// Authentication Parameter value. + public BackendAuthorizationHeaderCredentials(string scheme, string parameter) + { + Scheme = scheme; + Parameter = parameter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets authentication Scheme name. + /// + [JsonProperty(PropertyName = "scheme")] + public string Scheme { get; set; } + + /// + /// Gets or sets authentication Parameter value. + /// + [JsonProperty(PropertyName = "parameter")] + public string Parameter { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Scheme == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Scheme"); + } + if (Parameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameter"); + } + if (Scheme != null) + { + if (Scheme.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "Scheme", 100); + } + if (Scheme.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Scheme", 1); + } + } + if (Parameter != null) + { + if (Parameter.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "Parameter", 300); + } + if (Parameter.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Parameter", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendBaseParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendBaseParameters.cs new file mode 100644 index 000000000000..0acbe3ce990c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendBaseParameters.cs @@ -0,0 +1,160 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Backend entity base Parameter set. + /// + public partial class BackendBaseParameters + { + /// + /// Initializes a new instance of the BackendBaseParameters class. + /// + public BackendBaseParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendBaseParameters class. + /// + /// Backend Title. + /// Backend Description. + /// Management Uri of the Resource in External + /// System. This url can be the Arm Resource Id of Logic Apps, Function + /// Apps or Api Apps. + /// Backend Properties contract + /// Backend Credentials Contract + /// Properties + /// Backend Proxy Contract Properties + /// Backend TLS Properties + public BackendBaseParameters(string title = default(string), string description = default(string), string resourceId = default(string), BackendProperties properties = default(BackendProperties), BackendCredentialsContract credentials = default(BackendCredentialsContract), BackendProxyContract proxy = default(BackendProxyContract), BackendTlsProperties tls = default(BackendTlsProperties)) + { + Title = title; + Description = description; + ResourceId = resourceId; + Properties = properties; + Credentials = credentials; + Proxy = proxy; + Tls = tls; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets backend Title. + /// + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or sets backend Description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets management Uri of the Resource in External System. + /// This url can be the Arm Resource Id of Logic Apps, Function Apps or + /// Api Apps. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; set; } + + /// + /// Gets or sets backend Properties contract + /// + [JsonProperty(PropertyName = "properties")] + public BackendProperties Properties { get; set; } + + /// + /// Gets or sets backend Credentials Contract Properties + /// + [JsonProperty(PropertyName = "credentials")] + public BackendCredentialsContract Credentials { get; set; } + + /// + /// Gets or sets backend Proxy Contract Properties + /// + [JsonProperty(PropertyName = "proxy")] + public BackendProxyContract Proxy { get; set; } + + /// + /// Gets or sets backend TLS Properties + /// + [JsonProperty(PropertyName = "tls")] + public BackendTlsProperties Tls { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Title != null) + { + if (Title.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "Title", 300); + } + if (Title.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Title", 1); + } + } + if (Description != null) + { + if (Description.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 2000); + } + if (Description.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Description", 1); + } + } + if (ResourceId != null) + { + if (ResourceId.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "ResourceId", 2000); + } + if (ResourceId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ResourceId", 1); + } + } + if (Properties != null) + { + Properties.Validate(); + } + if (Credentials != null) + { + Credentials.Validate(); + } + if (Proxy != null) + { + Proxy.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendContract.cs new file mode 100644 index 000000000000..e9d81915fe55 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendContract.cs @@ -0,0 +1,200 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Backend details. + /// + [Rest.Serialization.JsonTransformation] + public partial class BackendContract : Resource + { + /// + /// Initializes a new instance of the BackendContract class. + /// + public BackendContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendContract class. + /// + /// Runtime Url of the Backend. + /// Backend communication protocol. Possible + /// values include: 'http', 'soap' + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Backend Title. + /// Backend Description. + /// Management Uri of the Resource in External + /// System. This url can be the Arm Resource Id of Logic Apps, Function + /// Apps or Api Apps. + /// Backend Properties contract + /// Backend Credentials Contract + /// Properties + /// Backend Proxy Contract Properties + /// Backend TLS Properties + public BackendContract(string url, BackendProtocol protocol, string id = default(string), string name = default(string), string type = default(string), string title = default(string), string description = default(string), string resourceId = default(string), BackendProperties properties = default(BackendProperties), BackendCredentialsContract credentials = default(BackendCredentialsContract), BackendProxyContract proxy = default(BackendProxyContract), BackendTlsProperties tls = default(BackendTlsProperties)) + : base(id, name, type) + { + Title = title; + Description = description; + ResourceId = resourceId; + Properties = properties; + Credentials = credentials; + Proxy = proxy; + Tls = tls; + Url = url; + Protocol = protocol; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets backend Title. + /// + [JsonProperty(PropertyName = "properties.title")] + public string Title { get; set; } + + /// + /// Gets or sets backend Description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets management Uri of the Resource in External System. + /// This url can be the Arm Resource Id of Logic Apps, Function Apps or + /// Api Apps. + /// + [JsonProperty(PropertyName = "properties.resourceId")] + public string ResourceId { get; set; } + + /// + /// Gets or sets backend Properties contract + /// + [JsonProperty(PropertyName = "properties.properties")] + public BackendProperties Properties { get; set; } + + /// + /// Gets or sets backend Credentials Contract Properties + /// + [JsonProperty(PropertyName = "properties.credentials")] + public BackendCredentialsContract Credentials { get; set; } + + /// + /// Gets or sets backend Proxy Contract Properties + /// + [JsonProperty(PropertyName = "properties.proxy")] + public BackendProxyContract Proxy { get; set; } + + /// + /// Gets or sets backend TLS Properties + /// + [JsonProperty(PropertyName = "properties.tls")] + public BackendTlsProperties Tls { get; set; } + + /// + /// Gets or sets runtime Url of the Backend. + /// + [JsonProperty(PropertyName = "properties.url")] + public string Url { get; set; } + + /// + /// Gets or sets backend communication protocol. Possible values + /// include: 'http', 'soap' + /// + [JsonProperty(PropertyName = "properties.protocol")] + public BackendProtocol Protocol { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (Title != null) + { + if (Title.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "Title", 300); + } + if (Title.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Title", 1); + } + } + if (Description != null) + { + if (Description.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 2000); + } + if (Description.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Description", 1); + } + } + if (ResourceId != null) + { + if (ResourceId.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "ResourceId", 2000); + } + if (ResourceId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ResourceId", 1); + } + } + if (Properties != null) + { + Properties.Validate(); + } + if (Credentials != null) + { + Credentials.Validate(); + } + if (Proxy != null) + { + Proxy.Validate(); + } + if (Url != null) + { + if (Url.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "Url", 2000); + } + if (Url.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Url", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendCredentialsContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendCredentialsContract.cs new file mode 100644 index 000000000000..6ffa734f74c6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendCredentialsContract.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Details of the Credentials used to connect to Backend. + /// + public partial class BackendCredentialsContract + { + /// + /// Initializes a new instance of the BackendCredentialsContract class. + /// + public BackendCredentialsContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendCredentialsContract class. + /// + /// List of Client Certificate + /// Thumbprint. + /// Query Parameter description. + /// Header Parameter description. + /// Authorization header + /// authentication + public BackendCredentialsContract(IList certificate = default(IList), IDictionary> query = default(IDictionary>), IDictionary> header = default(IDictionary>), BackendAuthorizationHeaderCredentials authorization = default(BackendAuthorizationHeaderCredentials)) + { + Certificate = certificate; + Query = query; + Header = header; + Authorization = authorization; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of Client Certificate Thumbprint. + /// + [JsonProperty(PropertyName = "certificate")] + public IList Certificate { get; set; } + + /// + /// Gets or sets query Parameter description. + /// + [JsonProperty(PropertyName = "query")] + public IDictionary> Query { get; set; } + + /// + /// Gets or sets header Parameter description. + /// + [JsonProperty(PropertyName = "header")] + public IDictionary> Header { get; set; } + + /// + /// Gets or sets authorization header authentication + /// + [JsonProperty(PropertyName = "authorization")] + public BackendAuthorizationHeaderCredentials Authorization { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Certificate != null) + { + if (Certificate.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "Certificate", 32); + } + } + if (Authorization != null) + { + Authorization.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendGetHeaders.cs new file mode 100644 index 000000000000..aa602b2d04bf --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class BackendGetHeaders + { + /// + /// Initializes a new instance of the BackendGetHeaders class. + /// + public BackendGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public BackendGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProperties.cs new file mode 100644 index 000000000000..a8ef97bfa039 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProperties.cs @@ -0,0 +1,66 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Properties specific to the Backend Type. + /// + public partial class BackendProperties + { + /// + /// Initializes a new instance of the BackendProperties class. + /// + public BackendProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendProperties class. + /// + /// Backend Service Fabric Cluster + /// Properties + public BackendProperties(BackendServiceFabricClusterProperties serviceFabricCluster = default(BackendServiceFabricClusterProperties)) + { + ServiceFabricCluster = serviceFabricCluster; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets backend Service Fabric Cluster Properties + /// + [JsonProperty(PropertyName = "serviceFabricCluster")] + public BackendServiceFabricClusterProperties ServiceFabricCluster { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServiceFabricCluster != null) + { + ServiceFabricCluster.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProtocol.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProtocol.cs new file mode 100644 index 000000000000..67b9a180cfc9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProtocol.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for BackendProtocol. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BackendProtocol + { + [EnumMember(Value = "http")] + Http, + [EnumMember(Value = "soap")] + Soap + } + internal static class BackendProtocolEnumExtension + { + internal static string ToSerializedValue(this BackendProtocol? value) => + value == null ? null : ((BackendProtocol)value).ToSerializedValue(); + + internal static string ToSerializedValue(this BackendProtocol value) + { + switch( value ) + { + case BackendProtocol.Http: + return "http"; + case BackendProtocol.Soap: + return "soap"; + } + return null; + } + + internal static BackendProtocol? ParseBackendProtocol(this string value) + { + switch( value ) + { + case "http": + return BackendProtocol.Http; + case "soap": + return BackendProtocol.Soap; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProxyContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProxyContract.cs new file mode 100644 index 000000000000..fc59b66c0eff --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendProxyContract.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Details of the Backend WebProxy Server to use in the Request to + /// Backend. + /// + /// + public partial class BackendProxyContract + { + /// + /// Initializes a new instance of the BackendProxyContract class. + /// + public BackendProxyContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendProxyContract class. + /// + /// WebProxy Server AbsoluteUri property which + /// includes the entire URI stored in the Uri instance, including all + /// fragments and query strings. + /// Username to connect to the WebProxy + /// server + /// Password to connect to the WebProxy + /// Server + public BackendProxyContract(string url, string username = default(string), string password = default(string)) + { + Url = url; + Username = username; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets webProxy Server AbsoluteUri property which includes + /// the entire URI stored in the Uri instance, including all fragments + /// and query strings. + /// + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + /// + /// Gets or sets username to connect to the WebProxy server + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Gets or sets password to connect to the WebProxy Server + /// + [JsonProperty(PropertyName = "password")] + public string Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (Url != null) + { + if (Url.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "Url", 2000); + } + if (Url.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Url", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendServiceFabricClusterProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendServiceFabricClusterProperties.cs new file mode 100644 index 000000000000..6bebd1c2733b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendServiceFabricClusterProperties.cs @@ -0,0 +1,115 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of the Service Fabric Type Backend. + /// + public partial class BackendServiceFabricClusterProperties + { + /// + /// Initializes a new instance of the + /// BackendServiceFabricClusterProperties class. + /// + public BackendServiceFabricClusterProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// BackendServiceFabricClusterProperties class. + /// + /// The client certificate + /// thumbprint for the management endpoint. + /// The cluster management + /// endpoint. + /// Maximum number of + /// retries while attempting resolve the parition. + /// Thumbprints of + /// certificates cluster management service uses for tls + /// communication + /// Server X509 Certificate Names + /// Collection + public BackendServiceFabricClusterProperties(string clientCertificatethumbprint, IList managementEndpoints, int? maxPartitionResolutionRetries = default(int?), IList serverCertificateThumbprints = default(IList), IList serverX509Names = default(IList)) + { + ClientCertificatethumbprint = clientCertificatethumbprint; + MaxPartitionResolutionRetries = maxPartitionResolutionRetries; + ManagementEndpoints = managementEndpoints; + ServerCertificateThumbprints = serverCertificateThumbprints; + ServerX509Names = serverX509Names; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the client certificate thumbprint for the management + /// endpoint. + /// + [JsonProperty(PropertyName = "clientCertificatethumbprint")] + public string ClientCertificatethumbprint { get; set; } + + /// + /// Gets or sets maximum number of retries while attempting resolve the + /// parition. + /// + [JsonProperty(PropertyName = "maxPartitionResolutionRetries")] + public int? MaxPartitionResolutionRetries { get; set; } + + /// + /// Gets or sets the cluster management endpoint. + /// + [JsonProperty(PropertyName = "managementEndpoints")] + public IList ManagementEndpoints { get; set; } + + /// + /// Gets or sets thumbprints of certificates cluster management service + /// uses for tls communication + /// + [JsonProperty(PropertyName = "serverCertificateThumbprints")] + public IList ServerCertificateThumbprints { get; set; } + + /// + /// Gets or sets server X509 Certificate Names Collection + /// + [JsonProperty(PropertyName = "serverX509Names")] + public IList ServerX509Names { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ClientCertificatethumbprint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientCertificatethumbprint"); + } + if (ManagementEndpoints == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ManagementEndpoints"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendTlsProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendTlsProperties.cs new file mode 100644 index 000000000000..3338bdec6f6d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendTlsProperties.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Properties controlling TLS Certificate Validation. + /// + public partial class BackendTlsProperties + { + /// + /// Initializes a new instance of the BackendTlsProperties class. + /// + public BackendTlsProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendTlsProperties class. + /// + /// Flag indicating whether SSL + /// certificate chain validation should be done when using self-signed + /// certificates for this backend host. + /// Flag indicating whether SSL + /// certificate name validation should be done when using self-signed + /// certificates for this backend host. + public BackendTlsProperties(bool? validateCertificateChain = default(bool?), bool? validateCertificateName = default(bool?)) + { + ValidateCertificateChain = validateCertificateChain; + ValidateCertificateName = validateCertificateName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets flag indicating whether SSL certificate chain + /// validation should be done when using self-signed certificates for + /// this backend host. + /// + [JsonProperty(PropertyName = "validateCertificateChain")] + public bool? ValidateCertificateChain { get; set; } + + /// + /// Gets or sets flag indicating whether SSL certificate name + /// validation should be done when using self-signed certificates for + /// this backend host. + /// + [JsonProperty(PropertyName = "validateCertificateName")] + public bool? ValidateCertificateName { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendUpdateParameters.cs new file mode 100644 index 000000000000..5b490633354c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BackendUpdateParameters.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Update Backend operation. + /// + public partial class BackendUpdateParameters : BackendBaseParameters + { + /// + /// Initializes a new instance of the BackendUpdateParameters class. + /// + public BackendUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BackendUpdateParameters class. + /// + /// Backend Title. + /// Backend Description. + /// Management Uri of the Resource in External + /// System. This url can be the Arm Resource Id of Logic Apps, Function + /// Apps or Api Apps. + /// Backend Properties contract + /// Backend Credentials Contract + /// Properties + /// Backend Proxy Contract Properties + /// Backend TLS Properties + /// Runtime Url of the Backend. + /// Backend communication protocol. Possible + /// values include: 'http', 'soap' + public BackendUpdateParameters(string title = default(string), string description = default(string), string resourceId = default(string), BackendProperties properties = default(BackendProperties), BackendCredentialsContract credentials = default(BackendCredentialsContract), BackendProxyContract proxy = default(BackendProxyContract), BackendTlsProperties tls = default(BackendTlsProperties), string url = default(string), BackendProtocol? protocol = default(BackendProtocol?)) + : base(title, description, resourceId, properties, credentials, proxy, tls) + { + Url = url; + Protocol = protocol; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets runtime Url of the Backend. + /// + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + /// + /// Gets or sets backend communication protocol. Possible values + /// include: 'http', 'soap' + /// + [JsonProperty(PropertyName = "protocol")] + public BackendProtocol? Protocol { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url != null) + { + if (Url.Length > 2000) + { + throw new ValidationException(ValidationRules.MaxLength, "Url", 2000); + } + if (Url.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Url", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BearerTokenSendingMethod.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BearerTokenSendingMethod.cs new file mode 100644 index 000000000000..3b8ddaf4348b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/BearerTokenSendingMethod.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for BearerTokenSendingMethod. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BearerTokenSendingMethod + { + [EnumMember(Value = "authorizationHeader")] + AuthorizationHeader, + [EnumMember(Value = "query")] + Query + } + internal static class BearerTokenSendingMethodEnumExtension + { + internal static string ToSerializedValue(this BearerTokenSendingMethod? value) => + value == null ? null : ((BearerTokenSendingMethod)value).ToSerializedValue(); + + internal static string ToSerializedValue(this BearerTokenSendingMethod value) + { + switch( value ) + { + case BearerTokenSendingMethod.AuthorizationHeader: + return "authorizationHeader"; + case BearerTokenSendingMethod.Query: + return "query"; + } + return null; + } + + internal static BearerTokenSendingMethod? ParseBearerTokenSendingMethod(this string value) + { + switch( value ) + { + case "authorizationHeader": + return BearerTokenSendingMethod.AuthorizationHeader; + case "query": + return BearerTokenSendingMethod.Query; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateContract.cs new file mode 100644 index 000000000000..345954dbaf96 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateContract.cs @@ -0,0 +1,99 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Certificate details. + /// + [Rest.Serialization.JsonTransformation] + public partial class CertificateContract : Resource + { + /// + /// Initializes a new instance of the CertificateContract class. + /// + public CertificateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateContract class. + /// + /// Subject attribute of the certificate. + /// Thumbprint of the certificate. + /// Expiration date of the certificate. + /// The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + /// as specified by the ISO 8601 standard. + /// + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + public CertificateContract(string subject, string thumbprint, System.DateTime expirationDate, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + Subject = subject; + Thumbprint = thumbprint; + ExpirationDate = expirationDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets subject attribute of the certificate. + /// + [JsonProperty(PropertyName = "properties.subject")] + public string Subject { get; set; } + + /// + /// Gets or sets thumbprint of the certificate. + /// + [JsonProperty(PropertyName = "properties.thumbprint")] + public string Thumbprint { get; set; } + + /// + /// Gets or sets expiration date of the certificate. The date conforms + /// to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the + /// ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime ExpirationDate { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Subject == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subject"); + } + if (Thumbprint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Thumbprint"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateCreateOrUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateCreateOrUpdateParameters.cs new file mode 100644 index 000000000000..49a87b4190ef --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateCreateOrUpdateParameters.cs @@ -0,0 +1,84 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Certificate create or update details. + /// + [Rest.Serialization.JsonTransformation] + public partial class CertificateCreateOrUpdateParameters + { + /// + /// Initializes a new instance of the + /// CertificateCreateOrUpdateParameters class. + /// + public CertificateCreateOrUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CertificateCreateOrUpdateParameters class. + /// + /// Base 64 encoded certificate using the + /// application/x-pkcs12 representation. + /// Password for the Certificate + public CertificateCreateOrUpdateParameters(string data, string password) + { + Data = data; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets base 64 encoded certificate using the + /// application/x-pkcs12 representation. + /// + [JsonProperty(PropertyName = "properties.data")] + public string Data { get; set; } + + /// + /// Gets or sets password for the Certificate + /// + [JsonProperty(PropertyName = "properties.password")] + public string Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Data == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Data"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateGetHeaders.cs new file mode 100644 index 000000000000..1cd70769bbc5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class CertificateGetHeaders + { + /// + /// Initializes a new instance of the CertificateGetHeaders class. + /// + public CertificateGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public CertificateGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateInformation.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateInformation.cs new file mode 100644 index 000000000000..3bfbc913b701 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/CertificateInformation.cs @@ -0,0 +1,90 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSL certificate information. + /// + public partial class CertificateInformation + { + /// + /// Initializes a new instance of the CertificateInformation class. + /// + public CertificateInformation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CertificateInformation class. + /// + /// Expiration date of the certificate. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// Thumbprint of the certificate. + /// Subject of the certificate. + public CertificateInformation(System.DateTime expiry, string thumbprint, string subject) + { + Expiry = expiry; + Thumbprint = thumbprint; + Subject = subject; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets expiration date of the certificate. The date conforms + /// to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the + /// ISO 8601 standard. + /// + [JsonProperty(PropertyName = "expiry")] + public System.DateTime Expiry { get; set; } + + /// + /// Gets or sets thumbprint of the certificate. + /// + [JsonProperty(PropertyName = "thumbprint")] + public string Thumbprint { get; set; } + + /// + /// Gets or sets subject of the certificate. + /// + [JsonProperty(PropertyName = "subject")] + public string Subject { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Thumbprint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Thumbprint"); + } + if (Subject == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subject"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ClientAuthenticationMethod.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ClientAuthenticationMethod.cs new file mode 100644 index 000000000000..b800c3420cd5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ClientAuthenticationMethod.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ClientAuthenticationMethod. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ClientAuthenticationMethod + { + [EnumMember(Value = "Basic")] + Basic, + [EnumMember(Value = "Body")] + Body + } + internal static class ClientAuthenticationMethodEnumExtension + { + internal static string ToSerializedValue(this ClientAuthenticationMethod? value) => + value == null ? null : ((ClientAuthenticationMethod)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ClientAuthenticationMethod value) + { + switch( value ) + { + case ClientAuthenticationMethod.Basic: + return "Basic"; + case ClientAuthenticationMethod.Body: + return "Body"; + } + return null; + } + + internal static ClientAuthenticationMethod? ParseClientAuthenticationMethod(this string value) + { + switch( value ) + { + case "Basic": + return ClientAuthenticationMethod.Basic; + case "Body": + return ClientAuthenticationMethod.Body; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusContract.cs new file mode 100644 index 000000000000..e2086e7b0344 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusContract.cs @@ -0,0 +1,138 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Details about connectivity to a resource. + /// + public partial class ConnectivityStatusContract + { + /// + /// Initializes a new instance of the ConnectivityStatusContract class. + /// + public ConnectivityStatusContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectivityStatusContract class. + /// + /// The hostname of the resource which the service + /// depends on. This can be the database, storage or any other azure + /// resource on which the service depends upon. + /// Resource Connectivity Status Type identifier. + /// Possible values include: 'initializing', 'success', + /// 'failure' + /// The date when the resource connectivity + /// status was last updated. This status should be updated every 15 + /// minutes. If this status has not been updated, then it means that + /// the service has lost network connectivity to the resource, from + /// inside the Virtual Network.The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// + /// The date when the resource + /// connectivity status last Changed from success to failure or + /// vice-versa. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// Error details of the connectivity to the + /// resource. + public ConnectivityStatusContract(string name, string status, System.DateTime lastUpdated, System.DateTime lastStatusChange, string error = default(string)) + { + Name = name; + Status = status; + Error = error; + LastUpdated = lastUpdated; + LastStatusChange = lastStatusChange; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the hostname of the resource which the service depends + /// on. This can be the database, storage or any other azure resource + /// on which the service depends upon. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets resource Connectivity Status Type identifier. Possible + /// values include: 'initializing', 'success', 'failure' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets error details of the connectivity to the resource. + /// + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + /// + /// Gets or sets the date when the resource connectivity status was + /// last updated. This status should be updated every 15 minutes. If + /// this status has not been updated, then it means that the service + /// has lost network connectivity to the resource, from inside the + /// Virtual Network.The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "lastUpdated")] + public System.DateTime LastUpdated { get; set; } + + /// + /// Gets or sets the date when the resource connectivity status last + /// Changed from success to failure or vice-versa. The date conforms to + /// the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the + /// ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "lastStatusChange")] + public System.DateTime LastStatusChange { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Name != null) + { + if (Name.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Name", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusType.cs new file mode 100644 index 000000000000..6b1648d1c788 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ConnectivityStatusType.cs @@ -0,0 +1,24 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + + /// + /// Defines values for ConnectivityStatusType. + /// + public static class ConnectivityStatusType + { + public const string Initializing = "initializing"; + public const string Success = "success"; + public const string Failure = "failure"; + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ContentFormat.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ContentFormat.cs new file mode 100644 index 000000000000..3b45ccdd56a2 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ContentFormat.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ContentFormat. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ContentFormat + { + [EnumMember(Value = "wadl-xml")] + WadlXml, + [EnumMember(Value = "wadl-link-json")] + WadlLinkJson, + [EnumMember(Value = "swagger-json")] + SwaggerJson, + [EnumMember(Value = "swagger-link-json")] + SwaggerLinkJson, + [EnumMember(Value = "wsdl")] + Wsdl, + [EnumMember(Value = "wsdl-link")] + WsdlLink + } + internal static class ContentFormatEnumExtension + { + internal static string ToSerializedValue(this ContentFormat? value) => + value == null ? null : ((ContentFormat)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ContentFormat value) + { + switch( value ) + { + case ContentFormat.WadlXml: + return "wadl-xml"; + case ContentFormat.WadlLinkJson: + return "wadl-link-json"; + case ContentFormat.SwaggerJson: + return "swagger-json"; + case ContentFormat.SwaggerLinkJson: + return "swagger-link-json"; + case ContentFormat.Wsdl: + return "wsdl"; + case ContentFormat.WsdlLink: + return "wsdl-link"; + } + return null; + } + + internal static ContentFormat? ParseContentFormat(this string value) + { + switch( value ) + { + case "wadl-xml": + return ContentFormat.WadlXml; + case "wadl-link-json": + return ContentFormat.WadlLinkJson; + case "swagger-json": + return ContentFormat.SwaggerJson; + case "swagger-link-json": + return ContentFormat.SwaggerLinkJson; + case "wsdl": + return ContentFormat.Wsdl; + case "wsdl-link": + return ContentFormat.WsdlLink; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/DeployConfigurationParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/DeployConfigurationParameters.cs new file mode 100644 index 000000000000..a023a6dc3d30 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/DeployConfigurationParameters.cs @@ -0,0 +1,81 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Deploy Configuration operation. + /// + public partial class DeployConfigurationParameters + { + /// + /// Initializes a new instance of the DeployConfigurationParameters + /// class. + /// + public DeployConfigurationParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeployConfigurationParameters + /// class. + /// + /// The name of the Git branch from which the + /// configuration is to be deployed to the configuration + /// database. + /// The value enforcing deleting subscriptions to + /// products that are deleted in this update. + public DeployConfigurationParameters(string branch, bool? force = default(bool?)) + { + Branch = branch; + Force = force; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Git branch from which the + /// configuration is to be deployed to the configuration database. + /// + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or sets the value enforcing deleting subscriptions to products + /// that are deleted in this update. + /// + [JsonProperty(PropertyName = "force")] + public bool? Force { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Branch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Branch"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateContract.cs new file mode 100644 index 000000000000..0cc1255a11f5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateContract.cs @@ -0,0 +1,151 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Email Template details. + /// + [Rest.Serialization.JsonTransformation] + public partial class EmailTemplateContract : Resource + { + /// + /// Initializes a new instance of the EmailTemplateContract class. + /// + public EmailTemplateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EmailTemplateContract class. + /// + /// Subject of the Template. + /// Email Template Body. This should be a valid + /// XDocument + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Title of the Template. + /// Description of the Email + /// Template. + /// Whether the template is the default + /// template provided by Api Management or has been edited. + /// Email Template Parameter values. + public EmailTemplateContract(string subject, string body, string id = default(string), string name = default(string), string type = default(string), string title = default(string), string description = default(string), bool? isDefault = default(bool?), IList parameters = default(IList)) + : base(id, name, type) + { + Subject = subject; + Body = body; + Title = title; + Description = description; + IsDefault = isDefault; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets subject of the Template. + /// + [JsonProperty(PropertyName = "properties.subject")] + public string Subject { get; set; } + + /// + /// Gets or sets email Template Body. This should be a valid XDocument + /// + [JsonProperty(PropertyName = "properties.body")] + public string Body { get; set; } + + /// + /// Gets or sets title of the Template. + /// + [JsonProperty(PropertyName = "properties.title")] + public string Title { get; set; } + + /// + /// Gets or sets description of the Email Template. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets whether the template is the default template provided by Api + /// Management or has been edited. + /// + [JsonProperty(PropertyName = "properties.isDefault")] + public bool? IsDefault { get; private set; } + + /// + /// Gets or sets email Template Parameter values. + /// + [JsonProperty(PropertyName = "properties.parameters")] + public IList Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Subject == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subject"); + } + if (Body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Body"); + } + if (Subject != null) + { + if (Subject.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Subject", 1000); + } + if (Subject.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Subject", 1); + } + } + if (Body != null) + { + if (Body.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Body", 1); + } + } + if (Parameters != null) + { + foreach (var element in Parameters) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateGetHeaders.cs new file mode 100644 index 000000000000..47f27ffd092a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class EmailTemplateGetHeaders + { + /// + /// Initializes a new instance of the EmailTemplateGetHeaders class. + /// + public EmailTemplateGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EmailTemplateGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public EmailTemplateGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateParametersContractProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateParametersContractProperties.cs new file mode 100644 index 000000000000..6465fb5fe040 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateParametersContractProperties.cs @@ -0,0 +1,121 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Email Template Parameter contract. + /// + public partial class EmailTemplateParametersContractProperties + { + /// + /// Initializes a new instance of the + /// EmailTemplateParametersContractProperties class. + /// + public EmailTemplateParametersContractProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// EmailTemplateParametersContractProperties class. + /// + /// Template parameter name. + /// Template parameter title. + /// Template parameter description. + public EmailTemplateParametersContractProperties(string name = default(string), string title = default(string), string description = default(string)) + { + Name = name; + Title = title; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets template parameter name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets template parameter title. + /// + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or sets template parameter description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name != null) + { + if (Name.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "Name", 256); + } + if (Name.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Name", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[A-Za-z0-9-._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "Name", "^[A-Za-z0-9-._]+$"); + } + } + if (Title != null) + { + if (Title.Length > 4096) + { + throw new ValidationException(ValidationRules.MaxLength, "Title", 4096); + } + if (Title.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Title", 1); + } + } + if (Description != null) + { + if (Description.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 256); + } + if (Description.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Description", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(Description, "^[A-Za-z0-9-._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "Description", "^[A-Za-z0-9-._]+$"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateUpdateParameters.cs new file mode 100644 index 000000000000..170084c4f402 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/EmailTemplateUpdateParameters.cs @@ -0,0 +1,130 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Email Template update Parameters. + /// + [Rest.Serialization.JsonTransformation] + public partial class EmailTemplateUpdateParameters + { + /// + /// Initializes a new instance of the EmailTemplateUpdateParameters + /// class. + /// + public EmailTemplateUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EmailTemplateUpdateParameters + /// class. + /// + /// Subject of the Template. + /// Title of the Template. + /// Description of the Email + /// Template. + /// Email Template Body. This should be a valid + /// XDocument + /// Email Template Parameter values. + public EmailTemplateUpdateParameters(string subject = default(string), string title = default(string), string description = default(string), string body = default(string), IList parameters = default(IList)) + { + Subject = subject; + Title = title; + Description = description; + Body = body; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets subject of the Template. + /// + [JsonProperty(PropertyName = "properties.subject")] + public string Subject { get; set; } + + /// + /// Gets or sets title of the Template. + /// + [JsonProperty(PropertyName = "properties.title")] + public string Title { get; set; } + + /// + /// Gets or sets description of the Email Template. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets email Template Body. This should be a valid XDocument + /// + [JsonProperty(PropertyName = "properties.body")] + public string Body { get; set; } + + /// + /// Gets or sets email Template Parameter values. + /// + [JsonProperty(PropertyName = "properties.parameters")] + public IList Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Subject != null) + { + if (Subject.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Subject", 1000); + } + if (Subject.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Subject", 1); + } + } + if (Body != null) + { + if (Body.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Body", 1); + } + } + if (Parameters != null) + { + foreach (var element in Parameters) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorFieldContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorFieldContract.cs new file mode 100644 index 000000000000..9b12af9897f9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorFieldContract.cs @@ -0,0 +1,69 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Error Field contract. + /// + public partial class ErrorFieldContract + { + /// + /// Initializes a new instance of the ErrorFieldContract class. + /// + public ErrorFieldContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorFieldContract class. + /// + /// Property level error code. + /// Human-readable representation of + /// property-level error. + /// Property name. + public ErrorFieldContract(string code = default(string), string message = default(string), string target = default(string)) + { + Code = code; + Message = message; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets property level error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets human-readable representation of property-level error. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets property name. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponse.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..34c55c82ccce --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponse.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Error Body contract. + /// + public partial class ErrorResponse + { + /// + /// Initializes a new instance of the ErrorResponse class. + /// + public ErrorResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + /// Service-defined error code. This code serves as + /// a sub-status for the HTTP error code specified in the + /// response. + /// Human-readable representation of the + /// error. + /// The list of invalid fields send in request, + /// in case of validation error. + public ErrorResponse(string code = default(string), string message = default(string), IList details = default(IList)) + { + Code = code; + Message = message; + Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets service-defined error code. This code serves as a + /// sub-status for the HTTP error code specified in the response. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets human-readable representation of the error. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets the list of invalid fields send in request, in case of + /// validation error. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponseException.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponseException.cs new file mode 100644 index 000000000000..be658cb5873a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ErrorResponseException.cs @@ -0,0 +1,63 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + + /// + /// Exception thrown for an invalid response with ErrorResponse + /// information. + /// + public class ErrorResponseException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ErrorResponse Body { get; set; } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + public ErrorResponseException() + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + public ErrorResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + /// Inner exception. + public ErrorResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GenerateSsoUrlResult.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GenerateSsoUrlResult.cs new file mode 100644 index 000000000000..8598e1d87298 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GenerateSsoUrlResult.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Generate SSO Url operations response details. + /// + public partial class GenerateSsoUrlResult + { + /// + /// Initializes a new instance of the GenerateSsoUrlResult class. + /// + public GenerateSsoUrlResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GenerateSsoUrlResult class. + /// + /// Redirect Url containing the SSO URL + /// value. + public GenerateSsoUrlResult(string value = default(string)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets redirect Url containing the SSO URL value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GrantType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GrantType.cs new file mode 100644 index 000000000000..4d4d37ceb4d7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GrantType.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for GrantType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GrantType + { + [EnumMember(Value = "authorizationCode")] + AuthorizationCode, + [EnumMember(Value = "implicit")] + Implicit, + [EnumMember(Value = "resourceOwnerPassword")] + ResourceOwnerPassword, + [EnumMember(Value = "clientCredentials")] + ClientCredentials + } + internal static class GrantTypeEnumExtension + { + internal static string ToSerializedValue(this GrantType? value) => + value == null ? null : ((GrantType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this GrantType value) + { + switch( value ) + { + case GrantType.AuthorizationCode: + return "authorizationCode"; + case GrantType.Implicit: + return "implicit"; + case GrantType.ResourceOwnerPassword: + return "resourceOwnerPassword"; + case GrantType.ClientCredentials: + return "clientCredentials"; + } + return null; + } + + internal static GrantType? ParseGrantType(this string value) + { + switch( value ) + { + case "authorizationCode": + return GrantType.AuthorizationCode; + case "implicit": + return GrantType.Implicit; + case "resourceOwnerPassword": + return GrantType.ResourceOwnerPassword; + case "clientCredentials": + return GrantType.ClientCredentials; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupContract.cs new file mode 100644 index 000000000000..ca1b5e3cb0bf --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupContract.cs @@ -0,0 +1,137 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Contract details. + /// + [Rest.Serialization.JsonTransformation] + public partial class GroupContract : Resource + { + /// + /// Initializes a new instance of the GroupContract class. + /// + public GroupContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GroupContract class. + /// + /// Group name. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Group description. Can contain HTML + /// formatting tags. + /// true if the group is one of the three system + /// groups (Administrators, Developers, or Guests); otherwise + /// false. + /// Group type. Possible values + /// include: 'custom', 'system', 'external' + /// For external groups, this property + /// contains the id of the group from the external identity provider, + /// e.g. for Azure Active Directory + /// aad://<tenant>.onmicrosoft.com/groups/<group object + /// id>; otherwise the value is null. + public GroupContract(string displayName, string id = default(string), string name = default(string), string type = default(string), string description = default(string), bool? builtIn = default(bool?), GroupType? groupContractType = default(GroupType?), string externalId = default(string)) + : base(id, name, type) + { + DisplayName = displayName; + Description = description; + BuiltIn = builtIn; + GroupContractType = groupContractType; + ExternalId = externalId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets group name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets group description. Can contain HTML formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets true if the group is one of the three system groups + /// (Administrators, Developers, or Guests); otherwise false. + /// + [JsonProperty(PropertyName = "properties.builtIn")] + public bool? BuiltIn { get; private set; } + + /// + /// Gets or sets group type. Possible values include: 'custom', + /// 'system', 'external' + /// + [JsonProperty(PropertyName = "properties.type")] + public GroupType? GroupContractType { get; set; } + + /// + /// Gets or sets for external groups, this property contains the id of + /// the group from the external identity provider, e.g. for Azure + /// Active Directory + /// aad://&lt;tenant&gt;.onmicrosoft.com/groups/&lt;group + /// object id&gt;; otherwise the value is null. + /// + [JsonProperty(PropertyName = "properties.externalId")] + public string ExternalId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupCreateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupCreateParameters.cs new file mode 100644 index 000000000000..40be70006540 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupCreateParameters.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Create Group operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class GroupCreateParameters + { + /// + /// Initializes a new instance of the GroupCreateParameters class. + /// + public GroupCreateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GroupCreateParameters class. + /// + /// Group name. + /// Group description. + /// Group type. Possible values include: 'custom', + /// 'system', 'external' + /// Identifier of the external groups, this + /// property contains the id of the group from the external identity + /// provider, e.g. for Azure Active Directory + /// aad://<tenant>.onmicrosoft.com/groups/<group object + /// id>; otherwise the value is null. + public GroupCreateParameters(string displayName, string description = default(string), GroupType? type = default(GroupType?), string externalId = default(string)) + { + DisplayName = displayName; + Description = description; + Type = type; + ExternalId = externalId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets group name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets group description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets group type. Possible values include: 'custom', + /// 'system', 'external' + /// + [JsonProperty(PropertyName = "properties.type")] + public GroupType? Type { get; set; } + + /// + /// Gets or sets identifier of the external groups, this property + /// contains the id of the group from the external identity provider, + /// e.g. for Azure Active Directory + /// aad://&lt;tenant&gt;.onmicrosoft.com/groups/&lt;group + /// object id&gt;; otherwise the value is null. + /// + [JsonProperty(PropertyName = "properties.externalId")] + public string ExternalId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupGetHeaders.cs new file mode 100644 index 000000000000..924341b1b740 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class GroupGetHeaders + { + /// + /// Initializes a new instance of the GroupGetHeaders class. + /// + public GroupGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GroupGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public GroupGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupType.cs new file mode 100644 index 000000000000..f5d6446401ae --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupType.cs @@ -0,0 +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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for GroupType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupType + { + [EnumMember(Value = "custom")] + Custom, + [EnumMember(Value = "system")] + System, + [EnumMember(Value = "external")] + External + } + internal static class GroupTypeEnumExtension + { + internal static string ToSerializedValue(this GroupType? value) => + value == null ? null : ((GroupType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this GroupType value) + { + switch( value ) + { + case GroupType.Custom: + return "custom"; + case GroupType.System: + return "system"; + case GroupType.External: + return "external"; + } + return null; + } + + internal static GroupType? ParseGroupType(this string value) + { + switch( value ) + { + case "custom": + return GroupType.Custom; + case "system": + return GroupType.System; + case "external": + return GroupType.External; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupUpdateParameters.cs new file mode 100644 index 000000000000..9bfac592e925 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/GroupUpdateParameters.cs @@ -0,0 +1,109 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Update Group operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class GroupUpdateParameters + { + /// + /// Initializes a new instance of the GroupUpdateParameters class. + /// + public GroupUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GroupUpdateParameters class. + /// + /// Group name. + /// Group description. + /// Group type. Possible values include: 'custom', + /// 'system', 'external' + /// Identifier of the external groups, this + /// property contains the id of the group from the external identity + /// provider, e.g. for Azure Active Directory + /// aad://<tenant>.onmicrosoft.com/groups/<group object + /// id>; otherwise the value is null. + public GroupUpdateParameters(string displayName = default(string), string description = default(string), GroupType? type = default(GroupType?), string externalId = default(string)) + { + DisplayName = displayName; + Description = description; + Type = type; + ExternalId = externalId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets group name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets group description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets group type. Possible values include: 'custom', + /// 'system', 'external' + /// + [JsonProperty(PropertyName = "properties.type")] + public GroupType? Type { get; set; } + + /// + /// Gets or sets identifier of the external groups, this property + /// contains the id of the group from the external identity provider, + /// e.g. for Azure Active Directory + /// aad://&lt;tenant&gt;.onmicrosoft.com/groups/&lt;group + /// object id&gt;; otherwise the value is null. + /// + [JsonProperty(PropertyName = "properties.externalId")] + public string ExternalId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameConfiguration.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameConfiguration.cs new file mode 100644 index 000000000000..f711a1f0c461 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameConfiguration.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Custom hostname configuration. + /// + public partial class HostnameConfiguration + { + /// + /// Initializes a new instance of the HostnameConfiguration class. + /// + public HostnameConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HostnameConfiguration class. + /// + /// Hostname type. Possible values include: 'Proxy', + /// 'Portal', 'Management', 'Scm' + /// Hostname to configure on the Api Management + /// service. + /// Base64 Encoded + /// certificate. + /// Certificate Password. + /// Specify true to always + /// negotiate client certificate on the hostname. Default Value is + /// false. + /// Certificate information. + public HostnameConfiguration(HostnameType type, string hostName, string encodedCertificate = default(string), string certificatePassword = default(string), bool? negotiateClientCertificate = default(bool?), CertificateInformation certificate = default(CertificateInformation)) + { + Type = type; + HostName = hostName; + EncodedCertificate = encodedCertificate; + CertificatePassword = certificatePassword; + NegotiateClientCertificate = negotiateClientCertificate; + Certificate = certificate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets hostname type. Possible values include: 'Proxy', + /// 'Portal', 'Management', 'Scm' + /// + [JsonProperty(PropertyName = "type")] + public HostnameType Type { get; set; } + + /// + /// Gets or sets hostname to configure on the Api Management service. + /// + [JsonProperty(PropertyName = "hostName")] + public string HostName { get; set; } + + /// + /// Gets or sets base64 Encoded certificate. + /// + [JsonProperty(PropertyName = "encodedCertificate")] + public string EncodedCertificate { get; set; } + + /// + /// Gets or sets certificate Password. + /// + [JsonProperty(PropertyName = "certificatePassword")] + public string CertificatePassword { get; set; } + + /// + /// Gets or sets specify true to always negotiate client certificate on + /// the hostname. Default Value is false. + /// + [JsonProperty(PropertyName = "negotiateClientCertificate")] + public bool? NegotiateClientCertificate { get; set; } + + /// + /// Gets certificate information. + /// + [JsonProperty(PropertyName = "certificate")] + public CertificateInformation Certificate { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (HostName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "HostName"); + } + if (Certificate != null) + { + Certificate.Validate(); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameType.cs new file mode 100644 index 000000000000..8da3aa034d28 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/HostnameType.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for HostnameType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum HostnameType + { + [EnumMember(Value = "Proxy")] + Proxy, + [EnumMember(Value = "Portal")] + Portal, + [EnumMember(Value = "Management")] + Management, + [EnumMember(Value = "Scm")] + Scm + } + internal static class HostnameTypeEnumExtension + { + internal static string ToSerializedValue(this HostnameType? value) => + value == null ? null : ((HostnameType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this HostnameType value) + { + switch( value ) + { + case HostnameType.Proxy: + return "Proxy"; + case HostnameType.Portal: + return "Portal"; + case HostnameType.Management: + return "Management"; + case HostnameType.Scm: + return "Scm"; + } + return null; + } + + internal static HostnameType? ParseHostnameType(this string value) + { + switch( value ) + { + case "Proxy": + return HostnameType.Proxy; + case "Portal": + return HostnameType.Portal; + case "Management": + return HostnameType.Management; + case "Scm": + return HostnameType.Scm; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderBaseParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderBaseParameters.cs new file mode 100644 index 000000000000..e53bb3eb63eb --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderBaseParameters.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Identity Provider Base Parameter Properties. + /// + public partial class IdentityProviderBaseParameters + { + /// + /// Initializes a new instance of the IdentityProviderBaseParameters + /// class. + /// + public IdentityProviderBaseParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityProviderBaseParameters + /// class. + /// + /// Identity Provider Type identifier. Possible + /// values include: 'facebook', 'google', 'microsoft', 'twitter', + /// 'aad', 'aadB2C' + /// List of Allowed Tenants when + /// configuring Azure Active Directory login. + /// Signup Policy Name. Only applies to + /// AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to + /// AAD B2C Identity Provider. + /// Profile Editing Policy Name. + /// Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. + /// Only applies to AAD B2C Identity Provider. + public IdentityProviderBaseParameters(IdentityProviderType? type = default(IdentityProviderType?), IList allowedTenants = default(IList), string signupPolicyName = default(string), string signinPolicyName = default(string), string profileEditingPolicyName = default(string), string passwordResetPolicyName = default(string)) + { + Type = type; + AllowedTenants = allowedTenants; + SignupPolicyName = signupPolicyName; + SigninPolicyName = signinPolicyName; + ProfileEditingPolicyName = profileEditingPolicyName; + PasswordResetPolicyName = passwordResetPolicyName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity Provider Type identifier. Possible values + /// include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', + /// 'aadB2C' + /// + [JsonProperty(PropertyName = "type")] + public IdentityProviderType? Type { get; set; } + + /// + /// Gets or sets list of Allowed Tenants when configuring Azure Active + /// Directory login. + /// + [JsonProperty(PropertyName = "allowedTenants")] + public IList AllowedTenants { get; set; } + + /// + /// Gets or sets signup Policy Name. Only applies to AAD B2C Identity + /// Provider. + /// + [JsonProperty(PropertyName = "signupPolicyName")] + public string SignupPolicyName { get; set; } + + /// + /// Gets or sets signin Policy Name. Only applies to AAD B2C Identity + /// Provider. + /// + [JsonProperty(PropertyName = "signinPolicyName")] + public string SigninPolicyName { get; set; } + + /// + /// Gets or sets profile Editing Policy Name. Only applies to AAD B2C + /// Identity Provider. + /// + [JsonProperty(PropertyName = "profileEditingPolicyName")] + public string ProfileEditingPolicyName { get; set; } + + /// + /// Gets or sets password Reset Policy Name. Only applies to AAD B2C + /// Identity Provider. + /// + [JsonProperty(PropertyName = "passwordResetPolicyName")] + public string PasswordResetPolicyName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AllowedTenants != null) + { + if (AllowedTenants.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "AllowedTenants", 32); + } + } + if (SignupPolicyName != null) + { + if (SignupPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SignupPolicyName", 1); + } + } + if (SigninPolicyName != null) + { + if (SigninPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SigninPolicyName", 1); + } + } + if (ProfileEditingPolicyName != null) + { + if (ProfileEditingPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ProfileEditingPolicyName", 1); + } + } + if (PasswordResetPolicyName != null) + { + if (PasswordResetPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PasswordResetPolicyName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderContract.cs new file mode 100644 index 000000000000..28e16add3e4a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderContract.cs @@ -0,0 +1,208 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Identity Provider details. + /// + [Rest.Serialization.JsonTransformation] + public partial class IdentityProviderContract : Resource + { + /// + /// Initializes a new instance of the IdentityProviderContract class. + /// + public IdentityProviderContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityProviderContract class. + /// + /// Client Id of the Application in the external + /// Identity Provider. It is App ID for Facebook login, Client ID for + /// Google login, App ID for Microsoft. + /// Client secret of the Application in + /// external Identity Provider, used to authenticate login request. For + /// example, it is App Secret for Facebook login, API Key for Google + /// login, Public Key for Microsoft. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Identity Provider Type + /// identifier. Possible values include: 'facebook', 'google', + /// 'microsoft', 'twitter', 'aad', 'aadB2C' + /// List of Allowed Tenants when + /// configuring Azure Active Directory login. + /// Signup Policy Name. Only applies to + /// AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to + /// AAD B2C Identity Provider. + /// Profile Editing Policy Name. + /// Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. + /// Only applies to AAD B2C Identity Provider. + public IdentityProviderContract(string clientId, string clientSecret, string id = default(string), string name = default(string), string type = default(string), IdentityProviderType? identityProviderContractType = default(IdentityProviderType?), IList allowedTenants = default(IList), string signupPolicyName = default(string), string signinPolicyName = default(string), string profileEditingPolicyName = default(string), string passwordResetPolicyName = default(string)) + : base(id, name, type) + { + IdentityProviderContractType = identityProviderContractType; + AllowedTenants = allowedTenants; + SignupPolicyName = signupPolicyName; + SigninPolicyName = signinPolicyName; + ProfileEditingPolicyName = profileEditingPolicyName; + PasswordResetPolicyName = passwordResetPolicyName; + ClientId = clientId; + ClientSecret = clientSecret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity Provider Type identifier. Possible values + /// include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', + /// 'aadB2C' + /// + [JsonProperty(PropertyName = "properties.type")] + public IdentityProviderType? IdentityProviderContractType { get; set; } + + /// + /// Gets or sets list of Allowed Tenants when configuring Azure Active + /// Directory login. + /// + [JsonProperty(PropertyName = "properties.allowedTenants")] + public IList AllowedTenants { get; set; } + + /// + /// Gets or sets signup Policy Name. Only applies to AAD B2C Identity + /// Provider. + /// + [JsonProperty(PropertyName = "properties.signupPolicyName")] + public string SignupPolicyName { get; set; } + + /// + /// Gets or sets signin Policy Name. Only applies to AAD B2C Identity + /// Provider. + /// + [JsonProperty(PropertyName = "properties.signinPolicyName")] + public string SigninPolicyName { get; set; } + + /// + /// Gets or sets profile Editing Policy Name. Only applies to AAD B2C + /// Identity Provider. + /// + [JsonProperty(PropertyName = "properties.profileEditingPolicyName")] + public string ProfileEditingPolicyName { get; set; } + + /// + /// Gets or sets password Reset Policy Name. Only applies to AAD B2C + /// Identity Provider. + /// + [JsonProperty(PropertyName = "properties.passwordResetPolicyName")] + public string PasswordResetPolicyName { get; set; } + + /// + /// Gets or sets client Id of the Application in the external Identity + /// Provider. It is App ID for Facebook login, Client ID for Google + /// login, App ID for Microsoft. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets client secret of the Application in external Identity + /// Provider, used to authenticate login request. For example, it is + /// App Secret for Facebook login, API Key for Google login, Public Key + /// for Microsoft. + /// + [JsonProperty(PropertyName = "properties.clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + if (ClientSecret == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientSecret"); + } + if (AllowedTenants != null) + { + if (AllowedTenants.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "AllowedTenants", 32); + } + } + if (SignupPolicyName != null) + { + if (SignupPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SignupPolicyName", 1); + } + } + if (SigninPolicyName != null) + { + if (SigninPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SigninPolicyName", 1); + } + } + if (ProfileEditingPolicyName != null) + { + if (ProfileEditingPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ProfileEditingPolicyName", 1); + } + } + if (PasswordResetPolicyName != null) + { + if (PasswordResetPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PasswordResetPolicyName", 1); + } + } + if (ClientId != null) + { + if (ClientId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ClientId", 1); + } + } + if (ClientSecret != null) + { + if (ClientSecret.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ClientSecret", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderGetHeaders.cs new file mode 100644 index 000000000000..971058a9e83d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class IdentityProviderGetHeaders + { + /// + /// Initializes a new instance of the IdentityProviderGetHeaders class. + /// + public IdentityProviderGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityProviderGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public IdentityProviderGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderList.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderList.cs new file mode 100644 index 000000000000..9632ed2610e8 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderList.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of all the Identity Providers configured on the service instance. + /// + public partial class IdentityProviderList + { + /// + /// Initializes a new instance of the IdentityProviderList class. + /// + public IdentityProviderList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityProviderList class. + /// + /// Identity Provider configuration values. + /// Next page link if any. + public IdentityProviderList(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity Provider configuration values. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets next page link if any. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderType.cs new file mode 100644 index 000000000000..1e681363ef34 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderType.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for IdentityProviderType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum IdentityProviderType + { + [EnumMember(Value = "facebook")] + Facebook, + [EnumMember(Value = "google")] + Google, + [EnumMember(Value = "microsoft")] + Microsoft, + [EnumMember(Value = "twitter")] + Twitter, + [EnumMember(Value = "aad")] + Aad, + [EnumMember(Value = "aadB2C")] + AadB2C + } + internal static class IdentityProviderTypeEnumExtension + { + internal static string ToSerializedValue(this IdentityProviderType? value) => + value == null ? null : ((IdentityProviderType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this IdentityProviderType value) + { + switch( value ) + { + case IdentityProviderType.Facebook: + return "facebook"; + case IdentityProviderType.Google: + return "google"; + case IdentityProviderType.Microsoft: + return "microsoft"; + case IdentityProviderType.Twitter: + return "twitter"; + case IdentityProviderType.Aad: + return "aad"; + case IdentityProviderType.AadB2C: + return "aadB2C"; + } + return null; + } + + internal static IdentityProviderType? ParseIdentityProviderType(this string value) + { + switch( value ) + { + case "facebook": + return IdentityProviderType.Facebook; + case "google": + return IdentityProviderType.Google; + case "microsoft": + return IdentityProviderType.Microsoft; + case "twitter": + return IdentityProviderType.Twitter; + case "aad": + return IdentityProviderType.Aad; + case "aadB2C": + return IdentityProviderType.AadB2C; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderUpdateParameters.cs new file mode 100644 index 000000000000..6d16555e6688 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/IdentityProviderUpdateParameters.cs @@ -0,0 +1,197 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parameters supplied to update Identity Provider + /// + [Rest.Serialization.JsonTransformation] + public partial class IdentityProviderUpdateParameters + { + /// + /// Initializes a new instance of the IdentityProviderUpdateParameters + /// class. + /// + public IdentityProviderUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityProviderUpdateParameters + /// class. + /// + /// Identity Provider Type identifier. Possible + /// values include: 'facebook', 'google', 'microsoft', 'twitter', + /// 'aad', 'aadB2C' + /// List of Allowed Tenants when + /// configuring Azure Active Directory login. + /// Signup Policy Name. Only applies to + /// AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to + /// AAD B2C Identity Provider. + /// Profile Editing Policy Name. + /// Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. + /// Only applies to AAD B2C Identity Provider. + /// Client Id of the Application in the external + /// Identity Provider. It is App ID for Facebook login, Client ID for + /// Google login, App ID for Microsoft. + /// Client secret of the Application in + /// external Identity Provider, used to authenticate login request. For + /// example, it is App Secret for Facebook login, API Key for Google + /// login, Public Key for Microsoft. + public IdentityProviderUpdateParameters(IdentityProviderType? type = default(IdentityProviderType?), IList allowedTenants = default(IList), string signupPolicyName = default(string), string signinPolicyName = default(string), string profileEditingPolicyName = default(string), string passwordResetPolicyName = default(string), string clientId = default(string), string clientSecret = default(string)) + { + Type = type; + AllowedTenants = allowedTenants; + SignupPolicyName = signupPolicyName; + SigninPolicyName = signinPolicyName; + ProfileEditingPolicyName = profileEditingPolicyName; + PasswordResetPolicyName = passwordResetPolicyName; + ClientId = clientId; + ClientSecret = clientSecret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity Provider Type identifier. Possible values + /// include: 'facebook', 'google', 'microsoft', 'twitter', 'aad', + /// 'aadB2C' + /// + [JsonProperty(PropertyName = "properties.type")] + public IdentityProviderType? Type { get; set; } + + /// + /// Gets or sets list of Allowed Tenants when configuring Azure Active + /// Directory login. + /// + [JsonProperty(PropertyName = "properties.allowedTenants")] + public IList AllowedTenants { get; set; } + + /// + /// Gets or sets signup Policy Name. Only applies to AAD B2C Identity + /// Provider. + /// + [JsonProperty(PropertyName = "properties.signupPolicyName")] + public string SignupPolicyName { get; set; } + + /// + /// Gets or sets signin Policy Name. Only applies to AAD B2C Identity + /// Provider. + /// + [JsonProperty(PropertyName = "properties.signinPolicyName")] + public string SigninPolicyName { get; set; } + + /// + /// Gets or sets profile Editing Policy Name. Only applies to AAD B2C + /// Identity Provider. + /// + [JsonProperty(PropertyName = "properties.profileEditingPolicyName")] + public string ProfileEditingPolicyName { get; set; } + + /// + /// Gets or sets password Reset Policy Name. Only applies to AAD B2C + /// Identity Provider. + /// + [JsonProperty(PropertyName = "properties.passwordResetPolicyName")] + public string PasswordResetPolicyName { get; set; } + + /// + /// Gets or sets client Id of the Application in the external Identity + /// Provider. It is App ID for Facebook login, Client ID for Google + /// login, App ID for Microsoft. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets client secret of the Application in external Identity + /// Provider, used to authenticate login request. For example, it is + /// App Secret for Facebook login, API Key for Google login, Public Key + /// for Microsoft. + /// + [JsonProperty(PropertyName = "properties.clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AllowedTenants != null) + { + if (AllowedTenants.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "AllowedTenants", 32); + } + } + if (SignupPolicyName != null) + { + if (SignupPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SignupPolicyName", 1); + } + } + if (SigninPolicyName != null) + { + if (SigninPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SigninPolicyName", 1); + } + } + if (ProfileEditingPolicyName != null) + { + if (ProfileEditingPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ProfileEditingPolicyName", 1); + } + } + if (PasswordResetPolicyName != null) + { + if (PasswordResetPolicyName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PasswordResetPolicyName", 1); + } + } + if (ClientId != null) + { + if (ClientId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ClientId", 1); + } + } + if (ClientSecret != null) + { + if (ClientSecret.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "ClientSecret", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/KeyType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/KeyType.cs new file mode 100644 index 000000000000..dc3951d58997 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/KeyType.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for KeyType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KeyType + { + [EnumMember(Value = "primary")] + Primary, + [EnumMember(Value = "secondary")] + Secondary + } + internal static class KeyTypeEnumExtension + { + internal static string ToSerializedValue(this KeyType? value) => + value == null ? null : ((KeyType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this KeyType value) + { + switch( value ) + { + case KeyType.Primary: + return "primary"; + case KeyType.Secondary: + return "secondary"; + } + return null; + } + + internal static KeyType? ParseKeyType(this string value) + { + switch( value ) + { + case "primary": + return KeyType.Primary; + case "secondary": + return KeyType.Secondary; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerContract.cs new file mode 100644 index 000000000000..2456e61e03a4 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerContract.cs @@ -0,0 +1,115 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Logger details. + /// + [Rest.Serialization.JsonTransformation] + public partial class LoggerContract : Resource + { + /// + /// Initializes a new instance of the LoggerContract class. + /// + public LoggerContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LoggerContract class. + /// + /// The name and SendRule connection string + /// of the event hub. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Logger description. + /// Whether records are buffered in the logger + /// before publishing. Default is assumed to be true. + public LoggerContract(IDictionary credentials, string id = default(string), string name = default(string), string type = default(string), string description = default(string), bool? isBuffered = default(bool?)) + : base(id, name, type) + { + Description = description; + Credentials = credentials; + IsBuffered = isBuffered; + CustomInit(); + } + /// + /// Static constructor for LoggerContract class. + /// + static LoggerContract() + { + LoggerType = "azureEventHub"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets logger description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets the name and SendRule connection string of the event + /// hub. + /// + [JsonProperty(PropertyName = "properties.credentials")] + public IDictionary Credentials { get; set; } + + /// + /// Gets or sets whether records are buffered in the logger before + /// publishing. Default is assumed to be true. + /// + [JsonProperty(PropertyName = "properties.isBuffered")] + public bool? IsBuffered { get; set; } + + /// + /// Logger type. + /// + [JsonProperty(PropertyName = "properties.loggerType")] + public static string LoggerType { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Credentials == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Credentials"); + } + if (Description != null) + { + if (Description.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 256); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerGetHeaders.cs new file mode 100644 index 000000000000..72d9689546d9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class LoggerGetHeaders + { + /// + /// Initializes a new instance of the LoggerGetHeaders class. + /// + public LoggerGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LoggerGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public LoggerGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerType.cs new file mode 100644 index 000000000000..7e59bddd5652 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerType.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for LoggerType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum LoggerType + { + [EnumMember(Value = "azureEventHub")] + AzureEventHub + } + internal static class LoggerTypeEnumExtension + { + internal static string ToSerializedValue(this LoggerType? value) => + value == null ? null : ((LoggerType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this LoggerType value) + { + switch( value ) + { + case LoggerType.AzureEventHub: + return "azureEventHub"; + } + return null; + } + + internal static LoggerType? ParseLoggerType(this string value) + { + switch( value ) + { + case "azureEventHub": + return LoggerType.AzureEventHub; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerUpdateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerUpdateContract.cs new file mode 100644 index 000000000000..24f463969968 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/LoggerUpdateContract.cs @@ -0,0 +1,84 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Logger update contract. + /// + [Rest.Serialization.JsonTransformation] + public partial class LoggerUpdateContract + { + /// + /// Initializes a new instance of the LoggerUpdateContract class. + /// + public LoggerUpdateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LoggerUpdateContract class. + /// + /// Logger type. Possible values include: + /// 'azureEventHub' + /// Logger description. + /// Logger credentials. + /// Whether records are buffered in the logger + /// before publishing. Default is assumed to be true. + public LoggerUpdateContract(LoggerType? loggerType = default(LoggerType?), string description = default(string), IDictionary credentials = default(IDictionary), bool? isBuffered = default(bool?)) + { + LoggerType = loggerType; + Description = description; + Credentials = credentials; + IsBuffered = isBuffered; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets logger type. Possible values include: 'azureEventHub' + /// + [JsonProperty(PropertyName = "properties.loggerType")] + public LoggerType? LoggerType { get; set; } + + /// + /// Gets or sets logger description. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets logger credentials. + /// + [JsonProperty(PropertyName = "properties.credentials")] + public IDictionary Credentials { get; set; } + + /// + /// Gets or sets whether records are buffered in the logger before + /// publishing. Default is assumed to be true. + /// + [JsonProperty(PropertyName = "properties.isBuffered")] + public bool? IsBuffered { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NameAvailabilityReason.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NameAvailabilityReason.cs new file mode 100644 index 000000000000..23709a97e2da --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NameAvailabilityReason.cs @@ -0,0 +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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for NameAvailabilityReason. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum NameAvailabilityReason + { + [EnumMember(Value = "Valid")] + Valid, + [EnumMember(Value = "Invalid")] + Invalid, + [EnumMember(Value = "AlreadyExists")] + AlreadyExists + } + internal static class NameAvailabilityReasonEnumExtension + { + internal static string ToSerializedValue(this NameAvailabilityReason? value) => + value == null ? null : ((NameAvailabilityReason)value).ToSerializedValue(); + + internal static string ToSerializedValue(this NameAvailabilityReason value) + { + switch( value ) + { + case NameAvailabilityReason.Valid: + return "Valid"; + case NameAvailabilityReason.Invalid: + return "Invalid"; + case NameAvailabilityReason.AlreadyExists: + return "AlreadyExists"; + } + return null; + } + + internal static NameAvailabilityReason? ParseNameAvailabilityReason(this string value) + { + switch( value ) + { + case "Valid": + return NameAvailabilityReason.Valid; + case "Invalid": + return NameAvailabilityReason.Invalid; + case "AlreadyExists": + return NameAvailabilityReason.AlreadyExists; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NetworkStatusContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NetworkStatusContract.cs new file mode 100644 index 000000000000..d3cce8ae55fe --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/NetworkStatusContract.cs @@ -0,0 +1,93 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Network Status details. + /// + public partial class NetworkStatusContract + { + /// + /// Initializes a new instance of the NetworkStatusContract class. + /// + public NetworkStatusContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetworkStatusContract class. + /// + /// Gets the list of DNS servers IPV4 + /// addresses. + /// Gets the list of Connectivity + /// Status to the Resources on which the service depends upon. + public NetworkStatusContract(IList dnsServers, IList connectivityStatus) + { + DnsServers = dnsServers; + ConnectivityStatus = connectivityStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the list of DNS servers IPV4 addresses. + /// + [JsonProperty(PropertyName = "dnsServers")] + public IList DnsServers { get; set; } + + /// + /// Gets the list of Connectivity Status to the Resources on which the + /// service depends upon. + /// + [JsonProperty(PropertyName = "connectivityStatus")] + public IList ConnectivityStatus { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DnsServers == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DnsServers"); + } + if (ConnectivityStatus == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectivityStatus"); + } + if (ConnectivityStatus != null) + { + foreach (var element in ConnectivityStatus) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OAuth2AuthenticationSettingsContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OAuth2AuthenticationSettingsContract.cs new file mode 100644 index 000000000000..a3dab5dada76 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OAuth2AuthenticationSettingsContract.cs @@ -0,0 +1,63 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// API OAuth2 Authentication settings details. + /// + public partial class OAuth2AuthenticationSettingsContract + { + /// + /// Initializes a new instance of the + /// OAuth2AuthenticationSettingsContract class. + /// + public OAuth2AuthenticationSettingsContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// OAuth2AuthenticationSettingsContract class. + /// + /// OAuth authorization server + /// identifier. + /// operations scope. + public OAuth2AuthenticationSettingsContract(string authorizationServerId = default(string), string scope = default(string)) + { + AuthorizationServerId = authorizationServerId; + Scope = scope; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oAuth authorization server identifier. + /// + [JsonProperty(PropertyName = "authorizationServerId")] + public string AuthorizationServerId { get; set; } + + /// + /// Gets or sets operations scope. + /// + [JsonProperty(PropertyName = "scope")] + public string Scope { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenIdConnectProviderGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenIdConnectProviderGetHeaders.cs new file mode 100644 index 000000000000..fb4af5ce95ec --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenIdConnectProviderGetHeaders.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class OpenIdConnectProviderGetHeaders + { + /// + /// Initializes a new instance of the OpenIdConnectProviderGetHeaders + /// class. + /// + public OpenIdConnectProviderGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OpenIdConnectProviderGetHeaders + /// class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public OpenIdConnectProviderGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderContract.cs new file mode 100644 index 000000000000..ab4f6a24b8d0 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderContract.cs @@ -0,0 +1,128 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// OpenId Connect Provider details. + /// + [Rest.Serialization.JsonTransformation] + public partial class OpenidConnectProviderContract : Resource + { + /// + /// Initializes a new instance of the OpenidConnectProviderContract + /// class. + /// + public OpenidConnectProviderContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OpenidConnectProviderContract + /// class. + /// + /// User-friendly OpenID Connect Provider + /// name. + /// Metadata endpoint URI. + /// Client ID of developer console which is the + /// client application. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// User-friendly description of OpenID + /// Connect Provider. + /// Client Secret of developer console which + /// is the client application. + public OpenidConnectProviderContract(string displayName, string metadataEndpoint, string clientId, string id = default(string), string name = default(string), string type = default(string), string description = default(string), string clientSecret = default(string)) + : base(id, name, type) + { + DisplayName = displayName; + Description = description; + MetadataEndpoint = metadataEndpoint; + ClientId = clientId; + ClientSecret = clientSecret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user-friendly OpenID Connect Provider name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets user-friendly description of OpenID Connect Provider. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets metadata endpoint URI. + /// + [JsonProperty(PropertyName = "properties.metadataEndpoint")] + public string MetadataEndpoint { get; set; } + + /// + /// Gets or sets client ID of developer console which is the client + /// application. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets client Secret of developer console which is the client + /// application. + /// + [JsonProperty(PropertyName = "properties.clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (MetadataEndpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MetadataEndpoint"); + } + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + if (DisplayName != null) + { + if (DisplayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 50); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderUpdateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderUpdateContract.cs new file mode 100644 index 000000000000..4e4cfa51753e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OpenidConnectProviderUpdateContract.cs @@ -0,0 +1,111 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Update OpenID Connect Provider operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class OpenidConnectProviderUpdateContract + { + /// + /// Initializes a new instance of the + /// OpenidConnectProviderUpdateContract class. + /// + public OpenidConnectProviderUpdateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// OpenidConnectProviderUpdateContract class. + /// + /// User-friendly OpenID Connect Provider + /// name. + /// User-friendly description of OpenID + /// Connect Provider. + /// Metadata endpoint URI. + /// Client ID of developer console which is the + /// client application. + /// Client Secret of developer console which + /// is the client application. + public OpenidConnectProviderUpdateContract(string displayName = default(string), string description = default(string), string metadataEndpoint = default(string), string clientId = default(string), string clientSecret = default(string)) + { + DisplayName = displayName; + Description = description; + MetadataEndpoint = metadataEndpoint; + ClientId = clientId; + ClientSecret = clientSecret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user-friendly OpenID Connect Provider name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets user-friendly description of OpenID Connect Provider. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets metadata endpoint URI. + /// + [JsonProperty(PropertyName = "properties.metadataEndpoint")] + public string MetadataEndpoint { get; set; } + + /// + /// Gets or sets client ID of developer console which is the client + /// application. + /// + [JsonProperty(PropertyName = "properties.clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets client Secret of developer console which is the client + /// application. + /// + [JsonProperty(PropertyName = "properties.clientSecret")] + public string ClientSecret { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName != null) + { + if (DisplayName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 50); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Operation.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Operation.cs new file mode 100644 index 000000000000..a77ae8c60bee --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// 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}/{operation} + /// The object that describes 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 or sets operation name: {provider}/{resource}/{operation} + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the object that describes the operation. + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationContract.cs new file mode 100644 index 000000000000..96dea028e7b6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationContract.cs @@ -0,0 +1,197 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Api Operation details. + /// + [Rest.Serialization.JsonTransformation] + public partial class OperationContract : Resource + { + /// + /// Initializes a new instance of the OperationContract class. + /// + public OperationContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationContract class. + /// + /// Operation Name. + /// A Valid HTTP Operation Method. Typical Http + /// Methods like GET, PUT, POST but not limited by only them. + /// Relative URL template identifying the + /// target resource for this operation. May include parameters. + /// Example: /customers/{cid}/orders/{oid}/?date={date} + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Collection of URL template + /// parameters. + /// Description of the operation. May include + /// HTML formatting tags. + /// An entity containing request details. + /// Array of Operation responses. + /// Operation Policies + public OperationContract(string displayName, string method, string urlTemplate, string id = default(string), string name = default(string), string type = default(string), IList templateParameters = default(IList), string description = default(string), RequestContract request = default(RequestContract), IList responses = default(IList), string policies = default(string)) + : base(id, name, type) + { + TemplateParameters = templateParameters; + Description = description; + Request = request; + Responses = responses; + Policies = policies; + DisplayName = displayName; + Method = method; + UrlTemplate = urlTemplate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets collection of URL template parameters. + /// + [JsonProperty(PropertyName = "properties.templateParameters")] + public IList TemplateParameters { get; set; } + + /// + /// Gets or sets description of the operation. May include HTML + /// formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets an entity containing request details. + /// + [JsonProperty(PropertyName = "properties.request")] + public RequestContract Request { get; set; } + + /// + /// Gets or sets array of Operation responses. + /// + [JsonProperty(PropertyName = "properties.responses")] + public IList Responses { get; set; } + + /// + /// Gets or sets operation Policies + /// + [JsonProperty(PropertyName = "properties.policies")] + public string Policies { get; set; } + + /// + /// Gets or sets operation Name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets a Valid HTTP Operation Method. Typical Http Methods + /// like GET, PUT, POST but not limited by only them. + /// + [JsonProperty(PropertyName = "properties.method")] + public string Method { get; set; } + + /// + /// Gets or sets relative URL template identifying the target resource + /// for this operation. May include parameters. Example: + /// /customers/{cid}/orders/{oid}/?date={date} + /// + [JsonProperty(PropertyName = "properties.urlTemplate")] + public string UrlTemplate { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (Method == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Method"); + } + if (UrlTemplate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UrlTemplate"); + } + if (TemplateParameters != null) + { + foreach (var element in TemplateParameters) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + } + if (Responses != null) + { + foreach (var element1 in Responses) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (UrlTemplate != null) + { + if (UrlTemplate.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "UrlTemplate", 1000); + } + if (UrlTemplate.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "UrlTemplate", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationDisplay.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..3eb358ceb3ed --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationDisplay.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The object that describes 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. + /// + /// Friendly name of the resource + /// provider + /// Operation type: read, write, delete, + /// listKeys/action, etc. + /// Resource type on which the operation is + /// performed. + /// Friendly name of the operation + public OperationDisplay(string provider = default(string), string operation = default(string), string resource = default(string), string description = default(string)) + { + Provider = provider; + Operation = operation; + Resource = resource; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets friendly name of the resource provider + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets operation type: read, write, delete, listKeys/action, + /// etc. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + /// + /// Gets or sets resource type on which the operation is performed. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets friendly name of the operation + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationEntityBaseContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationEntityBaseContract.cs new file mode 100644 index 000000000000..2067617887e6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationEntityBaseContract.cs @@ -0,0 +1,128 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Api Operation Entity Base Contract details. + /// + public partial class OperationEntityBaseContract + { + /// + /// Initializes a new instance of the OperationEntityBaseContract + /// class. + /// + public OperationEntityBaseContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationEntityBaseContract + /// class. + /// + /// Collection of URL template + /// parameters. + /// Description of the operation. May include + /// HTML formatting tags. + /// An entity containing request details. + /// Array of Operation responses. + /// Operation Policies + public OperationEntityBaseContract(IList templateParameters = default(IList), string description = default(string), RequestContract request = default(RequestContract), IList responses = default(IList), string policies = default(string)) + { + TemplateParameters = templateParameters; + Description = description; + Request = request; + Responses = responses; + Policies = policies; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets collection of URL template parameters. + /// + [JsonProperty(PropertyName = "templateParameters")] + public IList TemplateParameters { get; set; } + + /// + /// Gets or sets description of the operation. May include HTML + /// formatting tags. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets an entity containing request details. + /// + [JsonProperty(PropertyName = "request")] + public RequestContract Request { get; set; } + + /// + /// Gets or sets array of Operation responses. + /// + [JsonProperty(PropertyName = "responses")] + public IList Responses { get; set; } + + /// + /// Gets or sets operation Policies + /// + [JsonProperty(PropertyName = "policies")] + public string Policies { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TemplateParameters != null) + { + foreach (var element in TemplateParameters) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + } + if (Responses != null) + { + foreach (var element1 in Responses) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationResultContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationResultContract.cs new file mode 100644 index 000000000000..f886ae8e6b1e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationResultContract.cs @@ -0,0 +1,106 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Operation Result. + /// + public partial class OperationResultContract + { + /// + /// Initializes a new instance of the OperationResultContract class. + /// + public OperationResultContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationResultContract class. + /// + /// Operation result identifier. + /// Status of an async operation. Possible values + /// include: 'Started', 'InProgress', 'Succeeded', 'Failed' + /// Start time of an async operation. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// Last update time of an async operation. The + /// date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// Optional result info. + /// Error Body Contract + public OperationResultContract(string id = default(string), AsyncOperationStatus? status = default(AsyncOperationStatus?), System.DateTime? started = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), string resultInfo = default(string), ErrorResponse error = default(ErrorResponse)) + { + Id = id; + Status = status; + Started = started; + Updated = updated; + ResultInfo = resultInfo; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation result identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets status of an async operation. Possible values include: + /// 'Started', 'InProgress', 'Succeeded', 'Failed' + /// + [JsonProperty(PropertyName = "status")] + public AsyncOperationStatus? Status { get; set; } + + /// + /// Gets or sets start time of an async operation. The date conforms to + /// the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the + /// ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "started")] + public System.DateTime? Started { get; set; } + + /// + /// Gets or sets last update time of an async operation. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "updated")] + public System.DateTime? Updated { get; set; } + + /// + /// Gets or sets optional result info. + /// + [JsonProperty(PropertyName = "resultInfo")] + public string ResultInfo { get; set; } + + /// + /// Gets or sets error Body Contract + /// + [JsonProperty(PropertyName = "error")] + public ErrorResponse Error { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationUpdateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationUpdateContract.cs new file mode 100644 index 000000000000..fb4d2865fe45 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/OperationUpdateContract.cs @@ -0,0 +1,180 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Api Operation Update Contract details. + /// + [Rest.Serialization.JsonTransformation] + public partial class OperationUpdateContract + { + /// + /// Initializes a new instance of the OperationUpdateContract class. + /// + public OperationUpdateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationUpdateContract class. + /// + /// Collection of URL template + /// parameters. + /// Description of the operation. May include + /// HTML formatting tags. + /// An entity containing request details. + /// Array of Operation responses. + /// Operation Policies + /// Operation Name. + /// A Valid HTTP Operation Method. Typical Http + /// Methods like GET, PUT, POST but not limited by only them. + /// Relative URL template identifying the + /// target resource for this operation. May include parameters. + /// Example: /customers/{cid}/orders/{oid}/?date={date} + public OperationUpdateContract(IList templateParameters = default(IList), string description = default(string), RequestContract request = default(RequestContract), IList responses = default(IList), string policies = default(string), string displayName = default(string), string method = default(string), string urlTemplate = default(string)) + { + TemplateParameters = templateParameters; + Description = description; + Request = request; + Responses = responses; + Policies = policies; + DisplayName = displayName; + Method = method; + UrlTemplate = urlTemplate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets collection of URL template parameters. + /// + [JsonProperty(PropertyName = "properties.templateParameters")] + public IList TemplateParameters { get; set; } + + /// + /// Gets or sets description of the operation. May include HTML + /// formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets an entity containing request details. + /// + [JsonProperty(PropertyName = "properties.request")] + public RequestContract Request { get; set; } + + /// + /// Gets or sets array of Operation responses. + /// + [JsonProperty(PropertyName = "properties.responses")] + public IList Responses { get; set; } + + /// + /// Gets or sets operation Policies + /// + [JsonProperty(PropertyName = "properties.policies")] + public string Policies { get; set; } + + /// + /// Gets or sets operation Name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets a Valid HTTP Operation Method. Typical Http Methods + /// like GET, PUT, POST but not limited by only them. + /// + [JsonProperty(PropertyName = "properties.method")] + public string Method { get; set; } + + /// + /// Gets or sets relative URL template identifying the target resource + /// for this operation. May include parameters. Example: + /// /customers/{cid}/orders/{oid}/?date={date} + /// + [JsonProperty(PropertyName = "properties.urlTemplate")] + public string UrlTemplate { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TemplateParameters != null) + { + foreach (var element in TemplateParameters) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + } + if (Responses != null) + { + foreach (var element1 in Responses) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (UrlTemplate != null) + { + if (UrlTemplate.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "UrlTemplate", 1000); + } + if (UrlTemplate.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "UrlTemplate", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page.cs new file mode 100644 index 000000000000..3db7ae164529 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page1.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page1.cs new file mode 100644 index 000000000000..818b9a584894 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page1.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page1 : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("nextLink")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page2.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page2.cs new file mode 100644 index 000000000000..6e3cf5af96a5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Page2.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page2 : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ParameterContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ParameterContract.cs new file mode 100644 index 000000000000..a56d6418e5f4 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ParameterContract.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Operation parameters details. + /// + public partial class ParameterContract + { + /// + /// Initializes a new instance of the ParameterContract class. + /// + public ParameterContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParameterContract class. + /// + /// Parameter name. + /// Parameter type. + /// Parameter description. + /// Default parameter value. + /// whether parameter is required or + /// not. + /// Parameter values. + public ParameterContract(string name, string type, string description = default(string), string defaultValue = default(string), bool? required = default(bool?), IList values = default(IList)) + { + Name = name; + Description = description; + Type = type; + DefaultValue = defaultValue; + Required = required; + Values = values; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parameter name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets parameter description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets parameter type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets default parameter value. + /// + [JsonProperty(PropertyName = "defaultValue")] + public string DefaultValue { get; set; } + + /// + /// Gets or sets whether parameter is required or not. + /// + [JsonProperty(PropertyName = "required")] + public bool? Required { get; set; } + + /// + /// Gets or sets parameter values. + /// + [JsonProperty(PropertyName = "values")] + public IList Values { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyCollection.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyCollection.cs new file mode 100644 index 000000000000..f2562e58ec7b --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyCollection.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The response of the list policy operation. + /// + public partial class PolicyCollection + { + /// + /// Initializes a new instance of the PolicyCollection class. + /// + public PolicyCollection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolicyCollection class. + /// + /// Policy Contract value. + /// Next page link if any. + public PolicyCollection(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets policy Contract value. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets next page link if any. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyContract.cs new file mode 100644 index 000000000000..4dfc58689119 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyContract.cs @@ -0,0 +1,74 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Policy Contract details. + /// + [Rest.Serialization.JsonTransformation] + public partial class PolicyContract : Resource + { + /// + /// Initializes a new instance of the PolicyContract class. + /// + public PolicyContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolicyContract class. + /// + /// Xml Encoded contents of the + /// Policy. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + public PolicyContract(string policyContent, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + PolicyContent = policyContent; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets xml Encoded contents of the Policy. + /// + [JsonProperty(PropertyName = "properties.policyContent")] + public string PolicyContent { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PolicyContent == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PolicyContent"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyGetHeaders.cs new file mode 100644 index 000000000000..eadbf2245b5c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class PolicyGetHeaders + { + /// + /// Initializes a new instance of the PolicyGetHeaders class. + /// + public PolicyGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolicyGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public PolicyGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyScopeContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyScopeContract.cs new file mode 100644 index 000000000000..168c526d73e1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicyScopeContract.cs @@ -0,0 +1,77 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for PolicyScopeContract. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PolicyScopeContract + { + [EnumMember(Value = "Tenant")] + Tenant, + [EnumMember(Value = "Product")] + Product, + [EnumMember(Value = "Api")] + Api, + [EnumMember(Value = "Operation")] + Operation, + [EnumMember(Value = "All")] + All + } + internal static class PolicyScopeContractEnumExtension + { + internal static string ToSerializedValue(this PolicyScopeContract? value) => + value == null ? null : ((PolicyScopeContract)value).ToSerializedValue(); + + internal static string ToSerializedValue(this PolicyScopeContract value) + { + switch( value ) + { + case PolicyScopeContract.Tenant: + return "Tenant"; + case PolicyScopeContract.Product: + return "Product"; + case PolicyScopeContract.Api: + return "Api"; + case PolicyScopeContract.Operation: + return "Operation"; + case PolicyScopeContract.All: + return "All"; + } + return null; + } + + internal static PolicyScopeContract? ParsePolicyScopeContract(this string value) + { + switch( value ) + { + case "Tenant": + return PolicyScopeContract.Tenant; + case "Product": + return PolicyScopeContract.Product; + case "Api": + return PolicyScopeContract.Api; + case "Operation": + return PolicyScopeContract.Operation; + case "All": + return PolicyScopeContract.All; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetContract.cs new file mode 100644 index 000000000000..2942d2a6b98c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetContract.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Policy snippet. + /// + public partial class PolicySnippetContract + { + /// + /// Initializes a new instance of the PolicySnippetContract class. + /// + public PolicySnippetContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolicySnippetContract class. + /// + /// Snippet name. + /// Snippet content. + /// Snippet toolTip. + /// Binary OR value of the Snippet scope. + public PolicySnippetContract(string name = default(string), string content = default(string), string toolTip = default(string), int? scope = default(int?)) + { + Name = name; + Content = content; + ToolTip = toolTip; + Scope = scope; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets snippet name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets snippet content. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; private set; } + + /// + /// Gets snippet toolTip. + /// + [JsonProperty(PropertyName = "toolTip")] + public string ToolTip { get; private set; } + + /// + /// Gets binary OR value of the Snippet scope. + /// + [JsonProperty(PropertyName = "scope")] + public int? Scope { get; private set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetsCollection.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetsCollection.cs new file mode 100644 index 000000000000..45a8aaf9a9ff --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PolicySnippetsCollection.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The response of the list policy snippets operation. + /// + public partial class PolicySnippetsCollection + { + /// + /// Initializes a new instance of the PolicySnippetsCollection class. + /// + public PolicySnippetsCollection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolicySnippetsCollection class. + /// + /// Policy snippet value. + public PolicySnippetsCollection(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets policy snippet value. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductContract.cs new file mode 100644 index 000000000000..644b836fc0ce --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductContract.cs @@ -0,0 +1,190 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Product details. + /// + [Rest.Serialization.JsonTransformation] + public partial class ProductContract : Resource + { + /// + /// Initializes a new instance of the ProductContract class. + /// + public ProductContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProductContract class. + /// + /// Product name. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Product description. May include HTML + /// formatting tags. + /// Product terms of use. Developers trying to + /// subscribe to the product will be presented and required to accept + /// these terms before they can complete the subscription + /// process. + /// Whether a product subscription + /// is required for accessing APIs included in this product. If true, + /// the product is referred to as "protected" and a valid subscription + /// key is required for a request to an API included in the product to + /// succeed. If false, the product is referred to as "open" and + /// requests to an API included in the product can be made without a + /// subscription key. If property is omitted when creating a new + /// product it's value is assumed to be true. + /// whether subscription approval is + /// required. If false, new subscriptions will be approved + /// automatically enabling developers to call the product’s APIs + /// immediately after subscribing. If true, administrators must + /// manually approve the subscription before the developer can any of + /// the product’s APIs. Can be present only if subscriptionRequired + /// property is present and has a value of false. + /// Whether the number of + /// subscriptions a user can have to this product at the same time. Set + /// to null or omit to allow unlimited per user subscriptions. Can be + /// present only if subscriptionRequired property is present and has a + /// value of false. + /// whether product is published or not. Published + /// products are discoverable by users of developer portal. Non + /// published products are visible only to administrators. Default + /// state of Product is notPublished. Possible values include: + /// 'notPublished', 'published' + public ProductContract(string displayName, string id = default(string), string name = default(string), string type = default(string), string description = default(string), string terms = default(string), bool? subscriptionRequired = default(bool?), bool? approvalRequired = default(bool?), int? subscriptionsLimit = default(int?), ProductState? state = default(ProductState?)) + : base(id, name, type) + { + Description = description; + Terms = terms; + SubscriptionRequired = subscriptionRequired; + ApprovalRequired = approvalRequired; + SubscriptionsLimit = subscriptionsLimit; + State = state; + DisplayName = displayName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets product description. May include HTML formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets product terms of use. Developers trying to subscribe + /// to the product will be presented and required to accept these terms + /// before they can complete the subscription process. + /// + [JsonProperty(PropertyName = "properties.terms")] + public string Terms { get; set; } + + /// + /// Gets or sets whether a product subscription is required for + /// accessing APIs included in this product. If true, the product is + /// referred to as "protected" and a valid subscription key is required + /// for a request to an API included in the product to succeed. If + /// false, the product is referred to as "open" and requests to an API + /// included in the product can be made without a subscription key. If + /// property is omitted when creating a new product it's value is + /// assumed to be true. + /// + [JsonProperty(PropertyName = "properties.subscriptionRequired")] + public bool? SubscriptionRequired { get; set; } + + /// + /// Gets or sets whether subscription approval is required. If false, + /// new subscriptions will be approved automatically enabling + /// developers to call the product’s APIs immediately after + /// subscribing. If true, administrators must manually approve the + /// subscription before the developer can any of the product’s APIs. + /// Can be present only if subscriptionRequired property is present and + /// has a value of false. + /// + [JsonProperty(PropertyName = "properties.approvalRequired")] + public bool? ApprovalRequired { get; set; } + + /// + /// Gets or sets whether the number of subscriptions a user can have to + /// this product at the same time. Set to null or omit to allow + /// unlimited per user subscriptions. Can be present only if + /// subscriptionRequired property is present and has a value of false. + /// + [JsonProperty(PropertyName = "properties.subscriptionsLimit")] + public int? SubscriptionsLimit { get; set; } + + /// + /// Gets or sets whether product is published or not. Published + /// products are discoverable by users of developer portal. Non + /// published products are visible only to administrators. Default + /// state of Product is notPublished. Possible values include: + /// 'notPublished', 'published' + /// + [JsonProperty(PropertyName = "properties.state")] + public ProductState? State { get; set; } + + /// + /// Gets or sets product name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + if (Description.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Description", 1); + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 300); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductEntityBaseParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductEntityBaseParameters.cs new file mode 100644 index 000000000000..17138298b66d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductEntityBaseParameters.cs @@ -0,0 +1,162 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Product Entity Base Parameters + /// + public partial class ProductEntityBaseParameters + { + /// + /// Initializes a new instance of the ProductEntityBaseParameters + /// class. + /// + public ProductEntityBaseParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProductEntityBaseParameters + /// class. + /// + /// Product description. May include HTML + /// formatting tags. + /// Product terms of use. Developers trying to + /// subscribe to the product will be presented and required to accept + /// these terms before they can complete the subscription + /// process. + /// Whether a product subscription + /// is required for accessing APIs included in this product. If true, + /// the product is referred to as "protected" and a valid subscription + /// key is required for a request to an API included in the product to + /// succeed. If false, the product is referred to as "open" and + /// requests to an API included in the product can be made without a + /// subscription key. If property is omitted when creating a new + /// product it's value is assumed to be true. + /// whether subscription approval is + /// required. If false, new subscriptions will be approved + /// automatically enabling developers to call the product’s APIs + /// immediately after subscribing. If true, administrators must + /// manually approve the subscription before the developer can any of + /// the product’s APIs. Can be present only if subscriptionRequired + /// property is present and has a value of false. + /// Whether the number of + /// subscriptions a user can have to this product at the same time. Set + /// to null or omit to allow unlimited per user subscriptions. Can be + /// present only if subscriptionRequired property is present and has a + /// value of false. + /// whether product is published or not. Published + /// products are discoverable by users of developer portal. Non + /// published products are visible only to administrators. Default + /// state of Product is notPublished. Possible values include: + /// 'notPublished', 'published' + public ProductEntityBaseParameters(string description = default(string), string terms = default(string), bool? subscriptionRequired = default(bool?), bool? approvalRequired = default(bool?), int? subscriptionsLimit = default(int?), ProductState? state = default(ProductState?)) + { + Description = description; + Terms = terms; + SubscriptionRequired = subscriptionRequired; + ApprovalRequired = approvalRequired; + SubscriptionsLimit = subscriptionsLimit; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets product description. May include HTML formatting tags. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets product terms of use. Developers trying to subscribe + /// to the product will be presented and required to accept these terms + /// before they can complete the subscription process. + /// + [JsonProperty(PropertyName = "terms")] + public string Terms { get; set; } + + /// + /// Gets or sets whether a product subscription is required for + /// accessing APIs included in this product. If true, the product is + /// referred to as "protected" and a valid subscription key is required + /// for a request to an API included in the product to succeed. If + /// false, the product is referred to as "open" and requests to an API + /// included in the product can be made without a subscription key. If + /// property is omitted when creating a new product it's value is + /// assumed to be true. + /// + [JsonProperty(PropertyName = "subscriptionRequired")] + public bool? SubscriptionRequired { get; set; } + + /// + /// Gets or sets whether subscription approval is required. If false, + /// new subscriptions will be approved automatically enabling + /// developers to call the product’s APIs immediately after + /// subscribing. If true, administrators must manually approve the + /// subscription before the developer can any of the product’s APIs. + /// Can be present only if subscriptionRequired property is present and + /// has a value of false. + /// + [JsonProperty(PropertyName = "approvalRequired")] + public bool? ApprovalRequired { get; set; } + + /// + /// Gets or sets whether the number of subscriptions a user can have to + /// this product at the same time. Set to null or omit to allow + /// unlimited per user subscriptions. Can be present only if + /// subscriptionRequired property is present and has a value of false. + /// + [JsonProperty(PropertyName = "subscriptionsLimit")] + public int? SubscriptionsLimit { get; set; } + + /// + /// Gets or sets whether product is published or not. Published + /// products are discoverable by users of developer portal. Non + /// published products are visible only to administrators. Default + /// state of Product is notPublished. Possible values include: + /// 'notPublished', 'published' + /// + [JsonProperty(PropertyName = "state")] + public ProductState? State { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + if (Description.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Description", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductGetHeaders.cs new file mode 100644 index 000000000000..077453f5f0d2 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class ProductGetHeaders + { + /// + /// Initializes a new instance of the ProductGetHeaders class. + /// + public ProductGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProductGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ProductGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyGetHeaders.cs new file mode 100644 index 000000000000..b9f208807d53 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class ProductPolicyGetHeaders + { + /// + /// Initializes a new instance of the ProductPolicyGetHeaders class. + /// + public ProductPolicyGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProductPolicyGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ProductPolicyGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyListByProductHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyListByProductHeaders.cs new file mode 100644 index 000000000000..d11e01e3700d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductPolicyListByProductHeaders.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for ListByProduct operation. + /// + public partial class ProductPolicyListByProductHeaders + { + /// + /// Initializes a new instance of the ProductPolicyListByProductHeaders + /// class. + /// + public ProductPolicyListByProductHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProductPolicyListByProductHeaders + /// class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public ProductPolicyListByProductHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductState.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductState.cs new file mode 100644 index 000000000000..f626801f74dc --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductState.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ProductState. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ProductState + { + [EnumMember(Value = "notPublished")] + NotPublished, + [EnumMember(Value = "published")] + Published + } + internal static class ProductStateEnumExtension + { + internal static string ToSerializedValue(this ProductState? value) => + value == null ? null : ((ProductState)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ProductState value) + { + switch( value ) + { + case ProductState.NotPublished: + return "notPublished"; + case ProductState.Published: + return "published"; + } + return null; + } + + internal static ProductState? ParseProductState(this string value) + { + switch( value ) + { + case "notPublished": + return ProductState.NotPublished; + case "published": + return ProductState.Published; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductUpdateParameters.cs new file mode 100644 index 000000000000..ad504bb2d537 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ProductUpdateParameters.cs @@ -0,0 +1,181 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Product Update parameters. + /// + [Rest.Serialization.JsonTransformation] + public partial class ProductUpdateParameters + { + /// + /// Initializes a new instance of the ProductUpdateParameters class. + /// + public ProductUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProductUpdateParameters class. + /// + /// Product description. May include HTML + /// formatting tags. + /// Product terms of use. Developers trying to + /// subscribe to the product will be presented and required to accept + /// these terms before they can complete the subscription + /// process. + /// Whether a product subscription + /// is required for accessing APIs included in this product. If true, + /// the product is referred to as "protected" and a valid subscription + /// key is required for a request to an API included in the product to + /// succeed. If false, the product is referred to as "open" and + /// requests to an API included in the product can be made without a + /// subscription key. If property is omitted when creating a new + /// product it's value is assumed to be true. + /// whether subscription approval is + /// required. If false, new subscriptions will be approved + /// automatically enabling developers to call the product’s APIs + /// immediately after subscribing. If true, administrators must + /// manually approve the subscription before the developer can any of + /// the product’s APIs. Can be present only if subscriptionRequired + /// property is present and has a value of false. + /// Whether the number of + /// subscriptions a user can have to this product at the same time. Set + /// to null or omit to allow unlimited per user subscriptions. Can be + /// present only if subscriptionRequired property is present and has a + /// value of false. + /// whether product is published or not. Published + /// products are discoverable by users of developer portal. Non + /// published products are visible only to administrators. Default + /// state of Product is notPublished. Possible values include: + /// 'notPublished', 'published' + /// Product name. + public ProductUpdateParameters(string description = default(string), string terms = default(string), bool? subscriptionRequired = default(bool?), bool? approvalRequired = default(bool?), int? subscriptionsLimit = default(int?), ProductState? state = default(ProductState?), string name = default(string)) + { + Description = description; + Terms = terms; + SubscriptionRequired = subscriptionRequired; + ApprovalRequired = approvalRequired; + SubscriptionsLimit = subscriptionsLimit; + State = state; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets product description. May include HTML formatting tags. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets product terms of use. Developers trying to subscribe + /// to the product will be presented and required to accept these terms + /// before they can complete the subscription process. + /// + [JsonProperty(PropertyName = "properties.terms")] + public string Terms { get; set; } + + /// + /// Gets or sets whether a product subscription is required for + /// accessing APIs included in this product. If true, the product is + /// referred to as "protected" and a valid subscription key is required + /// for a request to an API included in the product to succeed. If + /// false, the product is referred to as "open" and requests to an API + /// included in the product can be made without a subscription key. If + /// property is omitted when creating a new product it's value is + /// assumed to be true. + /// + [JsonProperty(PropertyName = "properties.subscriptionRequired")] + public bool? SubscriptionRequired { get; set; } + + /// + /// Gets or sets whether subscription approval is required. If false, + /// new subscriptions will be approved automatically enabling + /// developers to call the product’s APIs immediately after + /// subscribing. If true, administrators must manually approve the + /// subscription before the developer can any of the product’s APIs. + /// Can be present only if subscriptionRequired property is present and + /// has a value of false. + /// + [JsonProperty(PropertyName = "properties.approvalRequired")] + public bool? ApprovalRequired { get; set; } + + /// + /// Gets or sets whether the number of subscriptions a user can have to + /// this product at the same time. Set to null or omit to allow + /// unlimited per user subscriptions. Can be present only if + /// subscriptionRequired property is present and has a value of false. + /// + [JsonProperty(PropertyName = "properties.subscriptionsLimit")] + public int? SubscriptionsLimit { get; set; } + + /// + /// Gets or sets whether product is published or not. Published + /// products are discoverable by users of developer portal. Non + /// published products are visible only to administrators. Default + /// state of Product is notPublished. Possible values include: + /// 'notPublished', 'published' + /// + [JsonProperty(PropertyName = "properties.state")] + public ProductState? State { get; set; } + + /// + /// Gets or sets product name. + /// + [JsonProperty(PropertyName = "properties.name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Description != null) + { + if (Description.Length > 1000) + { + throw new ValidationException(ValidationRules.MaxLength, "Description", 1000); + } + if (Description.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Description", 1); + } + } + if (Name != null) + { + if (Name.Length > 300) + { + throw new ValidationException(ValidationRules.MaxLength, "Name", 300); + } + if (Name.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Name", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyContract.cs new file mode 100644 index 000000000000..a6af111609cd --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyContract.cs @@ -0,0 +1,146 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Property details. + /// + [Rest.Serialization.JsonTransformation] + public partial class PropertyContract : Resource + { + /// + /// Initializes a new instance of the PropertyContract class. + /// + public PropertyContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PropertyContract class. + /// + /// Unique name of Property. It may contain + /// only letters, digits, period, dash, and underscore + /// characters. + /// Value of the property. Can contain policy + /// expressions. It may not be empty or consist only of + /// whitespace. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Optional tags that when provided can be used to + /// filter the property list. + /// Determines whether the value is a secret and + /// should be encrypted or not. Default value is false. + public PropertyContract(string displayName, string value, string id = default(string), string name = default(string), string type = default(string), IList tags = default(IList), bool? secret = default(bool?)) + : base(id, name, type) + { + Tags = tags; + Secret = secret; + DisplayName = displayName; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional tags that when provided can be used to filter + /// the property list. + /// + [JsonProperty(PropertyName = "properties.tags")] + public IList Tags { get; set; } + + /// + /// Gets or sets determines whether the value is a secret and should be + /// encrypted or not. Default value is false. + /// + [JsonProperty(PropertyName = "properties.secret")] + public bool? Secret { get; set; } + + /// + /// Gets or sets unique name of Property. It may contain only letters, + /// digits, period, dash, and underscore characters. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets value of the property. Can contain policy expressions. + /// It may not be empty or consist only of whitespace. + /// + [JsonProperty(PropertyName = "properties.value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + if (Tags != null) + { + if (Tags.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "Tags", 32); + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 256); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(DisplayName, "^[A-Za-z0-9-._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "DisplayName", "^[A-Za-z0-9-._]+$"); + } + } + if (Value != null) + { + if (Value.Length > 4096) + { + throw new ValidationException(ValidationRules.MaxLength, "Value", 4096); + } + if (Value.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Value", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyEntityBaseParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyEntityBaseParameters.cs new file mode 100644 index 000000000000..7dae63f7b050 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyEntityBaseParameters.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Property Entity Base Parameters set. + /// + public partial class PropertyEntityBaseParameters + { + /// + /// Initializes a new instance of the PropertyEntityBaseParameters + /// class. + /// + public PropertyEntityBaseParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PropertyEntityBaseParameters + /// class. + /// + /// Optional tags that when provided can be used to + /// filter the property list. + /// Determines whether the value is a secret and + /// should be encrypted or not. Default value is false. + public PropertyEntityBaseParameters(IList tags = default(IList), bool? secret = default(bool?)) + { + Tags = tags; + Secret = secret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional tags that when provided can be used to filter + /// the property list. + /// + [JsonProperty(PropertyName = "tags")] + public IList Tags { get; set; } + + /// + /// Gets or sets determines whether the value is a secret and should be + /// encrypted or not. Default value is false. + /// + [JsonProperty(PropertyName = "secret")] + public bool? Secret { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Tags != null) + { + if (Tags.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "Tags", 32); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyGetHeaders.cs new file mode 100644 index 000000000000..24203ca68870 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class PropertyGetHeaders + { + /// + /// Initializes a new instance of the PropertyGetHeaders class. + /// + public PropertyGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PropertyGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public PropertyGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyUpdateParameters.cs new file mode 100644 index 000000000000..5d67de5236c6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/PropertyUpdateParameters.cs @@ -0,0 +1,133 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Property update Parameters. + /// + [Rest.Serialization.JsonTransformation] + public partial class PropertyUpdateParameters + { + /// + /// Initializes a new instance of the PropertyUpdateParameters class. + /// + public PropertyUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PropertyUpdateParameters class. + /// + /// Optional tags that when provided can be used to + /// filter the property list. + /// Determines whether the value is a secret and + /// should be encrypted or not. Default value is false. + /// Unique name of Property. It may contain + /// only letters, digits, period, dash, and underscore + /// characters. + /// Value of the property. Can contain policy + /// expressions. It may not be empty or consist only of + /// whitespace. + public PropertyUpdateParameters(IList tags = default(IList), bool? secret = default(bool?), string displayName = default(string), string value = default(string)) + { + Tags = tags; + Secret = secret; + DisplayName = displayName; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional tags that when provided can be used to filter + /// the property list. + /// + [JsonProperty(PropertyName = "properties.tags")] + public IList Tags { get; set; } + + /// + /// Gets or sets determines whether the value is a secret and should be + /// encrypted or not. Default value is false. + /// + [JsonProperty(PropertyName = "properties.secret")] + public bool? Secret { get; set; } + + /// + /// Gets or sets unique name of Property. It may contain only letters, + /// digits, period, dash, and underscore characters. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets value of the property. Can contain policy expressions. + /// It may not be empty or consist only of whitespace. + /// + [JsonProperty(PropertyName = "properties.value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Tags != null) + { + if (Tags.Count > 32) + { + throw new ValidationException(ValidationRules.MaxItems, "Tags", 32); + } + } + if (DisplayName != null) + { + if (DisplayName.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 256); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(DisplayName, "^[A-Za-z0-9-._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "DisplayName", "^[A-Za-z0-9-._]+$"); + } + } + if (Value != null) + { + if (Value.Length > 4096) + { + throw new ValidationException(ValidationRules.MaxLength, "Value", 4096); + } + if (Value.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Value", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Protocol.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Protocol.cs new file mode 100644 index 000000000000..d7050561d934 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Protocol.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for Protocol. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum Protocol + { + [EnumMember(Value = "http")] + Http, + [EnumMember(Value = "https")] + Https + } + internal static class ProtocolEnumExtension + { + internal static string ToSerializedValue(this Protocol? value) => + value == null ? null : ((Protocol)value).ToSerializedValue(); + + internal static string ToSerializedValue(this Protocol value) + { + switch( value ) + { + case Protocol.Http: + return "http"; + case Protocol.Https: + return "https"; + } + return null; + } + + internal static Protocol? ParseProtocol(this string value) + { + switch( value ) + { + case "http": + return Protocol.Http; + case "https": + return Protocol.Https; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterCollection.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterCollection.cs new file mode 100644 index 000000000000..6b394c728768 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterCollection.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Paged Quota Counter list representation. + /// + public partial class QuotaCounterCollection + { + /// + /// Initializes a new instance of the QuotaCounterCollection class. + /// + public QuotaCounterCollection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaCounterCollection class. + /// + /// Quota counter values. + /// Total record count number across all + /// pages. + /// Next page link if any. + public QuotaCounterCollection(IList value = default(IList), long? count = default(long?), string nextLink = default(string)) + { + Value = value; + Count = count; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets quota counter values. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets total record count number across all pages. + /// + [JsonProperty(PropertyName = "count")] + public long? Count { get; set; } + + /// + /// Gets or sets next page link if any. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterContract.cs new file mode 100644 index 000000000000..01fa2135f6ea --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterContract.cs @@ -0,0 +1,131 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota counter details. + /// + public partial class QuotaCounterContract + { + /// + /// Initializes a new instance of the QuotaCounterContract class. + /// + public QuotaCounterContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaCounterContract class. + /// + /// The Key value of the Counter. Must not be + /// empty. + /// Identifier of the Period for which the + /// counter was collected. Must not be empty. + /// The date of the start of Counter + /// Period. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// The date of the end of Counter Period. + /// The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + /// as specified by the ISO 8601 standard. + /// + /// Quota Value Properties + public QuotaCounterContract(string counterKey, string periodKey, System.DateTime periodStartTime, System.DateTime periodEndTime, QuotaCounterValueContractProperties value = default(QuotaCounterValueContractProperties)) + { + CounterKey = counterKey; + PeriodKey = periodKey; + PeriodStartTime = periodStartTime; + PeriodEndTime = periodEndTime; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Key value of the Counter. Must not be empty. + /// + [JsonProperty(PropertyName = "counterKey")] + public string CounterKey { get; set; } + + /// + /// Gets or sets identifier of the Period for which the counter was + /// collected. Must not be empty. + /// + [JsonProperty(PropertyName = "periodKey")] + public string PeriodKey { get; set; } + + /// + /// Gets or sets the date of the start of Counter Period. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "periodStartTime")] + public System.DateTime PeriodStartTime { get; set; } + + /// + /// Gets or sets the date of the end of Counter Period. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "periodEndTime")] + public System.DateTime PeriodEndTime { get; set; } + + /// + /// Gets or sets quota Value Properties + /// + [JsonProperty(PropertyName = "Value")] + public QuotaCounterValueContractProperties Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CounterKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CounterKey"); + } + if (PeriodKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PeriodKey"); + } + if (CounterKey != null) + { + if (CounterKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "CounterKey", 1); + } + } + if (PeriodKey != null) + { + if (PeriodKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PeriodKey", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContract.cs new file mode 100644 index 000000000000..4dd3feb03c46 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContract.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota counter value details. + /// + [Rest.Serialization.JsonTransformation] + public partial class QuotaCounterValueContract + { + /// + /// Initializes a new instance of the QuotaCounterValueContract class. + /// + public QuotaCounterValueContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuotaCounterValueContract class. + /// + /// Number of times Counter was + /// called. + /// Data Transferred in KiloBytes. + public QuotaCounterValueContract(int? callsCount = default(int?), double? kbTransferred = default(double?)) + { + CallsCount = callsCount; + KbTransferred = kbTransferred; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets number of times Counter was called. + /// + [JsonProperty(PropertyName = "value.callsCount")] + public int? CallsCount { get; set; } + + /// + /// Gets or sets data Transferred in KiloBytes. + /// + [JsonProperty(PropertyName = "value.kbTransferred")] + public double? KbTransferred { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContractProperties.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContractProperties.cs new file mode 100644 index 000000000000..f087e3343f64 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/QuotaCounterValueContractProperties.cs @@ -0,0 +1,63 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Quota counter value details. + /// + public partial class QuotaCounterValueContractProperties + { + /// + /// Initializes a new instance of the + /// QuotaCounterValueContractProperties class. + /// + public QuotaCounterValueContractProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// QuotaCounterValueContractProperties class. + /// + /// Number of times Counter was + /// called. + /// Data Transferred in KiloBytes. + public QuotaCounterValueContractProperties(int? callsCount = default(int?), double? kbTransferred = default(double?)) + { + CallsCount = callsCount; + KbTransferred = kbTransferred; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets number of times Counter was called. + /// + [JsonProperty(PropertyName = "callsCount")] + public int? CallsCount { get; set; } + + /// + /// Gets or sets data Transferred in KiloBytes. + /// + [JsonProperty(PropertyName = "kbTransferred")] + public double? KbTransferred { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RegionContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RegionContract.cs new file mode 100644 index 000000000000..b0a6f3aa15df --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RegionContract.cs @@ -0,0 +1,69 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Region profile. + /// + public partial class RegionContract + { + /// + /// Initializes a new instance of the RegionContract class. + /// + public RegionContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RegionContract class. + /// + /// Region name. + /// whether Region is the master + /// region. + /// whether Region is deleted. + public RegionContract(string name = default(string), bool? isMasterRegion = default(bool?), bool? isDeleted = default(bool?)) + { + Name = name; + IsMasterRegion = isMasterRegion; + IsDeleted = isDeleted; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets region name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets whether Region is the master region. + /// + [JsonProperty(PropertyName = "isMasterRegion")] + public bool? IsMasterRegion { get; set; } + + /// + /// Gets or sets whether Region is deleted. + /// + [JsonProperty(PropertyName = "isDeleted")] + public bool? IsDeleted { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ReportRecordContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ReportRecordContract.cs new file mode 100644 index 000000000000..4cb5d16017ad --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ReportRecordContract.cs @@ -0,0 +1,297 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Report data. + /// + public partial class ReportRecordContract + { + /// + /// Initializes a new instance of the ReportRecordContract class. + /// + public ReportRecordContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReportRecordContract class. + /// + /// Name depending on report endpoint specifies + /// product, API, operation or developer name. + /// Start of aggregation period. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// Length of agregation period. Interval must + /// be multiple of 15 minutes and may not be zero. The value should be + /// in ISO 8601 format + /// (http://en.wikipedia.org/wiki/ISO_8601#Durations). + /// Country to which this record data is + /// related. + /// Country region to which this record data is + /// related. + /// Zip code to which this record data is + /// related. + /// User identifier path. /users/{userId} + /// Product identifier path. + /// /products/{productId} + /// API identifier path. /apis/{apiId} + /// Operation identifier path. + /// /apis/{apiId}/operations/{operationId} + /// API region identifier. + /// Subscription identifier path. + /// /subscriptions/{subscriptionId} + /// Number of succesful calls. This + /// includes calls returning HttpStatusCode <= 301 and + /// HttpStatusCode.NotModified and + /// HttpStatusCode.TemporaryRedirect + /// Number of calls blocked due to + /// invalid credentials. This includes calls returning + /// HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and + /// HttpStatusCode.TooManyRequests + /// Number of calls failed due to proxy + /// or backend errors. This includes calls returning + /// HttpStatusCode.BadRequest(400) and any Code between + /// HttpStatusCode.InternalServerError (500) and 600 + /// Number of other calls. + /// Total number of calls. + /// Bandwidth consumed. + /// Number of times when content was served + /// from cache policy. + /// Number of times content was fetched + /// from backend. + /// Average time it took to process + /// request. + /// Minimum time it took to process + /// request. + /// Maximum time it took to process + /// request. + /// Average time it took to process + /// request on backend. + /// Minimum time it took to process + /// request on backend. + /// Maximum time it took to process + /// request on backend. + public ReportRecordContract(string name = default(string), System.DateTime? timestamp = default(System.DateTime?), string interval = default(string), string country = default(string), string region = default(string), string zip = default(string), string userId = default(string), string productId = default(string), string apiId = default(string), string operationId = default(string), string apiRegion = default(string), string subscriptionId = default(string), int? callCountSuccess = default(int?), int? callCountBlocked = default(int?), int? callCountFailed = default(int?), int? callCountOther = default(int?), int? callCountTotal = default(int?), long? bandwidth = default(long?), int? cacheHitCount = default(int?), int? cacheMissCount = default(int?), double? apiTimeAvg = default(double?), double? apiTimeMin = default(double?), double? apiTimeMax = default(double?), double? serviceTimeAvg = default(double?), double? serviceTimeMin = default(double?), double? serviceTimeMax = default(double?)) + { + Name = name; + Timestamp = timestamp; + Interval = interval; + Country = country; + Region = region; + Zip = zip; + UserId = userId; + ProductId = productId; + ApiId = apiId; + OperationId = operationId; + ApiRegion = apiRegion; + SubscriptionId = subscriptionId; + CallCountSuccess = callCountSuccess; + CallCountBlocked = callCountBlocked; + CallCountFailed = callCountFailed; + CallCountOther = callCountOther; + CallCountTotal = callCountTotal; + Bandwidth = bandwidth; + CacheHitCount = cacheHitCount; + CacheMissCount = cacheMissCount; + ApiTimeAvg = apiTimeAvg; + ApiTimeMin = apiTimeMin; + ApiTimeMax = apiTimeMax; + ServiceTimeAvg = serviceTimeAvg; + ServiceTimeMin = serviceTimeMin; + ServiceTimeMax = serviceTimeMax; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name depending on report endpoint specifies product, + /// API, operation or developer name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets start of aggregation period. The date conforms to the + /// following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO + /// 8601 standard. + /// + /// + [JsonProperty(PropertyName = "timestamp")] + public System.DateTime? Timestamp { get; set; } + + /// + /// Gets or sets length of agregation period. Interval must be + /// multiple of 15 minutes and may not be zero. The value should be in + /// ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + /// + [JsonProperty(PropertyName = "interval")] + public string Interval { get; set; } + + /// + /// Gets or sets country to which this record data is related. + /// + [JsonProperty(PropertyName = "country")] + public string Country { get; set; } + + /// + /// Gets or sets country region to which this record data is related. + /// + [JsonProperty(PropertyName = "region")] + public string Region { get; set; } + + /// + /// Gets or sets zip code to which this record data is related. + /// + [JsonProperty(PropertyName = "zip")] + public string Zip { get; set; } + + /// + /// Gets user identifier path. /users/{userId} + /// + [JsonProperty(PropertyName = "userId")] + public string UserId { get; private set; } + + /// + /// Gets product identifier path. /products/{productId} + /// + [JsonProperty(PropertyName = "productId")] + public string ProductId { get; private set; } + + /// + /// Gets or sets API identifier path. /apis/{apiId} + /// + [JsonProperty(PropertyName = "apiId")] + public string ApiId { get; set; } + + /// + /// Gets or sets operation identifier path. + /// /apis/{apiId}/operations/{operationId} + /// + [JsonProperty(PropertyName = "operationId")] + public string OperationId { get; set; } + + /// + /// Gets or sets API region identifier. + /// + [JsonProperty(PropertyName = "apiRegion")] + public string ApiRegion { get; set; } + + /// + /// Gets or sets subscription identifier path. + /// /subscriptions/{subscriptionId} + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets number of succesful calls. This includes calls + /// returning HttpStatusCode &lt;= 301 and + /// HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + /// + [JsonProperty(PropertyName = "callCountSuccess")] + public int? CallCountSuccess { get; set; } + + /// + /// Gets or sets number of calls blocked due to invalid credentials. + /// This includes calls returning HttpStatusCode.Unauthorize and + /// HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + /// + [JsonProperty(PropertyName = "callCountBlocked")] + public int? CallCountBlocked { get; set; } + + /// + /// Gets or sets number of calls failed due to proxy or backend errors. + /// This includes calls returning HttpStatusCode.BadRequest(400) and + /// any Code between HttpStatusCode.InternalServerError (500) and 600 + /// + [JsonProperty(PropertyName = "callCountFailed")] + public int? CallCountFailed { get; set; } + + /// + /// Gets or sets number of other calls. + /// + [JsonProperty(PropertyName = "callCountOther")] + public int? CallCountOther { get; set; } + + /// + /// Gets or sets total number of calls. + /// + [JsonProperty(PropertyName = "callCountTotal")] + public int? CallCountTotal { get; set; } + + /// + /// Gets or sets bandwidth consumed. + /// + [JsonProperty(PropertyName = "bandwidth")] + public long? Bandwidth { get; set; } + + /// + /// Gets or sets number of times when content was served from cache + /// policy. + /// + [JsonProperty(PropertyName = "cacheHitCount")] + public int? CacheHitCount { get; set; } + + /// + /// Gets or sets number of times content was fetched from backend. + /// + [JsonProperty(PropertyName = "cacheMissCount")] + public int? CacheMissCount { get; set; } + + /// + /// Gets or sets average time it took to process request. + /// + [JsonProperty(PropertyName = "apiTimeAvg")] + public double? ApiTimeAvg { get; set; } + + /// + /// Gets or sets minimum time it took to process request. + /// + [JsonProperty(PropertyName = "apiTimeMin")] + public double? ApiTimeMin { get; set; } + + /// + /// Gets or sets maximum time it took to process request. + /// + [JsonProperty(PropertyName = "apiTimeMax")] + public double? ApiTimeMax { get; set; } + + /// + /// Gets or sets average time it took to process request on backend. + /// + [JsonProperty(PropertyName = "serviceTimeAvg")] + public double? ServiceTimeAvg { get; set; } + + /// + /// Gets or sets minimum time it took to process request on backend. + /// + [JsonProperty(PropertyName = "serviceTimeMin")] + public double? ServiceTimeMin { get; set; } + + /// + /// Gets or sets maximum time it took to process request on backend. + /// + [JsonProperty(PropertyName = "serviceTimeMax")] + public double? ServiceTimeMax { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RepresentationContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RepresentationContract.cs new file mode 100644 index 000000000000..80cd776e9c49 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RepresentationContract.cs @@ -0,0 +1,126 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Operation request/response representation details. + /// + public partial class RepresentationContract + { + /// + /// Initializes a new instance of the RepresentationContract class. + /// + public RepresentationContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RepresentationContract class. + /// + /// Specifies a registered or custom content + /// type for this representation, e.g. application/xml. + /// An example of the representation. + /// Schema identifier. Applicable only if + /// 'contentType' value is neither 'application/x-www-form-urlencoded' + /// nor 'multipart/form-data'. + /// Type name defined by the schema. Applicable + /// only if 'contentType' value is neither + /// 'application/x-www-form-urlencoded' nor + /// 'multipart/form-data'. + /// Collection of form parameters. + /// Required if 'contentType' value is either + /// 'application/x-www-form-urlencoded' or + /// 'multipart/form-data'.. + public RepresentationContract(string contentType, string sample = default(string), string schemaId = default(string), string typeName = default(string), IList formParameters = default(IList)) + { + ContentType = contentType; + Sample = sample; + SchemaId = schemaId; + TypeName = typeName; + FormParameters = formParameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies a registered or custom content type for this + /// representation, e.g. application/xml. + /// + [JsonProperty(PropertyName = "contentType")] + public string ContentType { get; set; } + + /// + /// Gets or sets an example of the representation. + /// + [JsonProperty(PropertyName = "sample")] + public string Sample { get; set; } + + /// + /// Gets or sets schema identifier. Applicable only if 'contentType' + /// value is neither 'application/x-www-form-urlencoded' nor + /// 'multipart/form-data'. + /// + [JsonProperty(PropertyName = "schemaId")] + public string SchemaId { get; set; } + + /// + /// Gets or sets type name defined by the schema. Applicable only if + /// 'contentType' value is neither 'application/x-www-form-urlencoded' + /// nor 'multipart/form-data'. + /// + [JsonProperty(PropertyName = "typeName")] + public string TypeName { get; set; } + + /// + /// Gets or sets collection of form parameters. Required if + /// 'contentType' value is either 'application/x-www-form-urlencoded' + /// or 'multipart/form-data'.. + /// + [JsonProperty(PropertyName = "formParameters")] + public IList FormParameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ContentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContentType"); + } + if (FormParameters != null) + { + foreach (var element in FormParameters) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestContract.cs new file mode 100644 index 000000000000..3f2979114e52 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestContract.cs @@ -0,0 +1,81 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Operation request details. + /// + public partial class RequestContract + { + /// + /// Initializes a new instance of the RequestContract class. + /// + public RequestContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RequestContract class. + /// + /// Operation request description. + /// Collection of operation request query + /// parameters. + /// Collection of operation request + /// headers. + /// Collection of operation request + /// representations. + public RequestContract(string description = default(string), IList queryParameters = default(IList), IList headers = default(IList), IList representations = default(IList)) + { + Description = description; + QueryParameters = queryParameters; + Headers = headers; + Representations = representations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation request description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets collection of operation request query parameters. + /// + [JsonProperty(PropertyName = "queryParameters")] + public IList QueryParameters { get; set; } + + /// + /// Gets or sets collection of operation request headers. + /// + [JsonProperty(PropertyName = "headers")] + public IList Headers { get; set; } + + /// + /// Gets or sets collection of operation request representations. + /// + [JsonProperty(PropertyName = "representations")] + public IList Representations { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestReportRecordContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestReportRecordContract.cs new file mode 100644 index 000000000000..a52c45f9407d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/RequestReportRecordContract.cs @@ -0,0 +1,218 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request Report data. + /// + public partial class RequestReportRecordContract + { + /// + /// Initializes a new instance of the RequestReportRecordContract + /// class. + /// + public RequestReportRecordContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RequestReportRecordContract + /// class. + /// + /// API identifier path. /apis/{apiId} + /// Operation identifier path. + /// /apis/{apiId}/operations/{operationId} + /// Product identifier path. + /// /products/{productId} + /// User identifier path. /users/{userId} + /// The HTTP method associated with this + /// request.. + /// The full URL associated with this + /// request. + /// The client IP address associated with this + /// request. + /// The HTTP status code received by + /// the gateway as a result of forwarding this request to the + /// backend. + /// The HTTP status code returned by the + /// gateway. + /// The size of the response returned by the + /// gateway. + /// The date and time when this request was + /// received by the gateway in ISO 8601 format. + /// Specifies if response cache was involved in + /// generating the response. If the value is none, the cache was not + /// used. If the value is hit, cached response was returned. If the + /// value is miss, the cache was used but lookup resulted in a miss and + /// request was fullfilled by the backend. + /// The total time it took to process this + /// request. + /// he time it took to forward this request + /// to the backend and get the response back. + /// Azure region where the gateway that + /// processed this request is located. + /// Subscription identifier path. + /// /subscriptions/{subscriptionId} + /// Request Identifier. + /// The size of this request.. + public RequestReportRecordContract(string apiId = default(string), string operationId = default(string), string productId = default(string), string userId = default(string), string method = default(string), string url = default(string), string ipAddress = default(string), string backendResponseCode = default(string), int? responseCode = default(int?), int? responseSize = default(int?), System.DateTime? timestamp = default(System.DateTime?), string cache = default(string), double? apiTime = default(double?), double? serviceTime = default(double?), string apiRegion = default(string), string subscriptionId = default(string), string requestId = default(string), int? requestSize = default(int?)) + { + ApiId = apiId; + OperationId = operationId; + ProductId = productId; + UserId = userId; + Method = method; + Url = url; + IpAddress = ipAddress; + BackendResponseCode = backendResponseCode; + ResponseCode = responseCode; + ResponseSize = responseSize; + Timestamp = timestamp; + Cache = cache; + ApiTime = apiTime; + ServiceTime = serviceTime; + ApiRegion = apiRegion; + SubscriptionId = subscriptionId; + RequestId = requestId; + RequestSize = requestSize; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API identifier path. /apis/{apiId} + /// + [JsonProperty(PropertyName = "apiId")] + public string ApiId { get; set; } + + /// + /// Gets or sets operation identifier path. + /// /apis/{apiId}/operations/{operationId} + /// + [JsonProperty(PropertyName = "operationId")] + public string OperationId { get; set; } + + /// + /// Gets product identifier path. /products/{productId} + /// + [JsonProperty(PropertyName = "productId")] + public string ProductId { get; private set; } + + /// + /// Gets user identifier path. /users/{userId} + /// + [JsonProperty(PropertyName = "userId")] + public string UserId { get; private set; } + + /// + /// Gets or sets the HTTP method associated with this request.. + /// + [JsonProperty(PropertyName = "method")] + public string Method { get; set; } + + /// + /// Gets or sets the full URL associated with this request. + /// + [JsonProperty(PropertyName = "url")] + public string Url { get; set; } + + /// + /// Gets or sets the client IP address associated with this request. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the HTTP status code received by the gateway as a + /// result of forwarding this request to the backend. + /// + [JsonProperty(PropertyName = "backendResponseCode")] + public string BackendResponseCode { get; set; } + + /// + /// Gets or sets the HTTP status code returned by the gateway. + /// + [JsonProperty(PropertyName = "responseCode")] + public int? ResponseCode { get; set; } + + /// + /// Gets or sets the size of the response returned by the gateway. + /// + [JsonProperty(PropertyName = "responseSize")] + public int? ResponseSize { get; set; } + + /// + /// Gets or sets the date and time when this request was received by + /// the gateway in ISO 8601 format. + /// + [JsonProperty(PropertyName = "timestamp")] + public System.DateTime? Timestamp { get; set; } + + /// + /// Gets or sets specifies if response cache was involved in generating + /// the response. If the value is none, the cache was not used. If the + /// value is hit, cached response was returned. If the value is miss, + /// the cache was used but lookup resulted in a miss and request was + /// fullfilled by the backend. + /// + [JsonProperty(PropertyName = "cache")] + public string Cache { get; set; } + + /// + /// Gets or sets the total time it took to process this request. + /// + [JsonProperty(PropertyName = "apiTime")] + public double? ApiTime { get; set; } + + /// + /// Gets or sets he time it took to forward this request to the backend + /// and get the response back. + /// + [JsonProperty(PropertyName = "serviceTime")] + public double? ServiceTime { get; set; } + + /// + /// Gets or sets azure region where the gateway that processed this + /// request is located. + /// + [JsonProperty(PropertyName = "apiRegion")] + public string ApiRegion { get; set; } + + /// + /// Gets or sets subscription identifier path. + /// /subscriptions/{subscriptionId} + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets request Identifier. + /// + [JsonProperty(PropertyName = "requestId")] + public string RequestId { get; set; } + + /// + /// Gets or sets the size of this request.. + /// + [JsonProperty(PropertyName = "requestSize")] + public int? RequestSize { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Resource.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Resource.cs new file mode 100644 index 000000000000..69fd4891c2d7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/Resource.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Resource definition. + /// + public partial class Resource : IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Resource class. + /// + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + public Resource(string id = default(string), string name = default(string), string type = default(string)) + { + Id = id; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource type for API Management resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ResponseContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ResponseContract.cs new file mode 100644 index 000000000000..5900141f4af5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/ResponseContract.cs @@ -0,0 +1,110 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Operation response details. + /// + public partial class ResponseContract + { + /// + /// Initializes a new instance of the ResponseContract class. + /// + public ResponseContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResponseContract class. + /// + /// Operation response HTTP status + /// code. + /// Operation response description. + /// Collection of operation response + /// representations. + /// Collection of operation response + /// headers. + public ResponseContract(int statusCode, string description = default(string), IList representations = default(IList), IList headers = default(IList)) + { + StatusCode = statusCode; + Description = description; + Representations = representations; + Headers = headers; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation response HTTP status code. + /// + [JsonProperty(PropertyName = "statusCode")] + public int StatusCode { get; set; } + + /// + /// Gets or sets operation response description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets collection of operation response representations. + /// + [JsonProperty(PropertyName = "representations")] + public IList Representations { get; set; } + + /// + /// Gets or sets collection of operation response headers. + /// + [JsonProperty(PropertyName = "headers")] + public IList Headers { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Representations != null) + { + foreach (var element in Representations) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Headers != null) + { + foreach (var element1 in Headers) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SaveConfigurationParameter.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SaveConfigurationParameter.cs new file mode 100644 index 000000000000..4c88728353b0 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SaveConfigurationParameter.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Save Tenant Configuration operation. + /// + public partial class SaveConfigurationParameter + { + /// + /// Initializes a new instance of the SaveConfigurationParameter class. + /// + public SaveConfigurationParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SaveConfigurationParameter class. + /// + /// The name of the Git branch in which to commit + /// the current configuration snapshot. + /// The value if true, the current configuration + /// database is committed to the Git repository, even if the Git + /// repository has newer changes that would be overwritten. + public SaveConfigurationParameter(string branch, bool? force = default(bool?)) + { + Branch = branch; + Force = force; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Git branch in which to commit the + /// current configuration snapshot. + /// + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or sets the value if true, the current configuration database + /// is committed to the Git repository, even if the Git repository has + /// newer changes that would be overwritten. + /// + [JsonProperty(PropertyName = "force")] + public bool? Force { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Branch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Branch"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SkuType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SkuType.cs new file mode 100644 index 000000000000..eb8a006549a4 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SkuType.cs @@ -0,0 +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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SkuType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SkuType + { + [EnumMember(Value = "Developer")] + Developer, + [EnumMember(Value = "Standard")] + Standard, + [EnumMember(Value = "Premium")] + Premium + } + internal static class SkuTypeEnumExtension + { + internal static string ToSerializedValue(this SkuType? value) => + value == null ? null : ((SkuType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this SkuType value) + { + switch( value ) + { + case SkuType.Developer: + return "Developer"; + case SkuType.Standard: + return "Standard"; + case SkuType.Premium: + return "Premium"; + } + return null; + } + + internal static SkuType? ParseSkuType(this string value) + { + switch( value ) + { + case "Developer": + return SkuType.Developer; + case "Standard": + return SkuType.Standard; + case "Premium": + return SkuType.Premium; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionContract.cs new file mode 100644 index 000000000000..6186093cb416 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionContract.cs @@ -0,0 +1,283 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subscription details. + /// + [Rest.Serialization.JsonTransformation] + public partial class SubscriptionContract : Resource + { + /// + /// Initializes a new instance of the SubscriptionContract class. + /// + public SubscriptionContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubscriptionContract class. + /// + /// The user resource identifier of the + /// subscription owner. The value is a valid relative URL in the format + /// of /users/{uid} where {uid} is a user identifier. + /// The product resource identifier of the + /// subscribed product. The value is a valid relative URL in the format + /// of /products/{productId} where {productId} is a product + /// identifier. + /// Subscription state. Possible states are * + /// active – the subscription is active, * suspended – the subscription + /// is blocked, and the subscriber cannot call any APIs of the product, + /// * submitted – the subscription request has been made by the + /// developer, but has not yet been approved or rejected, * rejected – + /// the subscription request has been denied by an administrator, * + /// cancelled – the subscription has been cancelled by the developer or + /// administrator, * expired – the subscription reached its expiration + /// date and was deactivated. Possible values include: 'suspended', + /// 'active', 'expired', 'submitted', 'rejected', 'cancelled' + /// Subscription primary key. + /// Subscription secondary key. + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// The name of the subscription, or null if + /// the subscription has no name. + /// Subscription creation date. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// Subscription activation date. The setting + /// is for audit purposes only and the subscription is not + /// automatically activated. The subscription lifecycle can be managed + /// by using the `state` property. The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// + /// Subscription expiration date. The + /// setting is for audit purposes only and the subscription is not + /// automatically expired. The subscription lifecycle can be managed by + /// using the `state` property. The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// + /// Date when subscription was cancelled or + /// expired. The setting is for audit purposes only and the + /// subscription is not automatically cancelled. The subscription + /// lifecycle can be managed by using the `state` property. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// Upcoming subscription expiration + /// notification date. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// Optional subscription comment added by + /// an administrator. + public SubscriptionContract(string userId, string productId, SubscriptionState state, string primaryKey, string secondaryKey, string id = default(string), string name = default(string), string type = default(string), string displayName = default(string), System.DateTime? createdDate = default(System.DateTime?), System.DateTime? startDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), System.DateTime? notificationDate = default(System.DateTime?), string stateComment = default(string)) + : base(id, name, type) + { + UserId = userId; + ProductId = productId; + DisplayName = displayName; + State = state; + CreatedDate = createdDate; + StartDate = startDate; + ExpirationDate = expirationDate; + EndDate = endDate; + NotificationDate = notificationDate; + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + StateComment = stateComment; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the user resource identifier of the subscription + /// owner. The value is a valid relative URL in the format of + /// /users/{uid} where {uid} is a user identifier. + /// + [JsonProperty(PropertyName = "properties.userId")] + public string UserId { get; set; } + + /// + /// Gets or sets the product resource identifier of the subscribed + /// product. The value is a valid relative URL in the format of + /// /products/{productId} where {productId} is a product identifier. + /// + [JsonProperty(PropertyName = "properties.productId")] + public string ProductId { get; set; } + + /// + /// Gets or sets the name of the subscription, or null if the + /// subscription has no name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets subscription state. Possible states are * active – the + /// subscription is active, * suspended – the subscription is blocked, + /// and the subscriber cannot call any APIs of the product, * submitted + /// – the subscription request has been made by the developer, but has + /// not yet been approved or rejected, * rejected – the subscription + /// request has been denied by an administrator, * cancelled – the + /// subscription has been cancelled by the developer or administrator, + /// * expired – the subscription reached its expiration date and was + /// deactivated. Possible values include: 'suspended', 'active', + /// 'expired', 'submitted', 'rejected', 'cancelled' + /// + [JsonProperty(PropertyName = "properties.state")] + public SubscriptionState State { get; set; } + + /// + /// Gets subscription creation date. The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// + /// + [JsonProperty(PropertyName = "properties.createdDate")] + public System.DateTime? CreatedDate { get; private set; } + + /// + /// Gets or sets subscription activation date. The setting is for audit + /// purposes only and the subscription is not automatically activated. + /// The subscription lifecycle can be managed by using the `state` + /// property. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "properties.startDate")] + public System.DateTime? StartDate { get; set; } + + /// + /// Gets or sets subscription expiration date. The setting is for audit + /// purposes only and the subscription is not automatically expired. + /// The subscription lifecycle can be managed by using the `state` + /// property. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime? ExpirationDate { get; set; } + + /// + /// Gets or sets date when subscription was cancelled or expired. The + /// setting is for audit purposes only and the subscription is not + /// automatically cancelled. The subscription lifecycle can be managed + /// by using the `state` property. The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// + /// + [JsonProperty(PropertyName = "properties.endDate")] + public System.DateTime? EndDate { get; set; } + + /// + /// Gets or sets upcoming subscription expiration notification date. + /// The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + /// as specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "properties.notificationDate")] + public System.DateTime? NotificationDate { get; set; } + + /// + /// Gets or sets subscription primary key. + /// + [JsonProperty(PropertyName = "properties.primaryKey")] + public string PrimaryKey { get; set; } + + /// + /// Gets or sets subscription secondary key. + /// + [JsonProperty(PropertyName = "properties.secondaryKey")] + public string SecondaryKey { get; set; } + + /// + /// Gets or sets optional subscription comment added by an + /// administrator. + /// + [JsonProperty(PropertyName = "properties.stateComment")] + public string StateComment { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (UserId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserId"); + } + if (ProductId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ProductId"); + } + if (PrimaryKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryKey"); + } + if (SecondaryKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SecondaryKey"); + } + if (DisplayName != null) + { + if (DisplayName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 100); + } + if (DisplayName.Length < 0) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 0); + } + } + if (PrimaryKey != null) + { + if (PrimaryKey.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "PrimaryKey", 256); + } + if (PrimaryKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PrimaryKey", 1); + } + } + if (SecondaryKey != null) + { + if (SecondaryKey.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "SecondaryKey", 256); + } + if (SecondaryKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SecondaryKey", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionCreateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionCreateParameters.cs new file mode 100644 index 000000000000..af3b89083410 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionCreateParameters.cs @@ -0,0 +1,181 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subscription create details. + /// + [Rest.Serialization.JsonTransformation] + public partial class SubscriptionCreateParameters + { + /// + /// Initializes a new instance of the SubscriptionCreateParameters + /// class. + /// + public SubscriptionCreateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubscriptionCreateParameters + /// class. + /// + /// User (user id path) for whom subscription is + /// being created in form /users/{uid} + /// Product (product id path) for which + /// subscription is being created in form /products/{productid} + /// Subscription name. + /// Primary subscription key. If not specified + /// during request key will be generated automatically. + /// Secondary subscription key. If not + /// specified during request key will be generated + /// automatically. + /// Initial subscription state. If no value is + /// specified, subscription is created with Submitted state. Possible + /// states are * active – the subscription is active, * suspended – the + /// subscription is blocked, and the subscriber cannot call any APIs of + /// the product, * submitted – the subscription request has been made + /// by the developer, but has not yet been approved or rejected, * + /// rejected – the subscription request has been denied by an + /// administrator, * cancelled – the subscription has been cancelled by + /// the developer or administrator, * expired – the subscription + /// reached its expiration date and was deactivated. Possible values + /// include: 'suspended', 'active', 'expired', 'submitted', 'rejected', + /// 'cancelled' + public SubscriptionCreateParameters(string userId, string productId, string displayName, string primaryKey = default(string), string secondaryKey = default(string), SubscriptionState? state = default(SubscriptionState?)) + { + UserId = userId; + ProductId = productId; + DisplayName = displayName; + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user (user id path) for whom subscription is being + /// created in form /users/{uid} + /// + [JsonProperty(PropertyName = "properties.userId")] + public string UserId { get; set; } + + /// + /// Gets or sets product (product id path) for which subscription is + /// being created in form /products/{productid} + /// + [JsonProperty(PropertyName = "properties.productId")] + public string ProductId { get; set; } + + /// + /// Gets or sets subscription name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets primary subscription key. If not specified during + /// request key will be generated automatically. + /// + [JsonProperty(PropertyName = "properties.primaryKey")] + public string PrimaryKey { get; set; } + + /// + /// Gets or sets secondary subscription key. If not specified during + /// request key will be generated automatically. + /// + [JsonProperty(PropertyName = "properties.secondaryKey")] + public string SecondaryKey { get; set; } + + /// + /// Gets or sets initial subscription state. If no value is specified, + /// subscription is created with Submitted state. Possible states are * + /// active – the subscription is active, * suspended – the subscription + /// is blocked, and the subscriber cannot call any APIs of the product, + /// * submitted – the subscription request has been made by the + /// developer, but has not yet been approved or rejected, * rejected – + /// the subscription request has been denied by an administrator, * + /// cancelled – the subscription has been cancelled by the developer or + /// administrator, * expired – the subscription reached its expiration + /// date and was deactivated. Possible values include: 'suspended', + /// 'active', 'expired', 'submitted', 'rejected', 'cancelled' + /// + [JsonProperty(PropertyName = "properties.state")] + public SubscriptionState? State { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (UserId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserId"); + } + if (ProductId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ProductId"); + } + if (DisplayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); + } + if (DisplayName != null) + { + if (DisplayName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "DisplayName", 100); + } + if (DisplayName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "DisplayName", 1); + } + } + if (PrimaryKey != null) + { + if (PrimaryKey.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "PrimaryKey", 256); + } + if (PrimaryKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PrimaryKey", 1); + } + } + if (SecondaryKey != null) + { + if (SecondaryKey.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "SecondaryKey", 256); + } + if (SecondaryKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SecondaryKey", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionGetHeaders.cs new file mode 100644 index 000000000000..95ca4234b1d5 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class SubscriptionGetHeaders + { + /// + /// Initializes a new instance of the SubscriptionGetHeaders class. + /// + public SubscriptionGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubscriptionGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public SubscriptionGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionKeyParameterNamesContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionKeyParameterNamesContract.cs new file mode 100644 index 000000000000..7af9b469495c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionKeyParameterNamesContract.cs @@ -0,0 +1,63 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subscription key parameter names details. + /// + public partial class SubscriptionKeyParameterNamesContract + { + /// + /// Initializes a new instance of the + /// SubscriptionKeyParameterNamesContract class. + /// + public SubscriptionKeyParameterNamesContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SubscriptionKeyParameterNamesContract class. + /// + /// Subscription key header name. + /// Subscription key query string parameter + /// name. + public SubscriptionKeyParameterNamesContract(string header = default(string), string query = default(string)) + { + Header = header; + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets subscription key header name. + /// + [JsonProperty(PropertyName = "header")] + public string Header { get; set; } + + /// + /// Gets or sets subscription key query string parameter name. + /// + [JsonProperty(PropertyName = "query")] + public string Query { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionState.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionState.cs new file mode 100644 index 000000000000..afbc0f97bd5a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionState.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SubscriptionState. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SubscriptionState + { + [EnumMember(Value = "suspended")] + Suspended, + [EnumMember(Value = "active")] + Active, + [EnumMember(Value = "expired")] + Expired, + [EnumMember(Value = "submitted")] + Submitted, + [EnumMember(Value = "rejected")] + Rejected, + [EnumMember(Value = "cancelled")] + Cancelled + } + internal static class SubscriptionStateEnumExtension + { + internal static string ToSerializedValue(this SubscriptionState? value) => + value == null ? null : ((SubscriptionState)value).ToSerializedValue(); + + internal static string ToSerializedValue(this SubscriptionState value) + { + switch( value ) + { + case SubscriptionState.Suspended: + return "suspended"; + case SubscriptionState.Active: + return "active"; + case SubscriptionState.Expired: + return "expired"; + case SubscriptionState.Submitted: + return "submitted"; + case SubscriptionState.Rejected: + return "rejected"; + case SubscriptionState.Cancelled: + return "cancelled"; + } + return null; + } + + internal static SubscriptionState? ParseSubscriptionState(this string value) + { + switch( value ) + { + case "suspended": + return SubscriptionState.Suspended; + case "active": + return SubscriptionState.Active; + case "expired": + return SubscriptionState.Expired; + case "submitted": + return SubscriptionState.Submitted; + case "rejected": + return SubscriptionState.Rejected; + case "cancelled": + return SubscriptionState.Cancelled; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionUpdateParameters.cs new file mode 100644 index 000000000000..0eaa18c39d99 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/SubscriptionUpdateParameters.cs @@ -0,0 +1,174 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subscription update details. + /// + [Rest.Serialization.JsonTransformation] + public partial class SubscriptionUpdateParameters + { + /// + /// Initializes a new instance of the SubscriptionUpdateParameters + /// class. + /// + public SubscriptionUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubscriptionUpdateParameters + /// class. + /// + /// User identifier path: /users/{uid} + /// Product identifier path: + /// /products/{productId} + /// Subscription expiration date. The + /// setting is for audit purposes only and the subscription is not + /// automatically expired. The subscription lifecycle can be managed by + /// using the `state` property. The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// Subscription name. + /// Primary subscription key. + /// Secondary subscription key. + /// Subscription state. Possible states are * + /// active – the subscription is active, * suspended – the subscription + /// is blocked, and the subscriber cannot call any APIs of the product, + /// * submitted – the subscription request has been made by the + /// developer, but has not yet been approved or rejected, * rejected – + /// the subscription request has been denied by an administrator, * + /// cancelled – the subscription has been cancelled by the developer or + /// administrator, * expired – the subscription reached its expiration + /// date and was deactivated. Possible values include: 'suspended', + /// 'active', 'expired', 'submitted', 'rejected', 'cancelled' + /// Comments describing subscription state + /// change by the administrator. + public SubscriptionUpdateParameters(string userId = default(string), string productId = default(string), System.DateTime? expirationDate = default(System.DateTime?), string displayName = default(string), string primaryKey = default(string), string secondaryKey = default(string), SubscriptionState? state = default(SubscriptionState?), string stateComment = default(string)) + { + UserId = userId; + ProductId = productId; + ExpirationDate = expirationDate; + DisplayName = displayName; + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + State = state; + StateComment = stateComment; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user identifier path: /users/{uid} + /// + [JsonProperty(PropertyName = "properties.userId")] + public string UserId { get; set; } + + /// + /// Gets or sets product identifier path: /products/{productId} + /// + [JsonProperty(PropertyName = "properties.productId")] + public string ProductId { get; set; } + + /// + /// Gets or sets subscription expiration date. The setting is for audit + /// purposes only and the subscription is not automatically expired. + /// The subscription lifecycle can be managed by using the `state` + /// property. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime? ExpirationDate { get; set; } + + /// + /// Gets or sets subscription name. + /// + [JsonProperty(PropertyName = "properties.displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets primary subscription key. + /// + [JsonProperty(PropertyName = "properties.primaryKey")] + public string PrimaryKey { get; set; } + + /// + /// Gets or sets secondary subscription key. + /// + [JsonProperty(PropertyName = "properties.secondaryKey")] + public string SecondaryKey { get; set; } + + /// + /// Gets or sets subscription state. Possible states are * active – the + /// subscription is active, * suspended – the subscription is blocked, + /// and the subscriber cannot call any APIs of the product, * submitted + /// – the subscription request has been made by the developer, but has + /// not yet been approved or rejected, * rejected – the subscription + /// request has been denied by an administrator, * cancelled – the + /// subscription has been cancelled by the developer or administrator, + /// * expired – the subscription reached its expiration date and was + /// deactivated. Possible values include: 'suspended', 'active', + /// 'expired', 'submitted', 'rejected', 'cancelled' + /// + [JsonProperty(PropertyName = "properties.state")] + public SubscriptionState? State { get; set; } + + /// + /// Gets or sets comments describing subscription state change by the + /// administrator. + /// + [JsonProperty(PropertyName = "properties.stateComment")] + public string StateComment { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrimaryKey != null) + { + if (PrimaryKey.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "PrimaryKey", 256); + } + if (PrimaryKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "PrimaryKey", 1); + } + } + if (SecondaryKey != null) + { + if (SecondaryKey.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "SecondaryKey", 256); + } + if (SecondaryKey.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "SecondaryKey", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TemplateName.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TemplateName.cs new file mode 100644 index 000000000000..46a6feb5487c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TemplateName.cs @@ -0,0 +1,35 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + + /// + /// Defines values for TemplateName. + /// + public static class TemplateName + { + public const string ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage"; + public const string AccountClosedDeveloper = "accountClosedDeveloper"; + public const string QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage"; + public const string NewDeveloperNotificationMessage = "newDeveloperNotificationMessage"; + public const string EmailChangeIdentityDefault = "emailChangeIdentityDefault"; + public const string InviteUserNotificationMessage = "inviteUserNotificationMessage"; + public const string NewCommentNotificationMessage = "newCommentNotificationMessage"; + public const string ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault"; + public const string NewIssueNotificationMessage = "newIssueNotificationMessage"; + public const string PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage"; + public const string PasswordResetIdentityDefault = "passwordResetIdentityDefault"; + public const string PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage"; + public const string RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage"; + public const string RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage"; + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGetHeaders.cs new file mode 100644 index 000000000000..778bed9943de --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class TenantAccessGetHeaders + { + /// + /// Initializes a new instance of the TenantAccessGetHeaders class. + /// + public TenantAccessGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantAccessGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public TenantAccessGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGitGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGitGetHeaders.cs new file mode 100644 index 000000000000..74e001201c8a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantAccessGitGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class TenantAccessGitGetHeaders + { + /// + /// Initializes a new instance of the TenantAccessGitGetHeaders class. + /// + public TenantAccessGitGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantAccessGitGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public TenantAccessGitGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantConfigurationSyncStateContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantConfigurationSyncStateContract.cs new file mode 100644 index 000000000000..fa9a8df65a60 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TenantConfigurationSyncStateContract.cs @@ -0,0 +1,120 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tenant Configuration Synchronization State. + /// + public partial class TenantConfigurationSyncStateContract + { + /// + /// Initializes a new instance of the + /// TenantConfigurationSyncStateContract class. + /// + public TenantConfigurationSyncStateContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// TenantConfigurationSyncStateContract class. + /// + /// The name of Git branch. + /// The latest commit Id. + /// value indicating if last sync was save + /// (true) or deploy (false) operation. + /// value indicating if last synchronization was + /// later than the configuration change. + /// value indicating whether Git + /// configuration access is enabled. + /// The date of the latest synchronization. The + /// date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// The date of the latest + /// configuration change. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + public TenantConfigurationSyncStateContract(string branch = default(string), string commitId = default(string), bool? isExport = default(bool?), bool? isSynced = default(bool?), bool? isGitEnabled = default(bool?), System.DateTime? syncDate = default(System.DateTime?), System.DateTime? configurationChangeDate = default(System.DateTime?)) + { + Branch = branch; + CommitId = commitId; + IsExport = isExport; + IsSynced = isSynced; + IsGitEnabled = isGitEnabled; + SyncDate = syncDate; + ConfigurationChangeDate = configurationChangeDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of Git branch. + /// + [JsonProperty(PropertyName = "branch")] + public string Branch { get; set; } + + /// + /// Gets or sets the latest commit Id. + /// + [JsonProperty(PropertyName = "commitId")] + public string CommitId { get; set; } + + /// + /// Gets or sets value indicating if last sync was save (true) or + /// deploy (false) operation. + /// + [JsonProperty(PropertyName = "isExport")] + public bool? IsExport { get; set; } + + /// + /// Gets or sets value indicating if last synchronization was later + /// than the configuration change. + /// + [JsonProperty(PropertyName = "isSynced")] + public bool? IsSynced { get; set; } + + /// + /// Gets or sets value indicating whether Git configuration access is + /// enabled. + /// + [JsonProperty(PropertyName = "isGitEnabled")] + public bool? IsGitEnabled { get; set; } + + /// + /// Gets or sets the date of the latest synchronization. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "syncDate")] + public System.DateTime? SyncDate { get; set; } + + /// + /// Gets or sets the date of the latest configuration change. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "configurationChangeDate")] + public System.DateTime? ConfigurationChangeDate { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TokenBodyParameterContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TokenBodyParameterContract.cs new file mode 100644 index 000000000000..60a1f275d066 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/TokenBodyParameterContract.cs @@ -0,0 +1,78 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// OAuth acquire token request body parameter (www-url-form-encoded). + /// + public partial class TokenBodyParameterContract + { + /// + /// Initializes a new instance of the TokenBodyParameterContract class. + /// + public TokenBodyParameterContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TokenBodyParameterContract class. + /// + /// body parameter name. + /// body parameter value. + public TokenBodyParameterContract(string name, string value) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets body parameter name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets body parameter value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserContract.cs new file mode 100644 index 000000000000..3963f4b9212e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserContract.cs @@ -0,0 +1,131 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// User details. + /// + [Rest.Serialization.JsonTransformation] + public partial class UserContract : Resource + { + /// + /// Initializes a new instance of the UserContract class. + /// + public UserContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserContract class. + /// + /// Resource ID. + /// Resource name. + /// Resource type for API Management + /// resource. + /// Account state. Specifies whether the user is + /// active or not. Blocked users are unable to sign into the developer + /// portal or call any APIs of subscribed products. Default state is + /// Active. Possible values include: 'active', 'blocked' + /// Optional note about a user set by the + /// administrator. + /// Collection of user identities. + /// First name. + /// Last name. + /// Email address. + /// Date of user registration. The date + /// conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + /// specified by the ISO 8601 standard. + /// + /// Collection of groups user is part of. + public UserContract(string id = default(string), string name = default(string), string type = default(string), UserState? state = default(UserState?), string note = default(string), IList identities = default(IList), string firstName = default(string), string lastName = default(string), string email = default(string), System.DateTime? registrationDate = default(System.DateTime?), IList groups = default(IList)) + : base(id, name, type) + { + State = state; + Note = note; + Identities = identities; + FirstName = firstName; + LastName = lastName; + Email = email; + RegistrationDate = registrationDate; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets account state. Specifies whether the user is active or + /// not. Blocked users are unable to sign into the developer portal or + /// call any APIs of subscribed products. Default state is Active. + /// Possible values include: 'active', 'blocked' + /// + [JsonProperty(PropertyName = "properties.state")] + public UserState? State { get; set; } + + /// + /// Gets or sets optional note about a user set by the administrator. + /// + [JsonProperty(PropertyName = "properties.note")] + public string Note { get; set; } + + /// + /// Gets collection of user identities. + /// + [JsonProperty(PropertyName = "properties.identities")] + public IList Identities { get; private set; } + + /// + /// Gets or sets first name. + /// + [JsonProperty(PropertyName = "properties.firstName")] + public string FirstName { get; set; } + + /// + /// Gets or sets last name. + /// + [JsonProperty(PropertyName = "properties.lastName")] + public string LastName { get; set; } + + /// + /// Gets or sets email address. + /// + [JsonProperty(PropertyName = "properties.email")] + public string Email { get; set; } + + /// + /// Gets or sets date of user registration. The date conforms to the + /// following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO + /// 8601 standard. + /// + /// + [JsonProperty(PropertyName = "properties.registrationDate")] + public System.DateTime? RegistrationDate { get; set; } + + /// + /// Gets collection of groups user is part of. + /// + [JsonProperty(PropertyName = "properties.groups")] + public IList Groups { get; private set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserCreateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserCreateParameters.cs new file mode 100644 index 000000000000..aa9d3e46b370 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserCreateParameters.cs @@ -0,0 +1,170 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// User create details. + /// + [Rest.Serialization.JsonTransformation] + public partial class UserCreateParameters + { + /// + /// Initializes a new instance of the UserCreateParameters class. + /// + public UserCreateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserCreateParameters class. + /// + /// Email address. Must not be empty and must be + /// unique within the service instance. + /// First name. + /// Last name. + /// Account state. Specifies whether the user is + /// active or not. Blocked users are unable to sign into the developer + /// portal or call any APIs of subscribed products. Default state is + /// Active. Possible values include: 'active', 'blocked' + /// Optional note about a user set by the + /// administrator. + /// Collection of user identities. + /// User Password. If no value is provided, a + /// default password is generated. + public UserCreateParameters(string email, string firstName, string lastName, UserState? state = default(UserState?), string note = default(string), IList identities = default(IList), string password = default(string)) + { + State = state; + Note = note; + Identities = identities; + Email = email; + FirstName = firstName; + LastName = lastName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets account state. Specifies whether the user is active or + /// not. Blocked users are unable to sign into the developer portal or + /// call any APIs of subscribed products. Default state is Active. + /// Possible values include: 'active', 'blocked' + /// + [JsonProperty(PropertyName = "properties.state")] + public UserState? State { get; set; } + + /// + /// Gets or sets optional note about a user set by the administrator. + /// + [JsonProperty(PropertyName = "properties.note")] + public string Note { get; set; } + + /// + /// Gets collection of user identities. + /// + [JsonProperty(PropertyName = "properties.identities")] + public IList Identities { get; private set; } + + /// + /// Gets or sets email address. Must not be empty and must be unique + /// within the service instance. + /// + [JsonProperty(PropertyName = "properties.email")] + public string Email { get; set; } + + /// + /// Gets or sets first name. + /// + [JsonProperty(PropertyName = "properties.firstName")] + public string FirstName { get; set; } + + /// + /// Gets or sets last name. + /// + [JsonProperty(PropertyName = "properties.lastName")] + public string LastName { get; set; } + + /// + /// Gets or sets user Password. If no value is provided, a default + /// password is generated. + /// + [JsonProperty(PropertyName = "properties.password")] + public string Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Email == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Email"); + } + if (FirstName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FirstName"); + } + if (LastName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LastName"); + } + if (Email != null) + { + if (Email.Length > 254) + { + throw new ValidationException(ValidationRules.MaxLength, "Email", 254); + } + if (Email.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Email", 1); + } + } + if (FirstName != null) + { + if (FirstName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "FirstName", 100); + } + if (FirstName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "FirstName", 1); + } + } + if (LastName != null) + { + if (LastName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "LastName", 100); + } + if (LastName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "LastName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserEntityBaseParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserEntityBaseParameters.cs new file mode 100644 index 000000000000..ae4d930ef285 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserEntityBaseParameters.cs @@ -0,0 +1,77 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// User Entity Base Parameters set. + /// + public partial class UserEntityBaseParameters + { + /// + /// Initializes a new instance of the UserEntityBaseParameters class. + /// + public UserEntityBaseParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserEntityBaseParameters class. + /// + /// Account state. Specifies whether the user is + /// active or not. Blocked users are unable to sign into the developer + /// portal or call any APIs of subscribed products. Default state is + /// Active. Possible values include: 'active', 'blocked' + /// Optional note about a user set by the + /// administrator. + /// Collection of user identities. + public UserEntityBaseParameters(UserState? state = default(UserState?), string note = default(string), IList identities = default(IList)) + { + State = state; + Note = note; + Identities = identities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets account state. Specifies whether the user is active or + /// not. Blocked users are unable to sign into the developer portal or + /// call any APIs of subscribed products. Default state is Active. + /// Possible values include: 'active', 'blocked' + /// + [JsonProperty(PropertyName = "state")] + public UserState? State { get; set; } + + /// + /// Gets or sets optional note about a user set by the administrator. + /// + [JsonProperty(PropertyName = "note")] + public string Note { get; set; } + + /// + /// Gets collection of user identities. + /// + [JsonProperty(PropertyName = "identities")] + public IList Identities { get; private set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserGetHeaders.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserGetHeaders.cs new file mode 100644 index 000000000000..a00ac7775e58 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserGetHeaders.cs @@ -0,0 +1,54 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Get operation. + /// + public partial class UserGetHeaders + { + /// + /// Initializes a new instance of the UserGetHeaders class. + /// + public UserGetHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserGetHeaders class. + /// + /// Current entity state version. Should be treated + /// as opaque and used to make conditional HTTP requests. + public UserGetHeaders(string eTag = default(string)) + { + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current entity state version. Should be treated as + /// opaque and used to make conditional HTTP requests. + /// + [JsonProperty(PropertyName = "ETag")] + public string ETag { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityCollection.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityCollection.cs new file mode 100644 index 000000000000..77fb6f0d8886 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityCollection.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of Users Identity list representation. + /// + public partial class UserIdentityCollection + { + /// + /// Initializes a new instance of the UserIdentityCollection class. + /// + public UserIdentityCollection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserIdentityCollection class. + /// + /// User Identity values. + /// Total record count number across all + /// pages. + /// Next page link if any. + public UserIdentityCollection(IList value = default(IList), long? count = default(long?), string nextLink = default(string)) + { + Value = value; + Count = count; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user Identity values. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets total record count number across all pages. + /// + [JsonProperty(PropertyName = "count")] + public long? Count { get; set; } + + /// + /// Gets or sets next page link if any. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityContract.cs new file mode 100644 index 000000000000..07753b07c2bb --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserIdentityContract.cs @@ -0,0 +1,60 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// User identity details. + /// + public partial class UserIdentityContract + { + /// + /// Initializes a new instance of the UserIdentityContract class. + /// + public UserIdentityContract() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserIdentityContract class. + /// + /// Identity provider name. + /// Identifier value within provider. + public UserIdentityContract(string provider = default(string), string id = default(string)) + { + Provider = provider; + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identity provider name. + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets identifier value within provider. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserState.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserState.cs new file mode 100644 index 000000000000..740bb24b0ae1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserState.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for UserState. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum UserState + { + [EnumMember(Value = "active")] + Active, + [EnumMember(Value = "blocked")] + Blocked + } + internal static class UserStateEnumExtension + { + internal static string ToSerializedValue(this UserState? value) => + value == null ? null : ((UserState)value).ToSerializedValue(); + + internal static string ToSerializedValue(this UserState value) + { + switch( value ) + { + case UserState.Active: + return "active"; + case UserState.Blocked: + return "blocked"; + } + return null; + } + + internal static UserState? ParseUserState(this string value) + { + switch( value ) + { + case "active": + return UserState.Active; + case "blocked": + return UserState.Blocked; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenParameters.cs new file mode 100644 index 000000000000..e07de26ffa4f --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenParameters.cs @@ -0,0 +1,78 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters supplied to the Get User Token operation. + /// + public partial class UserTokenParameters + { + /// + /// Initializes a new instance of the UserTokenParameters class. + /// + public UserTokenParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserTokenParameters class. + /// + /// The Key to be used to generate token for + /// user. Possible values include: 'primary', 'secondary' + /// The Expiry time of the Token. Maximum token + /// expiry time is set to 30 days. The date conforms to the following + /// format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + /// standard. + /// + public UserTokenParameters(KeyType keyType, System.DateTime expiry) + { + KeyType = keyType; + Expiry = expiry; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Key to be used to generate token for user. + /// Possible values include: 'primary', 'secondary' + /// + [JsonProperty(PropertyName = "keyType")] + public KeyType KeyType { get; set; } + + /// + /// Gets or sets the Expiry time of the Token. Maximum token expiry + /// time is set to 30 days. The date conforms to the following format: + /// `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// + [JsonProperty(PropertyName = "expiry")] + public System.DateTime Expiry { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenResult.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenResult.cs new file mode 100644 index 000000000000..778b118cb722 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserTokenResult.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Get User Token response details. + /// + public partial class UserTokenResult + { + /// + /// Initializes a new instance of the UserTokenResult class. + /// + public UserTokenResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserTokenResult class. + /// + /// Shared Access Authorization token for the + /// User. + public UserTokenResult(string value = default(string)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets shared Access Authorization token for the User. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserUpdateParameters.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserUpdateParameters.cs new file mode 100644 index 000000000000..6a687400e415 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/UserUpdateParameters.cs @@ -0,0 +1,156 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// User update parameters. + /// + [Rest.Serialization.JsonTransformation] + public partial class UserUpdateParameters + { + /// + /// Initializes a new instance of the UserUpdateParameters class. + /// + public UserUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserUpdateParameters class. + /// + /// Account state. Specifies whether the user is + /// active or not. Blocked users are unable to sign into the developer + /// portal or call any APIs of subscribed products. Default state is + /// Active. Possible values include: 'active', 'blocked' + /// Optional note about a user set by the + /// administrator. + /// Collection of user identities. + /// Email address. Must not be empty and must be + /// unique within the service instance. + /// User Password. + /// First name. + /// Last name. + public UserUpdateParameters(UserState? state = default(UserState?), string note = default(string), IList identities = default(IList), string email = default(string), string password = default(string), string firstName = default(string), string lastName = default(string)) + { + State = state; + Note = note; + Identities = identities; + Email = email; + Password = password; + FirstName = firstName; + LastName = lastName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets account state. Specifies whether the user is active or + /// not. Blocked users are unable to sign into the developer portal or + /// call any APIs of subscribed products. Default state is Active. + /// Possible values include: 'active', 'blocked' + /// + [JsonProperty(PropertyName = "properties.state")] + public UserState? State { get; set; } + + /// + /// Gets or sets optional note about a user set by the administrator. + /// + [JsonProperty(PropertyName = "properties.note")] + public string Note { get; set; } + + /// + /// Gets collection of user identities. + /// + [JsonProperty(PropertyName = "properties.identities")] + public IList Identities { get; private set; } + + /// + /// Gets or sets email address. Must not be empty and must be unique + /// within the service instance. + /// + [JsonProperty(PropertyName = "properties.email")] + public string Email { get; set; } + + /// + /// Gets or sets user Password. + /// + [JsonProperty(PropertyName = "properties.password")] + public string Password { get; set; } + + /// + /// Gets or sets first name. + /// + [JsonProperty(PropertyName = "properties.firstName")] + public string FirstName { get; set; } + + /// + /// Gets or sets last name. + /// + [JsonProperty(PropertyName = "properties.lastName")] + public string LastName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Email != null) + { + if (Email.Length > 254) + { + throw new ValidationException(ValidationRules.MaxLength, "Email", 254); + } + if (Email.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Email", 1); + } + } + if (FirstName != null) + { + if (FirstName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "FirstName", 100); + } + if (FirstName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "FirstName", 1); + } + } + if (LastName != null) + { + if (LastName.Length > 100) + { + throw new ValidationException(ValidationRules.MaxLength, "LastName", 100); + } + if (LastName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "LastName", 1); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkConfiguration.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkConfiguration.cs new file mode 100644 index 000000000000..1a74549b482a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkConfiguration.cs @@ -0,0 +1,92 @@ +// 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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Configuration of a virtual network to which API Management service is + /// deployed. + /// + public partial class VirtualNetworkConfiguration + { + /// + /// Initializes a new instance of the VirtualNetworkConfiguration + /// class. + /// + public VirtualNetworkConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualNetworkConfiguration + /// class. + /// + /// The virtual network ID. This is typically a + /// GUID. Expect a null GUID by default. + /// The name of the subnet. + /// The full resource ID of a subnet in + /// a virtual network to deploy the API Management service in. + public VirtualNetworkConfiguration(string vnetid = default(string), string subnetname = default(string), string subnetResourceId = default(string)) + { + Vnetid = vnetid; + Subnetname = subnetname; + SubnetResourceId = subnetResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the virtual network ID. This is typically a GUID. Expect a + /// null GUID by default. + /// + [JsonProperty(PropertyName = "vnetid")] + public string Vnetid { get; private set; } + + /// + /// Gets the name of the subnet. + /// + [JsonProperty(PropertyName = "subnetname")] + public string Subnetname { get; private set; } + + /// + /// Gets or sets the full resource ID of a subnet in a virtual network + /// to deploy the API Management service in. + /// + [JsonProperty(PropertyName = "subnetResourceId")] + public string SubnetResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SubnetResourceId != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(SubnetResourceId, "^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "SubnetResourceId", "^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$"); + } + } + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkType.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkType.cs new file mode 100644 index 000000000000..26f9a118b70d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/VirtualNetworkType.cs @@ -0,0 +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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for VirtualNetworkType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum VirtualNetworkType + { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "External")] + External, + [EnumMember(Value = "Internal")] + Internal + } + internal static class VirtualNetworkTypeEnumExtension + { + internal static string ToSerializedValue(this VirtualNetworkType? value) => + value == null ? null : ((VirtualNetworkType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this VirtualNetworkType value) + { + switch( value ) + { + case VirtualNetworkType.None: + return "None"; + case VirtualNetworkType.External: + return "External"; + case VirtualNetworkType.Internal: + return "Internal"; + } + return null; + } + + internal static VirtualNetworkType? ParseVirtualNetworkType(this string value) + { + switch( value ) + { + case "None": + return VirtualNetworkType.None; + case "External": + return VirtualNetworkType.External; + case "Internal": + return VirtualNetworkType.Internal; + } + return null; + } + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/X509CertificateName.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/X509CertificateName.cs new file mode 100644 index 000000000000..8d2648dda97d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/Models/X509CertificateName.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.ApiManagement.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.ApiManagement; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Properties of server X509Names. + /// + /// + public partial class X509CertificateName + { + /// + /// Initializes a new instance of the X509CertificateName class. + /// + public X509CertificateName() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X509CertificateName class. + /// + /// Common Name of the Certificate. + /// Thumbprint for the Issuer + /// of the Certificate. + public X509CertificateName(string name = default(string), string issuerCertificateThumbprint = default(string)) + { + Name = name; + IssuerCertificateThumbprint = issuerCertificateThumbprint; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets common Name of the Certificate. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets thumbprint for the Issuer of the Certificate. + /// + [JsonProperty(PropertyName = "issuerCertificateThumbprint")] + public string IssuerCertificateThumbprint { get; set; } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperations.cs new file mode 100644 index 000000000000..ce12cf8670a7 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperations.cs @@ -0,0 +1,487 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// NetworkStatusOperations operations. + /// + internal partial class NetworkStatusOperations : IServiceOperations, INetworkStatusOperations + { + /// + /// Initializes a new instance of the NetworkStatusOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal NetworkStatusOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Gets the Connectivity Status to the external resources on which the Api + /// Management service depends from inside the Cloud Service. This also returns + /// the DNS Servers as visible to the CloudService. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + 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("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/networkstatus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the Connectivity Status to the external resources on which the Api + /// Management service depends from inside the Cloud Service. This also returns + /// the DNS Servers as visible to the CloudService. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Location in which the API Management service is deployed. This is one of + /// the Azure Regions like West US, East US, South Central US. + /// + /// + /// 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> ListByLocationWithHttpMessagesAsync(string resourceGroupName, string serviceName, string locationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (locationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "locationName"); + } + if (locationName != null) + { + if (locationName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "locationName", 1); + } + } + 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("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("locationName", locationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByLocation", 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.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperationsExtensions.cs new file mode 100644 index 000000000000..3fd2848619c1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/NetworkStatusOperationsExtensions.cs @@ -0,0 +1,121 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for NetworkStatusOperations. + /// + public static partial class NetworkStatusOperationsExtensions + { + /// + /// Gets the Connectivity Status to the external resources on which the Api + /// Management service depends from inside the Cloud Service. This also returns + /// the DNS Servers as visible to the CloudService. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static NetworkStatusContract ListByService(this INetworkStatusOperations operations, string resourceGroupName, string serviceName) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the Connectivity Status to the external resources on which the Api + /// Management service depends from inside the Cloud Service. This also returns + /// the DNS Servers as visible to the CloudService. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task ListByServiceAsync(this INetworkStatusOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the Connectivity Status to the external resources on which the Api + /// Management service depends from inside the Cloud Service. This also returns + /// the DNS Servers as visible to the CloudService. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Location in which the API Management service is deployed. This is one of + /// the Azure Regions like West US, East US, South Central US. + /// + public static NetworkStatusContract ListByLocation(this INetworkStatusOperations operations, string resourceGroupName, string serviceName, string locationName) + { + return operations.ListByLocationAsync(resourceGroupName, serviceName, locationName).GetAwaiter().GetResult(); + } + + /// + /// Gets the Connectivity Status to the external resources on which the Api + /// Management service depends from inside the Cloud Service. This also returns + /// the DNS Servers as visible to the CloudService. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Location in which the API Management service is deployed. This is one of + /// the Azure Regions like West US, East US, South Central US. + /// + /// + /// The cancellation token. + /// + public static async Task ListByLocationAsync(this INetworkStatusOperations operations, string resourceGroupName, string serviceName, string locationName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByLocationWithHttpMessagesAsync(resourceGroupName, serviceName, locationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperations.cs new file mode 100644 index 000000000000..689a552c1b91 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperations.cs @@ -0,0 +1,1413 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// OpenIdConnectProviderOperations operations. + /// + internal partial class OpenIdConnectProviderOperations : IServiceOperations, IOpenIdConnectProviderOperations + { + /// + /// Initializes a new instance of the OpenIdConnectProviderOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal OpenIdConnectProviderOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/openidConnectProviders").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets specific OpenID Connect Provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// 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 serviceName, string opid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (opid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "opid"); + } + if (opid != null) + { + if (opid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "opid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(opid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "opid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("opid", opid); + 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.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{opid}", System.Uri.EscapeDataString(opid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates the OpenID Connect Provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string opid, OpenidConnectProviderContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (opid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "opid"); + } + if (opid != null) + { + if (opid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "opid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(opid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "opid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("opid", opid); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{opid}", System.Uri.EscapeDataString(opid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the specific OpenID Connect Provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string opid, OpenidConnectProviderUpdateContract parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (opid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "opid"); + } + if (opid != null) + { + if (opid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "opid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(opid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "opid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("opid", opid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{opid}", System.Uri.EscapeDataString(opid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes specific OpenID Connect Provider of the API Management service + /// instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// 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 serviceName, string opid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (opid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "opid"); + } + if (opid != null) + { + if (opid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "opid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(opid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "opid", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("opid", opid); + 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.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{opid}", System.Uri.EscapeDataString(opid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperationsExtensions.cs new file mode 100644 index 000000000000..162e32e125d9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/OpenIdConnectProviderOperationsExtensions.cs @@ -0,0 +1,318 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for OpenIdConnectProviderOperations. + /// + public static partial class OpenIdConnectProviderOperationsExtensions + { + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IOpenIdConnectProviderOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets specific OpenID Connect Provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + public static OpenidConnectProviderContract Get(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid) + { + return operations.GetAsync(resourceGroupName, serviceName, opid).GetAwaiter().GetResult(); + } + + /// + /// Gets specific OpenID Connect Provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, opid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates the OpenID Connect Provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Create parameters. + /// + public static OpenidConnectProviderContract CreateOrUpdate(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, OpenidConnectProviderContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, opid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates the OpenID Connect Provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, OpenidConnectProviderContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, opid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the specific OpenID Connect Provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + public static void Update(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, OpenidConnectProviderUpdateContract parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, opid, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the specific OpenID Connect Provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to update. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, OpenidConnectProviderUpdateContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, opid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes specific OpenID Connect Provider of the API Management service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + public static void Delete(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, opid, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific OpenID Connect Provider of the API Management service + /// instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the OpenID Connect Provider. + /// + /// + /// The entity state (Etag) version of the OpenID Connect Provider to delete. A + /// value of "*" can be used for If-Match to unconditionally apply the + /// operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IOpenIdConnectProviderOperations operations, string resourceGroupName, string serviceName, string opid, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, opid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IOpenIdConnectProviderOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all OpenID Connect Providers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IOpenIdConnectProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperations.cs new file mode 100644 index 000000000000..d27e7ad75e24 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperations.cs @@ -0,0 +1,947 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// PolicyOperations operations. + /// + internal partial class PolicyOperations : IServiceOperations, IPolicyOperations + { + /// + /// Initializes a new instance of the PolicyOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PolicyOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all the Global Policy definitions of the Api Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("scope", scope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/policies").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (scope != null) + { + _queryParameters.Add(string.Format("scope={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(scope, Client.SerializationSettings).Trim('"')))); + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the Global policy definition of the Api Management service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates the global policy configuration of the Api Management + /// service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The policy contents to apply. + /// + /// + /// 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 serviceName, PolicyContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("policyId", policyId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the global policy configuration of the Api Management Service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The entity state (Etag) version of the policy to be deleted. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperationsExtensions.cs new file mode 100644 index 000000000000..bb47686b7ed6 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicyOperationsExtensions.cs @@ -0,0 +1,206 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PolicyOperations. + /// + public static partial class PolicyOperationsExtensions + { + /// + /// Lists all the Global Policy definitions of the Api Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + public static PolicyCollection ListByService(this IPolicyOperations operations, string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?)) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName, scope).GetAwaiter().GetResult(); + } + + /// + /// Lists all the Global Policy definitions of the Api Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + /// + /// The cancellation token. + /// + public static async Task ListByServiceAsync(this IPolicyOperations operations, string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the Global policy definition of the Api Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static PolicyContract Get(this IPolicyOperations operations, string resourceGroupName, string serviceName) + { + return operations.GetAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Get the Global policy definition of the Api Management service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPolicyOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates the global policy configuration of the Api Management + /// service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The policy contents to apply. + /// + public static PolicyContract CreateOrUpdate(this IPolicyOperations operations, string resourceGroupName, string serviceName, PolicyContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates the global policy configuration of the Api Management + /// service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The policy contents to apply. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IPolicyOperations operations, string resourceGroupName, string serviceName, PolicyContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the global policy configuration of the Api Management Service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The entity state (Etag) version of the policy to be deleted. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IPolicyOperations operations, string resourceGroupName, string serviceName, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the global policy configuration of the Api Management Service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The entity state (Etag) version of the policy to be deleted. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPolicyOperations operations, string resourceGroupName, string serviceName, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperations.cs new file mode 100644 index 000000000000..280912825e42 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperations.cs @@ -0,0 +1,274 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// PolicySnippetsOperations operations. + /// + internal partial class PolicySnippetsOperations : IServiceOperations, IPolicySnippetsOperations + { + /// + /// Initializes a new instance of the PolicySnippetsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PolicySnippetsOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all policy snippets. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("scope", scope); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/policySnippets").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (scope != null) + { + _queryParameters.Add(string.Format("scope={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(scope, Client.SerializationSettings).Trim('"')))); + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperationsExtensions.cs new file mode 100644 index 000000000000..7093daa618a3 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PolicySnippetsOperationsExtensions.cs @@ -0,0 +1,73 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PolicySnippetsOperations. + /// + public static partial class PolicySnippetsOperationsExtensions + { + /// + /// Lists all policy snippets. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + public static PolicySnippetsCollection ListByService(this IPolicySnippetsOperations operations, string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?)) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName, scope).GetAwaiter().GetResult(); + } + + /// + /// Lists all policy snippets. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Policy scope. Possible values include: 'Tenant', 'Product', 'Api', + /// 'Operation', 'All' + /// + /// + /// The cancellation token. + /// + public static async Task ListByServiceAsync(this IPolicySnippetsOperations operations, string resourceGroupName, string serviceName, PolicyScopeContract? scope = default(PolicyScopeContract?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, scope, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperations.cs new file mode 100644 index 000000000000..fe42030a5e8d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperations.cs @@ -0,0 +1,975 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ProductApiOperations operations. + /// + internal partial class ProductApiOperations : IServiceOperations, IProductApiOperations + { + /// + /// Initializes a new instance of the ProductApiOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ProductApiOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListByProductWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByProduct", 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.ApiManagement/service/{serviceName}/products/{productId}/apis").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Adds an API to the specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string productId, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("apiId", apiId); + 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.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified API from the specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string productId, string apiId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (apiId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "apiId"); + } + if (apiId != null) + { + if (apiId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "apiId", 256); + } + if (apiId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "apiId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("apiId", apiId); + 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.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{apiId}", System.Uri.EscapeDataString(apiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// 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>> ListByProductNextWithHttpMessagesAsync(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, "ListByProductNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ProductApiOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperationsExtensions.cs new file mode 100644 index 000000000000..1d9ede23ed7d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductApiOperationsExtensions.cs @@ -0,0 +1,223 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ProductApiOperations. + /// + public static partial class ProductApiOperationsExtensions + { + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByProduct(this IProductApiOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IProductApiOperations)operations).ListByProductAsync(resourceGroupName, serviceName, productId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByProductAsync(this IProductApiOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductWithHttpMessagesAsync(resourceGroupName, serviceName, productId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Adds an API to the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + public static ApiContract CreateOrUpdate(this IProductApiOperations operations, string resourceGroupName, string serviceName, string productId, string apiId) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, productId, apiId).GetAwaiter().GetResult(); + } + + /// + /// Adds an API to the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IProductApiOperations operations, string resourceGroupName, string serviceName, string productId, string apiId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, productId, apiId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the specified API from the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + public static void Delete(this IProductApiOperations operations, string resourceGroupName, string serviceName, string productId, string apiId) + { + operations.DeleteAsync(resourceGroupName, serviceName, productId, apiId).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified API from the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// API identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IProductApiOperations operations, string resourceGroupName, string serviceName, string productId, string apiId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, productId, apiId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByProductNext(this IProductApiOperations operations, string nextPageLink) + { + return operations.ListByProductNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of the APIs associated with a product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByProductNextAsync(this IProductApiOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperations.cs new file mode 100644 index 000000000000..9e056933ec7d --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperations.cs @@ -0,0 +1,978 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ProductGroupOperations operations. + /// + internal partial class ProductGroupOperations : IServiceOperations, IProductGroupOperations + { + /// + /// Initializes a new instance of the ProductGroupOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ProductGroupOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists the collection of developer groups associated with the specified + /// product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListByProductWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByProduct", 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.ApiManagement/service/{serviceName}/products/{productId}/groups").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Adds the association between the specified developer group with the + /// specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string productId, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("groupId", groupId); + 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.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the association between the specified group and product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string productId, string groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (groupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "groupId"); + } + if (groupId != null) + { + if (groupId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "groupId", 256); + } + if (groupId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "groupId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(groupId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "groupId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("groupId", groupId); + 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.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(groupId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists the collection of developer groups associated with the specified + /// product. + /// + /// + /// 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>> ListByProductNextWithHttpMessagesAsync(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, "ListByProductNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperationsExtensions.cs new file mode 100644 index 000000000000..ce343ab92c12 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductGroupOperationsExtensions.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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ProductGroupOperations. + /// + public static partial class ProductGroupOperationsExtensions + { + /// + /// Lists the collection of developer groups associated with the specified + /// product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByProduct(this IProductGroupOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IProductGroupOperations)operations).ListByProductAsync(resourceGroupName, serviceName, productId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists the collection of developer groups associated with the specified + /// product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByProductAsync(this IProductGroupOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductWithHttpMessagesAsync(resourceGroupName, serviceName, productId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Adds the association between the specified developer group with the + /// specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + public static GroupContract CreateOrUpdate(this IProductGroupOperations operations, string resourceGroupName, string serviceName, string productId, string groupId) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, productId, groupId).GetAwaiter().GetResult(); + } + + /// + /// Adds the association between the specified developer group with the + /// specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IProductGroupOperations operations, string resourceGroupName, string serviceName, string productId, string groupId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, productId, groupId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the association between the specified group and product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + public static void Delete(this IProductGroupOperations operations, string resourceGroupName, string serviceName, string productId, string groupId) + { + operations.DeleteAsync(resourceGroupName, serviceName, productId, groupId).GetAwaiter().GetResult(); + } + + /// + /// Deletes the association between the specified group and product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Group identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IProductGroupOperations operations, string resourceGroupName, string serviceName, string productId, string groupId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, productId, groupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists the collection of developer groups associated with the specified + /// product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByProductNext(this IProductGroupOperations operations, string nextPageLink) + { + return operations.ListByProductNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the collection of developer groups associated with the specified + /// product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByProductNextAsync(this IProductGroupOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperations.cs new file mode 100644 index 000000000000..91177c33b8b0 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperations.cs @@ -0,0 +1,1439 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ProductOperations operations. + /// + internal partial class ProductOperations : IServiceOperations, IProductOperations + { + /// + /// Initializes a new instance of the ProductOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ProductOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// When set to true, the response contains an array of groups that have + /// visibility to the product. The default is false. + /// + /// + /// 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), bool? expandGroups = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("expandGroups", expandGroups); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/products").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + if (expandGroups != null) + { + _queryParameters.Add(string.Format("expandGroups={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(expandGroups, Client.SerializationSettings).Trim('"')))); + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the product specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string productId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + 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.ApiManagement/service/{serviceName}/products/{productId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// 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 serviceName, string productId, ProductContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/products/{productId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Update product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ProductUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Delete product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// Delete existing subscriptions to the product or not. + /// + /// + /// 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 serviceName, string productId, string ifMatch, bool? deleteSubscriptions = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("deleteSubscriptions", deleteSubscriptions); + 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.ApiManagement/service/{serviceName}/products/{productId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (deleteSubscriptions != null) + { + _queryParameters.Add(string.Format("deleteSubscriptions={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteSubscriptions, Client.SerializationSettings).Trim('"')))); + } + 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ProductOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperationsExtensions.cs new file mode 100644 index 000000000000..b63e82b952b8 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductOperationsExtensions.cs @@ -0,0 +1,338 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ProductOperations. + /// + public static partial class ProductOperationsExtensions + { + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// When set to true, the response contains an array of groups that have + /// visibility to the product. The default is false. + /// + public static IPage ListByService(this IProductOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), bool? expandGroups = default(bool?)) + { + return ((IProductOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery, expandGroups).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// When set to true, the response contains an array of groups that have + /// visibility to the product. The default is false. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IProductOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), bool? expandGroups = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, expandGroups, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the product specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + public static ProductContract Get(this IProductOperations operations, string resourceGroupName, string serviceName, string productId) + { + return operations.GetAsync(resourceGroupName, serviceName, productId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the product specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, productId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + public static ProductContract CreateOrUpdate(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, ProductContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, productId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, ProductContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, productId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + public static void Update(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, ProductUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, productId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Update product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, ProductUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, productId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Delete product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// Delete existing subscriptions to the product or not. + /// + public static void Delete(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, string ifMatch, bool? deleteSubscriptions = default(bool?)) + { + operations.DeleteAsync(resourceGroupName, serviceName, productId, ifMatch, deleteSubscriptions).GetAwaiter().GetResult(); + } + + /// + /// Delete product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// ETag of the Product Entity. ETag should match the current entity state from + /// the header response of the GET request or it should be * for unconditional + /// update. + /// + /// + /// Delete existing subscriptions to the product or not. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IProductOperations operations, string resourceGroupName, string serviceName, string productId, string ifMatch, bool? deleteSubscriptions = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, productId, ifMatch, deleteSubscriptions, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IProductOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of products in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IProductOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperations.cs new file mode 100644 index 000000000000..146a3ba77b3a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperations.cs @@ -0,0 +1,1045 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// ProductPolicyOperations operations. + /// + internal partial class ProductPolicyOperations : IServiceOperations, IProductPolicyOperations + { + /// + /// Initializes a new instance of the ProductPolicyOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ProductPolicyOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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> ListByProductWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + 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 (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByProduct", 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.ApiManagement/service/{serviceName}/products/{productId}/policies").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string productId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + 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 (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates policy configuration for the Product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// 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 serviceName, string productId, PolicyContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("policyId", policyId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the policy configuration at the Product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the product policy to update. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string productId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string policyId = "policy"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("policyId", policyId); + 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.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{policyId}", System.Uri.EscapeDataString(policyId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperationsExtensions.cs new file mode 100644 index 000000000000..20d764fffe72 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductPolicyOperationsExtensions.cs @@ -0,0 +1,228 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ProductPolicyOperations. + /// + public static partial class ProductPolicyOperationsExtensions + { + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + public static PolicyCollection ListByProduct(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId) + { + return operations.ListByProductAsync(resourceGroupName, serviceName, productId).GetAwaiter().GetResult(); + } + + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task ListByProductAsync(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductWithHttpMessagesAsync(resourceGroupName, serviceName, productId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + public static PolicyContract Get(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId) + { + return operations.GetAsync(resourceGroupName, serviceName, productId).GetAwaiter().GetResult(); + } + + /// + /// Get the policy configuration at the Product level. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, productId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates policy configuration for the Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The policy contents to apply. + /// + public static PolicyContract CreateOrUpdate(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId, PolicyContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, productId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates policy configuration for the Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The policy contents to apply. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId, PolicyContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, productId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the policy configuration at the Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the product policy to update. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, productId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the policy configuration at the Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the product policy to update. A value of + /// "*" can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IProductPolicyOperations operations, string resourceGroupName, string serviceName, string productId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, productId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperations.cs new file mode 100644 index 000000000000..e992c165ac26 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperations.cs @@ -0,0 +1,466 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ProductSubscriptionsOperations operations. + /// + internal partial class ProductSubscriptionsOperations : IServiceOperations, IProductSubscriptionsOperations + { + /// + /// Initializes a new instance of the ProductSubscriptionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ProductSubscriptionsOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (productId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "productId"); + } + if (productId != null) + { + if (productId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "productId", 256); + } + if (productId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "productId", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(productId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "productId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("productId", productId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{productId}", System.Uri.EscapeDataString(productId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 the collection of subscriptions to the specified product. + /// + /// + /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperationsExtensions.cs new file mode 100644 index 000000000000..2faa3d5a8d2f --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ProductSubscriptionsOperationsExtensions.cs @@ -0,0 +1,114 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ProductSubscriptionsOperations. + /// + public static partial class ProductSubscriptionsOperationsExtensions + { + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage List(this IProductSubscriptionsOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IProductSubscriptionsOperations)operations).ListAsync(resourceGroupName, serviceName, productId, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Product identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IProductSubscriptionsOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, productId, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IProductSubscriptionsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the collection of subscriptions to the specified product. + /// + /// + /// 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 IProductSubscriptionsOperations 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/ApiManagement/Management.ApiManagement/Generated/PropertyOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperations.cs new file mode 100644 index 000000000000..17c99f0237d1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperations.cs @@ -0,0 +1,1412 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// PropertyOperations operations. + /// + internal partial class PropertyOperations : IServiceOperations, IPropertyOperations + { + /// + /// Initializes a new instance of the PropertyOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PropertyOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/properties").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the details of the property specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// 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 serviceName, string propId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (propId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "propId"); + } + if (propId != null) + { + if (propId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "propId", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(propId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "propId", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("propId", propId); + 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.ApiManagement/service/{serviceName}/properties/{propId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{propId}", System.Uri.EscapeDataString(propId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a property. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string propId, PropertyContract parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (propId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "propId"); + } + if (propId != null) + { + if (propId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "propId", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(propId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "propId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("propId", propId); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/properties/{propId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{propId}", System.Uri.EscapeDataString(propId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the specific property. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the property to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string propId, PropertyUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (propId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "propId"); + } + if (propId != null) + { + if (propId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "propId", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(propId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "propId", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("propId", propId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{propId}", System.Uri.EscapeDataString(propId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes specific property from the the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// The entity state (Etag) version of the property to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 serviceName, string propId, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (propId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "propId"); + } + if (propId != null) + { + if (propId.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "propId", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(propId, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "propId", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("propId", propId); + 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.ApiManagement/service/{serviceName}/properties/{propId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{propId}", System.Uri.EscapeDataString(propId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperationsExtensions.cs new file mode 100644 index 000000000000..612725cbeb44 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/PropertyOperationsExtensions.cs @@ -0,0 +1,316 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PropertyOperations. + /// + public static partial class PropertyOperationsExtensions + { + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IPropertyOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IPropertyOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IPropertyOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the property specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + public static PropertyContract Get(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId) + { + return operations.GetAsync(resourceGroupName, serviceName, propId).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the property specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, propId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a property. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Create parameters. + /// + public static PropertyContract CreateOrUpdate(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, PropertyContract parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, propId, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a property. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, PropertyContract parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, propId, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the specific property. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the property to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Update(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, PropertyUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, propId, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the specific property. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the property to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, PropertyUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, propId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes specific property from the the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// The entity state (Etag) version of the property to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Delete(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, propId, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific property from the the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Identifier of the property. + /// + /// + /// The entity state (Etag) version of the property to delete. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPropertyOperations operations, string resourceGroupName, string serviceName, string propId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, propId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IPropertyOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of properties defined within a service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IPropertyOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperations.cs new file mode 100644 index 000000000000..40ab193b6b88 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperations.cs @@ -0,0 +1,490 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// QuotaByCounterKeysOperations operations. + /// + internal partial class QuotaByCounterKeysOperations : IServiceOperations, IQuotaByCounterKeysOperations + { + /// + /// Initializes a new instance of the QuotaByCounterKeysOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal QuotaByCounterKeysOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of current quota counter periods associated with the + /// counter-key configured in the policy on the specified service instance. The + /// api does not support paging yet. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// 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> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, string quotaCounterKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (quotaCounterKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "quotaCounterKey"); + } + 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("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("quotaCounterKey", quotaCounterKey); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{quotaCounterKey}", System.Uri.EscapeDataString(quotaCounterKey)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates all the quota counter values specified with the existing quota + /// counter key to a value in the specified service instance. This should be + /// used for reset of the quota counter values. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// The value of the quota counter to be applied to all quota counter periods. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string quotaCounterKey, QuotaCounterValueContractProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (quotaCounterKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "quotaCounterKey"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("quotaCounterKey", quotaCounterKey); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{quotaCounterKey}", System.Uri.EscapeDataString(quotaCounterKey)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperationsExtensions.cs new file mode 100644 index 000000000000..a731d133d9be --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByCounterKeysOperationsExtensions.cs @@ -0,0 +1,146 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for QuotaByCounterKeysOperations. + /// + public static partial class QuotaByCounterKeysOperationsExtensions + { + /// + /// Lists a collection of current quota counter periods associated with the + /// counter-key configured in the policy on the specified service instance. The + /// api does not support paging yet. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + public static QuotaCounterCollection ListByService(this IQuotaByCounterKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName, quotaCounterKey).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of current quota counter periods associated with the + /// counter-key configured in the policy on the specified service instance. The + /// api does not support paging yet. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// The cancellation token. + /// + public static async Task ListByServiceAsync(this IQuotaByCounterKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, quotaCounterKey, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates all the quota counter values specified with the existing quota + /// counter key to a value in the specified service instance. This should be + /// used for reset of the quota counter values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// The value of the quota counter to be applied to all quota counter periods. + /// + public static void Update(this IQuotaByCounterKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, QuotaCounterValueContractProperties parameters) + { + operations.UpdateAsync(resourceGroupName, serviceName, quotaCounterKey, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates all the quota counter values specified with the existing quota + /// counter key to a value in the specified service instance. This should be + /// used for reset of the quota counter values. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// The value of the quota counter to be applied to all quota counter periods. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IQuotaByCounterKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, QuotaCounterValueContractProperties parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, quotaCounterKey, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperations.cs new file mode 100644 index 000000000000..1bb1e8255c1f --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperations.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// QuotaByPeriodKeysOperations operations. + /// + internal partial class QuotaByPeriodKeysOperations : IServiceOperations, IQuotaByPeriodKeysOperations + { + /// + /// Initializes a new instance of the QuotaByPeriodKeysOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal QuotaByPeriodKeysOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Gets the value of the quota counter associated with the counter-key in the + /// policy for the specific period in service instance. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// 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 serviceName, string quotaCounterKey, string quotaPeriodKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (quotaCounterKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "quotaCounterKey"); + } + if (quotaPeriodKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "quotaPeriodKey"); + } + 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("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("quotaCounterKey", quotaCounterKey); + tracingParameters.Add("quotaPeriodKey", quotaPeriodKey); + 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.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/{quotaPeriodKey}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{quotaCounterKey}", System.Uri.EscapeDataString(quotaCounterKey)); + _url = _url.Replace("{quotaPeriodKey}", System.Uri.EscapeDataString(quotaPeriodKey)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates an existing quota counter value in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// The value of the Quota counter to be applied on the specified period. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string quotaCounterKey, string quotaPeriodKey, QuotaCounterValueContractProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (quotaCounterKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "quotaCounterKey"); + } + if (quotaPeriodKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "quotaPeriodKey"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("quotaCounterKey", quotaCounterKey); + tracingParameters.Add("quotaPeriodKey", quotaPeriodKey); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/{quotaPeriodKey}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{quotaCounterKey}", System.Uri.EscapeDataString(quotaCounterKey)); + _url = _url.Replace("{quotaPeriodKey}", System.Uri.EscapeDataString(quotaPeriodKey)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperationsExtensions.cs new file mode 100644 index 000000000000..aed99e368ddf --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/QuotaByPeriodKeysOperationsExtensions.cs @@ -0,0 +1,152 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for QuotaByPeriodKeysOperations. + /// + public static partial class QuotaByPeriodKeysOperationsExtensions + { + /// + /// Gets the value of the quota counter associated with the counter-key in the + /// policy for the specific period in service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + public static QuotaCounterContract Get(this IQuotaByPeriodKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, string quotaPeriodKey) + { + return operations.GetAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey).GetAwaiter().GetResult(); + } + + /// + /// Gets the value of the quota counter associated with the counter-key in the + /// policy for the specific period in service instance. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IQuotaByPeriodKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, string quotaPeriodKey, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an existing quota counter value in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// The value of the Quota counter to be applied on the specified period. + /// + public static void Update(this IQuotaByPeriodKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, string quotaPeriodKey, QuotaCounterValueContractProperties parameters) + { + operations.UpdateAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing quota counter value in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Quota counter key identifier.This is the result of expression defined in + /// counter-key attribute of the quota-by-key policy.For Example, if you + /// specify counter-key="boo" in the policy, then it’s accessible by "boo" + /// counter key. But if it’s defined as counter-key="@("b"+"a")" then it will + /// be accessible by "ba" key + /// + /// + /// Quota period key identifier. + /// + /// + /// The value of the Quota counter to be applied on the specified period. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IQuotaByPeriodKeysOperations operations, string resourceGroupName, string serviceName, string quotaCounterKey, string quotaPeriodKey, QuotaCounterValueContractProperties parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperations.cs new file mode 100644 index 000000000000..7dfde1689f6a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperations.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// RegionsOperations operations. + /// + internal partial class RegionsOperations : IServiceOperations, IRegionsOperations + { + /// + /// Initializes a new instance of the RegionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal RegionsOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all azure regions in which the service exists. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/regions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperationsExtensions.cs new file mode 100644 index 000000000000..2a5a95025f7a --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/RegionsOperationsExtensions.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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for RegionsOperations. + /// + public static partial class RegionsOperationsExtensions + { + /// + /// Lists all azure regions in which the service exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IEnumerable ListByService(this IRegionsOperations operations, string resourceGroupName, string serviceName) + { + return operations.ListByServiceAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists all azure regions in which the service exists. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IRegionsOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperations.cs new file mode 100644 index 000000000000..e4200792deed --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperations.cs @@ -0,0 +1,3103 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// ReportsOperations operations. + /// + internal partial class ReportsOperations : IServiceOperations, IReportsOperations + { + /// + /// Initializes a new instance of the ReportsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReportsOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists report records. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByApiWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (odataQuery == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "odataQuery"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byApiId = "byApi"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byApiId", byApiId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByApi", 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.ApiManagement/service/{serviceName}/reports/{byApiId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byApiId}", System.Uri.EscapeDataString(byApiId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by User. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByUserWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (odataQuery == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "odataQuery"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byUserId = "byUser"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byUserId", byUserId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByUser", 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.ApiManagement/service/{serviceName}/reports/{byUserId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byUserId}", System.Uri.EscapeDataString(byUserId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by API Operations. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByOperationWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (odataQuery == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "odataQuery"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byOperationId = "byOperation"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byOperationId", byOperationId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByOperation", 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.ApiManagement/service/{serviceName}/reports/{byOperationId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byOperationId}", System.Uri.EscapeDataString(byOperationId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by Product. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByProductWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (odataQuery == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "odataQuery"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byProductId = "byProduct"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byProductId", byProductId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByProduct", 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.ApiManagement/service/{serviceName}/reports/{byProductId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byProductId}", System.Uri.EscapeDataString(byProductId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by GeoGraphy. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByGeoWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byGeoId = "byGeo"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byGeoId", byGeoId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByGeo", 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.ApiManagement/service/{serviceName}/reports/{byGeoId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byGeoId}", System.Uri.EscapeDataString(byGeoId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by subscription. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListBySubscriptionWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string bySubscriptionId = "bySubscription"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("bySubscriptionId", bySubscriptionId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/{bySubscriptionId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{bySubscriptionId}", System.Uri.EscapeDataString(bySubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by Time. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// By time interval. Interval must be multiple of 15 minutes and may not be + /// zero. The value should be in ISO 8601 format + /// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + /// convert TimeSpan to a valid interval string: XmlConvert.ToString(new + /// TimeSpan(hours, minutes, secconds)) + /// + /// + /// OData parameters to apply to the 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>> ListByTimeWithHttpMessagesAsync(string resourceGroupName, string serviceName, System.TimeSpan interval, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byTimeId = "byTime"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byTimeId", byTimeId); + tracingParameters.Add("interval", interval); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByTime", 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.ApiManagement/service/{serviceName}/reports/{byTimeId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byTimeId}", System.Uri.EscapeDataString(byTimeId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + _queryParameters.Add(string.Format("interval={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(interval, Client.SerializationSettings).Trim('"')))); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by Request. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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>> ListByRequestWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (odataQuery == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "odataQuery"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string byRequestId = "byRequest"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("byRequestId", byRequestId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByRequest", 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.ApiManagement/service/{serviceName}/reports/{byRequestId}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{byRequestId}", System.Uri.EscapeDataString(byRequestId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records. + /// + /// + /// 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>> ListByApiNextWithHttpMessagesAsync(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, "ListByApiNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by User. + /// + /// + /// 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>> ListByUserNextWithHttpMessagesAsync(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, "ListByUserNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by 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>> ListByOperationNextWithHttpMessagesAsync(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, "ListByOperationNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by Product. + /// + /// + /// 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>> ListByProductNextWithHttpMessagesAsync(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, "ListByProductNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by GeoGraphy. + /// + /// + /// 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>> ListByGeoNextWithHttpMessagesAsync(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, "ListByGeoNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists report records by Time. + /// + /// + /// 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>> ListByTimeNextWithHttpMessagesAsync(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, "ListByTimeNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperationsExtensions.cs new file mode 100644 index 000000000000..d55f83551452 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ReportsOperationsExtensions.cs @@ -0,0 +1,648 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReportsOperations. + /// + public static partial class ReportsOperationsExtensions + { + /// + /// Lists report records. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IPage ListByApi(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName) + { + return ((IReportsOperations)operations).ListByApiAsync(odataQuery, resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists report records. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByApiAsync(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApiWithHttpMessagesAsync(odataQuery, resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by User. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IPage ListByUser(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName) + { + return operations.ListByUserAsync(odataQuery, resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by User. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByUserAsync(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByUserWithHttpMessagesAsync(odataQuery, resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by API Operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IPage ListByOperation(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName) + { + return operations.ListByOperationAsync(odataQuery, resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by API Operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByOperationAsync(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByOperationWithHttpMessagesAsync(odataQuery, resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IPage ListByProduct(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName) + { + return ((IReportsOperations)operations).ListByProductAsync(odataQuery, resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByProductAsync(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductWithHttpMessagesAsync(odataQuery, resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by GeoGraphy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByGeo(this IReportsOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return operations.ListByGeoAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by GeoGraphy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByGeoAsync(this IReportsOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByGeoWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListBySubscription(this IReportsOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return operations.ListBySubscriptionAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IReportsOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by Time. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// By time interval. Interval must be multiple of 15 minutes and may not be + /// zero. The value should be in ISO 8601 format + /// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + /// convert TimeSpan to a valid interval string: XmlConvert.ToString(new + /// TimeSpan(hours, minutes, secconds)) + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByTime(this IReportsOperations operations, string resourceGroupName, string serviceName, System.TimeSpan interval, ODataQuery odataQuery = default(ODataQuery)) + { + return operations.ListByTimeAsync(resourceGroupName, serviceName, interval, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by Time. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// By time interval. Interval must be multiple of 15 minutes and may not be + /// zero. The value should be in ISO 8601 format + /// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to + /// convert TimeSpan to a valid interval string: XmlConvert.ToString(new + /// TimeSpan(hours, minutes, secconds)) + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByTimeAsync(this IReportsOperations operations, string resourceGroupName, string serviceName, System.TimeSpan interval, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByTimeWithHttpMessagesAsync(resourceGroupName, serviceName, interval, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by Request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static IEnumerable ListByRequest(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName) + { + return operations.ListByRequestAsync(odataQuery, resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by Request. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByRequestAsync(this IReportsOperations operations, ODataQuery odataQuery, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByRequestWithHttpMessagesAsync(odataQuery, resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByApiNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListByApiNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByApiNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByApiNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by User. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByUserNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListByUserNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by User. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByUserNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByUserNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by API Operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByOperationNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListByOperationNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by 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> ListByOperationNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByOperationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByProductNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListByProductNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by Product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByProductNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByProductNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by GeoGraphy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByGeoNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListByGeoNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by GeoGraphy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByGeoNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByGeoNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBySubscriptionNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists report records by Time. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByTimeNext(this IReportsOperations operations, string nextPageLink) + { + return operations.ListByTimeNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists report records by Time. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByTimeNextAsync(this IReportsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByTimeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperations.cs new file mode 100644 index 000000000000..b91439e73bad --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperations.cs @@ -0,0 +1,1821 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// SubscriptionOperations operations. + /// + internal partial class SubscriptionOperations : IServiceOperations, ISubscriptionOperations + { + /// + /// Initializes a new instance of the SubscriptionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SubscriptionOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the specified Subscription entity. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// 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 serviceName, string sid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (sid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sid"); + } + if (sid != null) + { + if (sid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "sid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(sid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "sid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("sid", sid); + 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.ApiManagement/service/{serviceName}/subscriptions/{sid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{sid}", System.Uri.EscapeDataString(sid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates the subscription of specified user to the specified + /// product. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// Create parameters. + /// + /// + /// 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 serviceName, string sid, SubscriptionCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (sid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sid"); + } + if (sid != null) + { + if (sid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "sid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(sid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "sid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("sid", sid); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/subscriptions/{sid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{sid}", System.Uri.EscapeDataString(sid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the details of a subscription specificied by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (sid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sid"); + } + if (sid != null) + { + if (sid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "sid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(sid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "sid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("sid", sid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{sid}", System.Uri.EscapeDataString(sid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Deletes the specified subscription. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// 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 serviceName, string sid, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (sid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sid"); + } + if (sid != null) + { + if (sid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "sid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(sid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "sid", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("sid", sid); + 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.ApiManagement/service/{serviceName}/subscriptions/{sid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{sid}", System.Uri.EscapeDataString(sid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Regenerates primary key of existing subscription of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// 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 RegeneratePrimaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, string sid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (sid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sid"); + } + if (sid != null) + { + if (sid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "sid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(sid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "sid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("sid", sid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegeneratePrimaryKey", 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.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{sid}", System.Uri.EscapeDataString(sid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Regenerates secondary key of existing subscription of the API Management + /// service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// 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 RegenerateSecondaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, string sid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (sid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sid"); + } + if (sid != null) + { + if (sid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "sid", 256); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(sid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "sid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("sid", sid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateSecondaryKey", 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.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{sid}", System.Uri.EscapeDataString(sid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperationsExtensions.cs new file mode 100644 index 000000000000..f4aaa000475c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/SubscriptionOperationsExtensions.cs @@ -0,0 +1,420 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SubscriptionOperations. + /// + public static partial class SubscriptionOperationsExtensions + { + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage List(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((ISubscriptionOperations)operations).ListAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the specified Subscription entity. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + public static SubscriptionContract Get(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid) + { + return operations.GetAsync(resourceGroupName, serviceName, sid).GetAwaiter().GetResult(); + } + + /// + /// Gets the specified Subscription entity. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, sid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates the subscription of specified user to the specified + /// product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// Create parameters. + /// + public static SubscriptionContract CreateOrUpdate(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionCreateParameters parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, sid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates the subscription of specified user to the specified + /// product. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// Create parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, sid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the details of a subscription specificied by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + public static void Update(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, sid, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the details of a subscription specificied by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// Update parameters. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + public static void Delete(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, string ifMatch) + { + operations.DeleteAsync(resourceGroupName, serviceName, sid, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// ETag of the Subscription Entity. ETag should match the current entity state + /// from the header response of the GET request or it should be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, sid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Regenerates primary key of existing subscription of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + public static void RegeneratePrimaryKey(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid) + { + operations.RegeneratePrimaryKeyAsync(resourceGroupName, serviceName, sid).GetAwaiter().GetResult(); + } + + /// + /// Regenerates primary key of existing subscription of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// The cancellation token. + /// + public static async Task RegeneratePrimaryKeyAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RegeneratePrimaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, sid, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Regenerates secondary key of existing subscription of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + public static void RegenerateSecondaryKey(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid) + { + operations.RegenerateSecondaryKeyAsync(resourceGroupName, serviceName, sid).GetAwaiter().GetResult(); + } + + /// + /// Regenerates secondary key of existing subscription of the API Management + /// service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Subscription entity Identifier. The entity represents the association + /// between a user and a product in API Management. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateSecondaryKeyAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RegenerateSecondaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, sid, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISubscriptionOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all subscriptions of the API Management service instance. + /// + /// + /// 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 ISubscriptionOperations 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/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperations.cs new file mode 100644 index 000000000000..d7c3f6cf0e58 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperations.cs @@ -0,0 +1,652 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// TenantAccessGitOperations operations. + /// + internal partial class TenantAccessGitOperations : IServiceOperations, ITenantAccessGitOperations + { + /// + /// Initializes a new instance of the TenantAccessGitOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal TenantAccessGitOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Gets the Git access configuration for the tenant. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("accessName", accessName); + 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.ApiManagement/service/{serviceName}/tenant/{accessName}/git").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Regenerate primary access key for GIT. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegeneratePrimaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("accessName", accessName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegeneratePrimaryKey", 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.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + 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 (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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Regenerate secondary access key for GIT. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegenerateSecondaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("accessName", accessName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateSecondaryKey", 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.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + 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 (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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperationsExtensions.cs new file mode 100644 index 000000000000..4a340d1e4af4 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessGitOperationsExtensions.cs @@ -0,0 +1,139 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for TenantAccessGitOperations. + /// + public static partial class TenantAccessGitOperationsExtensions + { + /// + /// Gets the Git access configuration for the tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static AccessInformationContract Get(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName) + { + return operations.GetAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the Git access configuration for the tenant. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Regenerate primary access key for GIT. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static void RegeneratePrimaryKey(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName) + { + operations.RegeneratePrimaryKeyAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Regenerate primary access key for GIT. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task RegeneratePrimaryKeyAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RegeneratePrimaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Regenerate secondary access key for GIT. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static void RegenerateSecondaryKey(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName) + { + operations.RegenerateSecondaryKeyAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Regenerate secondary access key for GIT. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateSecondaryKeyAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RegenerateSecondaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperations.cs new file mode 100644 index 000000000000..e11c3411757c --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperations.cs @@ -0,0 +1,876 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// TenantAccessOperations operations. + /// + internal partial class TenantAccessOperations : IServiceOperations, ITenantAccessOperations + { + /// + /// Initializes a new instance of the TenantAccessOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal TenantAccessOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Get tenant access information details. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("accessName", accessName); + 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.ApiManagement/service/{serviceName}/tenant/{accessName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Update tenant access information details. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to retrieve the Tenant Access Information. + /// + /// + /// The entity state (Etag) version of the property to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, AccessInformationUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("accessName", accessName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Regenerate primary access key. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegeneratePrimaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("accessName", accessName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegeneratePrimaryKey", 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.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + 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 (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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Regenerate secondary access key. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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 RegenerateSecondaryKeyWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string accessName = "access"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("accessName", accessName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateSecondaryKey", 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.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{accessName}", System.Uri.EscapeDataString(accessName)); + 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 (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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperationsExtensions.cs new file mode 100644 index 000000000000..38d1dcb772d9 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantAccessOperationsExtensions.cs @@ -0,0 +1,190 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for TenantAccessOperations. + /// + public static partial class TenantAccessOperationsExtensions + { + /// + /// Get tenant access information details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static AccessInformationContract Get(this ITenantAccessOperations operations, string resourceGroupName, string serviceName) + { + return operations.GetAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Get tenant access information details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ITenantAccessOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update tenant access information details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to retrieve the Tenant Access Information. + /// + /// + /// The entity state (Etag) version of the property to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + public static void Update(this ITenantAccessOperations operations, string resourceGroupName, string serviceName, AccessInformationUpdateParameters parameters, string ifMatch) + { + operations.UpdateAsync(resourceGroupName, serviceName, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Update tenant access information details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Parameters supplied to retrieve the Tenant Access Information. + /// + /// + /// The entity state (Etag) version of the property to update. A value of "*" + /// can be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ITenantAccessOperations operations, string resourceGroupName, string serviceName, AccessInformationUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Regenerate primary access key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static void RegeneratePrimaryKey(this ITenantAccessOperations operations, string resourceGroupName, string serviceName) + { + operations.RegeneratePrimaryKeyAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Regenerate primary access key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task RegeneratePrimaryKeyAsync(this ITenantAccessOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RegeneratePrimaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Regenerate secondary access key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static void RegenerateSecondaryKey(this ITenantAccessOperations operations, string resourceGroupName, string serviceName) + { + operations.RegenerateSecondaryKeyAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Regenerate secondary access key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateSecondaryKeyAsync(this ITenantAccessOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RegenerateSecondaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperations.cs new file mode 100644 index 000000000000..83de99c37fa1 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperations.cs @@ -0,0 +1,1039 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// TenantConfigurationOperations operations. + /// + internal partial class TenantConfigurationOperations : IServiceOperations, ITenantConfigurationOperations + { + /// + /// Initializes a new instance of the TenantConfigurationOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal TenantConfigurationOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could take + /// several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeployWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeployWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation creates a commit with the current configuration snapshot to + /// the specified branch in the repository. This is a long running operation + /// and could take several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> SaveWithHttpMessagesAsync(string resourceGroupName, string serviceName, SaveConfigurationParameter parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSaveWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation validates the changes in the specified Git branch. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ValidateWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginValidateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the status of the most recent synchronization between the + /// configuration database and the Git repository. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// 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> GetSyncStateWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string configurationName = "configuration"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("configurationName", configurationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetSyncState", 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.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{configurationName}", System.Uri.EscapeDataString(configurationName)); + 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could take + /// several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + /// + /// 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> BeginDeployWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string configurationName = "configuration"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("configurationName", configurationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeploy", 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.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{configurationName}", System.Uri.EscapeDataString(configurationName)); + 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 (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 202 && (int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// This operation creates a commit with the current configuration snapshot to + /// the specified branch in the repository. This is a long running operation + /// and could take several minutes to complete. + /// + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + /// + /// 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> BeginSaveWithHttpMessagesAsync(string resourceGroupName, string serviceName, SaveConfigurationParameter parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string configurationName = "configuration"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("configurationName", configurationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginSave", 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.ApiManagement/service/{serviceName}/tenant/{configurationName}/save").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{configurationName}", System.Uri.EscapeDataString(configurationName)); + 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 (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 202 && (int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// This operation validates the changes in the specified Git branch. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + /// + /// 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> BeginValidateWithHttpMessagesAsync(string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string configurationName = "configuration"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("configurationName", configurationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginValidate", 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.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{configurationName}", System.Uri.EscapeDataString(configurationName)); + 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 (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 202 && (int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperationsExtensions.cs new file mode 100644 index 000000000000..91e35ade0d53 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/TenantConfigurationOperationsExtensions.cs @@ -0,0 +1,371 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for TenantConfigurationOperations. + /// + public static partial class TenantConfigurationOperationsExtensions + { + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could take + /// several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + public static OperationResultContract Deploy(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) + { + return operations.DeployAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could take + /// several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + /// + /// The cancellation token. + /// + public static async Task DeployAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeployWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// This operation creates a commit with the current configuration snapshot to + /// the specified branch in the repository. This is a long running operation + /// and could take several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + public static OperationResultContract Save(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, SaveConfigurationParameter parameters) + { + return operations.SaveAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation creates a commit with the current configuration snapshot to + /// the specified branch in the repository. This is a long running operation + /// and could take several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + /// + /// The cancellation token. + /// + public static async Task SaveAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, SaveConfigurationParameter parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.SaveWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// This operation validates the changes in the specified Git branch. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + public static OperationResultContract Validate(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) + { + return operations.ValidateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation validates the changes in the specified Git branch. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + /// + /// The cancellation token. + /// + public static async Task ValidateAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ValidateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the status of the most recent synchronization between the + /// configuration database and the Git repository. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + public static TenantConfigurationSyncStateContract GetSyncState(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName) + { + return operations.GetSyncStateAsync(resourceGroupName, serviceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the status of the most recent synchronization between the + /// configuration database and the Git repository. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// The cancellation token. + /// + public static async Task GetSyncStateAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSyncStateWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could take + /// several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + public static OperationResultContract BeginDeploy(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) + { + return operations.BeginDeployAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation applies changes from the specified Git branch to the + /// configuration database. This is a long running operation and could take + /// several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Deploy Configuration parameters. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeployAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginDeployWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// This operation creates a commit with the current configuration snapshot to + /// the specified branch in the repository. This is a long running operation + /// and could take several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + public static OperationResultContract BeginSave(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, SaveConfigurationParameter parameters) + { + return operations.BeginSaveAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation creates a commit with the current configuration snapshot to + /// the specified branch in the repository. This is a long running operation + /// and could take several minutes to complete. + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Save Configuration parameters. + /// + /// + /// The cancellation token. + /// + public static async Task BeginSaveAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, SaveConfigurationParameter parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginSaveWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// This operation validates the changes in the specified Git branch. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + public static OperationResultContract BeginValidate(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) + { + return operations.BeginValidateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This operation validates the changes in the specified Git branch. This is a + /// long running operation and could take several minutes to complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// Validate Configuration parameters. + /// + /// + /// The cancellation token. + /// + public static async Task BeginValidateAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginValidateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperations.cs new file mode 100644 index 000000000000..7991b593843f --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperations.cs @@ -0,0 +1,466 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// UserGroupOperations operations. + /// + internal partial class UserGroupOperations : IServiceOperations, IUserGroupOperations + { + /// + /// Initializes a new instance of the UserGroupOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal UserGroupOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all user groups. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/groups").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 user groups. + /// + /// + /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/UserGroupOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperationsExtensions.cs new file mode 100644 index 000000000000..cfb94354e541 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserGroupOperationsExtensions.cs @@ -0,0 +1,114 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for UserGroupOperations. + /// + public static partial class UserGroupOperationsExtensions + { + /// + /// Lists all user groups. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage List(this IUserGroupOperations operations, string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IUserGroupOperations)operations).ListAsync(resourceGroupName, serviceName, uid, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists all user groups. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IUserGroupOperations operations, string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, uid, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all user groups. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IUserGroupOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all user groups. + /// + /// + /// 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 IUserGroupOperations 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/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperations.cs new file mode 100644 index 000000000000..068d38ca3ad8 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperations.cs @@ -0,0 +1,285 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + 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; + + /// + /// UserIdentitiesOperations operations. + /// + internal partial class UserIdentitiesOperations : IServiceOperations, IUserIdentitiesOperations + { + /// + /// Initializes a new instance of the UserIdentitiesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal UserIdentitiesOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists all user identities. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/identities").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperationsExtensions.cs new file mode 100644 index 000000000000..2082aa8e3d62 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserIdentitiesOperationsExtensions.cs @@ -0,0 +1,73 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for UserIdentitiesOperations. + /// + public static partial class UserIdentitiesOperationsExtensions + { + /// + /// Lists all user identities. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + public static UserIdentityCollection List(this IUserIdentitiesOperations operations, string resourceGroupName, string serviceName, string uid) + { + return operations.ListAsync(resourceGroupName, serviceName, uid).GetAwaiter().GetResult(); + } + + /// + /// Lists all user identities. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IUserIdentitiesOperations operations, string resourceGroupName, string serviceName, string uid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, uid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperations.cs new file mode 100644 index 000000000000..4633ecc5d616 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperations.cs @@ -0,0 +1,1930 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// UserOperations operations. + /// + internal partial class UserOperations : IServiceOperations, IUserOperations + { + /// + /// Initializes a new instance of the UserOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal UserOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists a collection of registered users in the specified service instance. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the 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>> ListByServiceWithHttpMessagesAsync(string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByService", 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.ApiManagement/service/{serviceName}/users").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the details of the user specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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 serviceName, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + 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.ApiManagement/service/{serviceName}/users/{uid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or Updates a user. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// 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 serviceName, string uid, UserCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("parameters", parameters); + 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.ApiManagement/service/{serviceName}/users/{uid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates the details of the user specified by its identifier. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the user to update. A value of "*" can + /// be used for If-Match to unconditionally apply the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, UserUpdateParameters parameters, string ifMatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204 && (int)_statusCode != 405) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 == 405) + { + _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; + } + + /// + /// Deletes specific user. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the user to delete. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// Whether to delete user's subscription or not. + /// + /// + /// 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 serviceName, string uid, string ifMatch, bool? deleteSubscriptions = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (ifMatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ifMatch"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("deleteSubscriptions", deleteSubscriptions); + 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.ApiManagement/service/{serviceName}/users/{uid}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (deleteSubscriptions != null) + { + _queryParameters.Add(string.Format("deleteSubscriptions={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteSubscriptions, Client.SerializationSettings).Trim('"')))); + } + 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Retrieves a redirection URL containing an authentication token for signing + /// a given user into the developer portal. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// 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> GenerateSsoUrlWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GenerateSsoUrl", 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.ApiManagement/service/{serviceName}/users/{uid}/generateSsoUrl").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets the Shared Access Authorization Token for the User. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create Authorization Token parameters. + /// + /// + /// 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> GetSharedAccessTokenWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, UserTokenParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetSharedAccessToken", 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.ApiManagement/service/{serviceName}/users/{uid}/token").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 a collection of registered users in the specified service instance. + /// + /// + /// 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>> ListByServiceNextWithHttpMessagesAsync(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, "ListByServiceNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/UserOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperationsExtensions.cs new file mode 100644 index 000000000000..343d215d2d3e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserOperationsExtensions.cs @@ -0,0 +1,433 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for UserOperations. + /// + public static partial class UserOperationsExtensions + { + /// + /// Lists a collection of registered users in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage ListByService(this IUserOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IUserOperations)operations).ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of registered users in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceAsync(this IUserOperations operations, string resourceGroupName, string serviceName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the details of the user specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + public static UserContract Get(this IUserOperations operations, string resourceGroupName, string serviceName, string uid) + { + return operations.GetAsync(resourceGroupName, serviceName, uid).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the user specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, uid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or Updates a user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + public static UserContract CreateOrUpdate(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, UserCreateParameters parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, uid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or Updates a user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create or update parameters. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, UserCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, uid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates the details of the user specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the user to update. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + public static ErrorResponse Update(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, UserUpdateParameters parameters, string ifMatch) + { + return operations.UpdateAsync(resourceGroupName, serviceName, uid, parameters, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Updates the details of the user specified by its identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Update parameters. + /// + /// + /// The entity state (Etag) version of the user to update. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, UserUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, uid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes specific user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the user to delete. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// Whether to delete user's subscription or not. + /// + public static void Delete(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, string ifMatch, bool? deleteSubscriptions = default(bool?)) + { + operations.DeleteAsync(resourceGroupName, serviceName, uid, ifMatch, deleteSubscriptions).GetAwaiter().GetResult(); + } + + /// + /// Deletes specific user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The entity state (Etag) version of the user to delete. A value of "*" can + /// be used for If-Match to unconditionally apply the operation. + /// + /// + /// Whether to delete user's subscription or not. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, string ifMatch, bool? deleteSubscriptions = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, uid, ifMatch, deleteSubscriptions, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Retrieves a redirection URL containing an authentication token for signing + /// a given user into the developer portal. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + public static GenerateSsoUrlResult GenerateSsoUrl(this IUserOperations operations, string resourceGroupName, string serviceName, string uid) + { + return operations.GenerateSsoUrlAsync(resourceGroupName, serviceName, uid).GetAwaiter().GetResult(); + } + + /// + /// Retrieves a redirection URL containing an authentication token for signing + /// a given user into the developer portal. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// The cancellation token. + /// + public static async Task GenerateSsoUrlAsync(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GenerateSsoUrlWithHttpMessagesAsync(resourceGroupName, serviceName, uid, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the Shared Access Authorization Token for the User. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create Authorization Token parameters. + /// + public static UserTokenResult GetSharedAccessToken(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, UserTokenParameters parameters) + { + return operations.GetSharedAccessTokenAsync(resourceGroupName, serviceName, uid, parameters).GetAwaiter().GetResult(); + } + + /// + /// Gets the Shared Access Authorization Token for the User. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// Create Authorization Token parameters. + /// + /// + /// The cancellation token. + /// + public static async Task GetSharedAccessTokenAsync(this IUserOperations operations, string resourceGroupName, string serviceName, string uid, UserTokenParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSharedAccessTokenWithHttpMessagesAsync(resourceGroupName, serviceName, uid, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists a collection of registered users in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByServiceNext(this IUserOperations operations, string nextPageLink) + { + return operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists a collection of registered users in the specified service instance. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByServiceNextAsync(this IUserOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperations.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperations.cs new file mode 100644 index 000000000000..2ae3d167530e --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperations.cs @@ -0,0 +1,466 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + 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; + + /// + /// UserSubscriptionOperations operations. + /// + internal partial class UserSubscriptionOperations : IServiceOperations, IUserSubscriptionOperations + { + /// + /// Initializes a new instance of the UserSubscriptionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal UserSubscriptionOperations(ApiManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ApiManagementClient + /// + public ApiManagementClient Client { get; private set; } + + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (serviceName != null) + { + if (serviceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "serviceName", 50); + } + if (serviceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "serviceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(serviceName, "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$")) + { + throw new ValidationException(ValidationRules.Pattern, "serviceName", "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"); + } + } + if (uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "uid"); + } + if (uid != null) + { + if (uid.Length > 256) + { + throw new ValidationException(ValidationRules.MaxLength, "uid", 256); + } + if (uid.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "uid", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(uid, "^[^*#&+:<>?]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "uid", "^[^*#&+:<>?]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("uid", uid); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{uid}", System.Uri.EscapeDataString(uid)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 the collection of subscriptions of the specified user. + /// + /// + /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperationsExtensions.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperationsExtensions.cs new file mode 100644 index 000000000000..4dbfbd3e07fb --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Generated/UserSubscriptionOperationsExtensions.cs @@ -0,0 +1,114 @@ +// 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.ApiManagement +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for UserSubscriptionOperations. + /// + public static partial class UserSubscriptionOperationsExtensions + { + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage List(this IUserSubscriptionOperations operations, string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IUserSubscriptionOperations)operations).ListAsync(resourceGroupName, serviceName, uid, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the API Management service. + /// + /// + /// User identifier. Must be unique in the current API Management service + /// instance. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IUserSubscriptionOperations operations, string resourceGroupName, string serviceName, string uid, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, uid, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IUserSubscriptionOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the collection of subscriptions of the specified user. + /// + /// + /// 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 IUserSubscriptionOperations 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/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj b/src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj new file mode 100644 index 000000000000..3a6a863665c3 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj @@ -0,0 +1,17 @@ + + + + Microsoft.Azure.Management.ApiManagement + Provides ApiManagement management capabilities for Microsoft Azure. + Microsoft Azure API Management Management + Microsoft.Azure.Management.ApiManagement + 1.0.0-preview + Microsoft Azure ApiManagement management;API Managementt;REST HTTP client;azureofficial;windowsazureofficial;netcore451511 + + + net452;netstandard1.4 + + + + + \ No newline at end of file diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Properties/AssemblyInfo.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..7478c63c4fdf --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// + +using System.Reflection; +using System.Resources; + +[assembly: AssemblyTitle("Microsoft Azure API Management Resource Management Library")] +[assembly: AssemblyDescription("Provides api management capabilities for Microsoft Azure.")] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/generate.cmd b/src/SDKs/ApiManagement/Management.ApiManagement/generate.cmd new file mode 100644 index 000000000000..4266fa953f16 --- /dev/null +++ b/src/SDKs/ApiManagement/Management.ApiManagement/generate.cmd @@ -0,0 +1,7 @@ +:: +:: Microsoft Azure SDK for Net - Generate library code +:: Copyright (C) Microsoft Corporation. All Rights Reserved. +:: + +@echo off +call %~dp0..\..\..\..\tools\generate.cmd apimanagement/resource-manager %* diff --git a/src/SDKs/_metadata/apimanagement_resource-manager.txt b/src/SDKs/_metadata/apimanagement_resource-manager.txt new file mode 100644 index 000000000000..13a0f4a4d13a --- /dev/null +++ b/src/SDKs/_metadata/apimanagement_resource-manager.txt @@ -0,0 +1,10 @@ +2017-08-01 15:52:08 UTC + +1) azure-rest-api-specs repository information +GitHub user: Azure +Branch: current +Commit: 32a0602bdb695d6cb1142236316e1cec5fe75207 + +2) AutoRest information +Requested version: latest +Latest version: 1.2.2 From f472d9d30dc66447e07fc68b0df407c5059aa8ae Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Sun, 6 Aug 2017 11:42:31 -0700 Subject: [PATCH 2/2] Remove redundancies around project file --- .../ApiManagement.Tests.csproj | 20 ++--------------- .../ApiManagementTestBase.cs | 22 ++++++------------- .../Customization/Models/OperationContract.cs | 13 +++-------- .../Models/SubscriptionContract.cs | 12 +++------- ...soft.Azure.Management.ApiManagement.csproj | 3 --- 5 files changed, 15 insertions(+), 55 deletions(-) diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj index d4129cb00e77..ad1b44842d81 100644 --- a/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagement.Tests.csproj @@ -3,14 +3,13 @@ ApiManagement.Tests ApiManagement.Tests Class Library - 1.0.0-preview + 1.0.0-preview Microsoft Corporation ApiManagementManagement.Tests netcoreapp1.1 - 1.0.0-preview @@ -37,22 +36,7 @@ - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - + PreserveNewest diff --git a/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs index 48767c1e2024..d12aa484a930 100644 --- a/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs +++ b/src/SDKs/ApiManagement/ApiManagement.Tests/ApiManagementTestBase.cs @@ -21,17 +21,13 @@ namespace ApiManagement.Tests { public class ApiManagementTestBase : TestBase { - private const string TenantIdKey = "TenantId"; - private const string ObjectIdKey = "ObjectId"; private const string SubIdKey = "SubId"; - private const string ApplicationIdKey = "ApplicationId"; private const string ServiceNameKey = "ServiceName"; private const string ResourceGroupNameKey = "ResourceGroup"; private const string LocationKey = "Location"; private const string TestCertificateKey = "TestCertificate"; private const string TestCertificatePasswordKey = "TestCertificatePassword"; - - public string tenantId { get; set; } + public string location { get; set; } public string subscriptionId { get; set; } public ApiManagementClient client { get; set; } @@ -63,39 +59,37 @@ private void Initialize() if (HttpMockServer.Mode == HttpRecorderMode.Record) { - this.serviceName = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(ServiceNameKey); + this.serviceName = testEnv.ConnectionString.KeyValuePairs[ServiceNameKey]; if (string.IsNullOrEmpty(this.serviceName)) { this.serviceName = TestUtilities.GenerateName("sdktestapim"); } - this.location = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(LocationKey); + this.location = testEnv.ConnectionString.KeyValuePairs[LocationKey]; if (string.IsNullOrEmpty(this.location)) { this.location = GetLocation(); } - this.rgName = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(ResourceGroupNameKey); + this.rgName = testEnv.ConnectionString.KeyValuePairs[ResourceGroupNameKey]; if (string.IsNullOrEmpty(this.rgName)) { rgName = TestUtilities.GenerateName("sdktestrg"); resourcesClient.ResourceGroups.CreateOrUpdate(rgName, new ResourceGroup { Location = this.location }); } - this.base64EncodedTestCertificateData = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(TestCertificateKey); + this.base64EncodedTestCertificateData = testEnv.ConnectionString.KeyValuePairs[TestCertificateKey]; if (!string.IsNullOrEmpty(this.base64EncodedTestCertificateData)) { HttpMockServer.Variables[TestCertificateKey] = base64EncodedTestCertificateData; } - this.testCertificatePassword = testEnv.ConnectionString.KeyValuePairs.GetValueUsingCaseInsensitiveKey(TestCertificatePasswordKey); + this.testCertificatePassword = testEnv.ConnectionString.KeyValuePairs[TestCertificatePasswordKey]; if(!string.IsNullOrEmpty(this.testCertificatePassword)) { HttpMockServer.Variables[TestCertificatePasswordKey] = testCertificatePassword; } - - this.tenantId = testEnv.Tenant; + this.subscriptionId = testEnv.SubscriptionId; - HttpMockServer.Variables[TenantIdKey] = tenantId; HttpMockServer.Variables[SubIdKey] = subscriptionId; HttpMockServer.Variables[ServiceNameKey] = this.serviceName; HttpMockServer.Variables[LocationKey] = this.location; @@ -103,9 +97,7 @@ private void Initialize() } else if (HttpMockServer.Mode == HttpRecorderMode.Playback) { - this.tenantId = testEnv.Tenant; this.subscriptionId = testEnv.SubscriptionId; - tenantId = HttpMockServer.Variables[TenantIdKey]; subscriptionId = HttpMockServer.Variables[SubIdKey]; rgName = HttpMockServer.Variables[ResourceGroupNameKey]; serviceName = HttpMockServer.Variables[ServiceNameKey]; diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs index 767be8bb84e3..fd58cdd7e1e8 100644 --- a/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/OperationContract.cs @@ -1,16 +1,9 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. namespace Microsoft.Azure.Management.ApiManagement.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.ApiManagement; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; using System.Text.RegularExpressions; /// diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs index c817c01f941b..0821821bb4bc 100644 --- a/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Customization/Models/SubscriptionContract.cs @@ -1,15 +1,9 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. namespace Microsoft.Azure.Management.ApiManagement.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.ApiManagement; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; using System.Linq; /// diff --git a/src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj b/src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj index 3a6a863665c3..5589d107d312 100644 --- a/src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj +++ b/src/SDKs/ApiManagement/Management.ApiManagement/Microsoft.Azure.Management.ApiManagement.csproj @@ -11,7 +11,4 @@ net452;netstandard1.4 - - - \ No newline at end of file